PDA

View Full Version : Reflection Sets



d_vanya
December 16th, 2005, 10:35
Is it posible to tell shader to reflect only objects in the set? Like trace sets in PRMan...

Szabolcs
December 16th, 2005, 14:12
You can do it based on custom labels if your shader supports this feature. (AFAIK no mental ray shader does this by default.) The real problem is that - as in prman - MR still puts the object in the BSP and scene cache, your shader simply does not care about the object when it is hit by a ray. So it can be used to customize the look but can't be used to speed up the render.

Cheers,
Szabolcs

bart
December 16th, 2005, 17:08
You can use the reflection flags to remove something from the BSP.

I'm working on a flags tips page.

Szabolcs
December 16th, 2005, 17:21
The trace flag removes the object from the reflection of all other objects. You can't say that object A reflects on object B but does not reflect on object C. This can be done in prman / mtor using trace sets. The cool thing would be to have these flags right in the BSP to avoid tracing altogether for specific shaders but I guess it would be pretty complex to handle.

Cheers,
Szabolcs

d_vanya
December 17th, 2005, 11:05
Thanks Szabolcs.

bart
December 18th, 2005, 03:06
If you are concerned about memory usage and the BSP, the scene is probably sizable enough to benefit from large BSP, which is a flushable BSP which uses the scene cache.

You could still use object labels to do something like reflection sets, but it would require a shader that knows about them.

I'd like to understand the motivation for the original topic a bit better. It is very possible, it should be approached differently.

For example, maybe this is related to approximation, as well. There is a possibility to have different approximations for reflected objects.

d_vanya
December 18th, 2005, 03:17
The reason is not better memory usage or any other optimization... I just need this kind of effect... Object A reflect object B, but not reflect object C, and object D recflect A, B and C...

d_vanya
December 18th, 2005, 03:22
I just look in 3d max's realiziation of this thing... Max's material shader contain array of string of object names that exclude (or include) in reflection (or refraction)...

doug_at_buck
September 11th, 2008, 00:23
sorry to resurrect an old old post. I have been struggling to find a way to do this in maya. (to be able to exclude the reflection of a specific object, for a given material)

Yes, after looking in max, it works perfectly there. but of course, we all are using maya in the forum. So i don't know how the "raytrace" material in max works, but it works with mental ray. You can go into a particular raytrace surface, and find an exclude list. there you can see all the objects in your scene and if you chose one (or many) you have specified that those objects will NOT be seen in any reflections on THIS surface that you are editing.

So now i know that it can be done with trace sets in PRman, and with a raytrace material with mental ray in 3dsmax. Is there any knowledge of how to do this in maya. or how to utilize the "custom labels" if this is in fact the way it should be done. (and if custom labels is the way, than i would assume that is how the raytrace material is translated to mi) Any example of other shaders using custom labels? do u guys think i will need to write my own shader here?

any thoughts would be appreciated!

doug

Remydrh
March 9th, 2011, 00:05
I am going to re-resurrect this yet again because I need a solution.

For now I can get the reflection itself not to run the object shader. Meaning I reflect a black hole using the id attribute of the occlusion shader.

But I actually need it to simply not render the object at all, like mib_continue.

Motivation being: I need the object to influence the highlight of some objects in the scene but not be visible in the reflection of some windows.

My head feels like I have a wet towel on it, but maybe make use of some user data that gets called based on the id value. Reflect material A or Reflect material B. So maybe something into a rayswitch like a boolean, visible on/off in reflection. Or am I nuts?

fatjulio
March 10th, 2011, 00:39
I managed to do this with miLabel, like mib_amb_occlusion, but only by writing my own shader to recognise the labels. To get the ray to continue, use the vector you just used to call reflection or refraction, and set state->point to state->child->point.

Remydrh
March 11th, 2011, 01:03
I was afraid that might be the case. I can't generate my own shader for this at this point.

dafloW
March 17th, 2011, 16:35
Hi there maybe the visbool shader from Holgers Essential Collection does it. You have 4 groups where you can define what group sees what from the other group. Helped me alot.

http://www.binaryalchemy.de/

Remydrh
March 24th, 2011, 09:57
Thanks! I'll take a look.