PDA

View Full Version : custom passes


pic
01-18-2008, 04:53 PM
Hi,
I have a question about the reflection evaluation.
I want to build custom passes of ambient, diffuse, and specular. In
those passes I dont want the reflection to be evaluated at all.
I tried to put the reflection secondary ray depth at 0 but it's not
deactivating the reflection evaluation which seems normal. It is just
compositing black (0,0,0) as the reflected color, as Mental Ray can not
launch another ray to get a reflected color.
I tried Xsi's base passes but they all render the reflection as
descripted above meaning that they do not isolate ambient, diffuse and
specular.

So is there a parameter I can use to prevent all reflection rendering
instead of having to go through all the objects shaders one by one to
track the reflection colors and override them to 0 ?
thanks,

cryptosporidium
01-19-2008, 10:21 AM
its quite simple. in explorer window look at your passes. select the pass which you dont want to render reflections. on objects bacground partition create property>overide. select "reflection caster" and "visible to reflections" and set these parameters off in the override. Now no objects are casting or receiving any reflections. Also its good to make an override on lights partitions and turn their "specular contribution" off.

pic
01-19-2008, 05:58 PM
Tx for the answer but unfortunately it cant work. What will happen is close to what I described previously. Mental Ray wont find any reflected colors as it wont find any reflection casting object. So it will use black as a reflecting color but will still evaluate reflection on the objects receiving it.
I miss a "reflection receiver" boolean that would switch all shaders "reflection inuse" to 0.

cheers,

tc
01-19-2008, 10:19 PM
why dont you make a pass that output those channels you want, ambient, specular, etc...
and for this pass you leave the reflecting object without reflect anything.

and then you do another pass, that put all those objects in a partition with a ray_type switch, and then the reflecting object visible with everything.

It's kinda simple to split a reflection pass... I don't know what are you trying to do but you can put overrides on specific parts of your shader, it doesnt need to override the entire shader so you can just put an override that store the true/false for reflections.

pic
01-21-2008, 09:43 AM
Hi,
Framebuffers would be the best options. Problem is there is a bug with them. They do not evaluate correctly the transparencies ( the main buffers is seen through the transparency values of all the buffers ). That's the reason I have to make these basic custom passes in the first place.
Going through the shaders is the option I would like to avoid because ( among other reasons ) the pass would be obsolete when you add new objects after its creation.
cheers,

tc
01-21-2008, 10:23 AM
there's not a "bug", the Channels evalute what you put on it...
So if you input the alpha that you want then you'll have the right alpha.
Try to use the Pick_Channel and output alpha from that.
If you want to comp RGBA you can use the RGBA combine and then output this to your shader.. you StoreInColor can be in the middle of your tree, it dont need to be in getting the entire surface.

Can you post any screenshot? It would be easy to get help.

pic
01-21-2008, 01:55 PM
waouh, Xsi is perfect how could I say there is a bug. How bolchevik of me.
There is a bug, one in a long list of others I'm actually talking about with Softimage.
But that's not the point of my question.
if you about a method or an option answering my original question I'd be glad to hear and very gratefull as well, otherwise I dont need any SFX lessons Tx

ndog
01-21-2008, 02:22 PM
waouh, Xsi is perfect how could I say there is a bug. How bolchevik of me.
There is a bug, one in a long list of others I'm actually talking about with Softimage.
But that's not the point of my question.
if you about a method or an option answering my original question I'd be glad to hear and very gratefull as well, otherwise I dont need any SFX lessons Tx

Wow! I know it's frustrating trying to resolve your problem but how about appreciating the fact that tc was trying to help you.

pic
01-21-2008, 02:27 PM
True and I thank him for that

cryptosporidium
01-22-2008, 08:41 AM
dont you use some 3rd party shaders? what i adviced to you definitely should work, i use this setup frequently. but i experienced problems with 3rd party shaders - some doesnt allow you to render channels, some cant use partition overrides, etc. If you turn reflection caster/receiver off, you definitely shouldnt see any kind of reflection, not even black areas. If you havent tried then try it on simple scene first with default phong shader and youll see it works.

CGTalk Moderation
01-22-2008, 08:41 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.