PDA

View Full Version : object appears behind glass despite having primary visibility turned off


anthonymcgrath
03-21-2006, 02:07 PM
reet I've got a cylinder which I've mapped a hdr map onto - I am moving a car model thru this cylinder to get reflections across the car bodywork - its looking noice!

my problem is the glass - it reflects my hdr cylinder fine and the reflections look good but I can see the cylinder thru the other side of the glass - as if the glass shader ignores the 'primary visibility' button which I've turned off for the hdr cylinder.

the glass shader is a simple blinn - am I doing something wrong here? I've tried upping the number of refs n rafs n trace depth - its not working :(

ant
newc
uk

Chris-TC
03-21-2006, 04:28 PM
Refraction rays are not primary rays - you need to turn off the transparency visibility and refraction visibility options for your object.

anthonymcgrath
03-21-2006, 05:13 PM
my problem is the hdr cylinder I created DOES actually become invisible (primary visibility)
the cylinder which surrounds the car IS reflected into the car paint and is all fine

the prob comes here.. the windows on my car do the same trick UNTIL the hdr cylinder has the windows between itself and the camera - then the cylinder is visible in the window area - as if the glass window is actually turning the primary visibility back on again.

Chris - the things you tell me to look for 'transparent visibility and refraction visibility' wont work here - I dont think maya has those buttons for it - at least I've never seen them.


IBL is not gonna work here - I need the cylinder as the car is travelling from a to b

bit miffed with it all :/

ftaswin
03-21-2006, 08:17 PM
Chris - the things you tell me to look for 'transparent visibility and refraction visibility' wont work here - I dont think maya has those buttons for it - at least I've never seen them.



under the cylinderShape tab in the same rows as primary visibility box there are visible in reflection and visible in refraction boxes. Have you turn them on(reflection) and off(refraction)?

Sounds like that's the problem you are having.

anthonymcgrath
03-22-2006, 09:35 AM
heres my prob. as you can see in my persp window the cylinder is visible but I've turned primary vis off for it. I've also turned off vis in refraction but left vis in reflection on just as you mentioned ftaswin ...prob is its still rendering thru the glass but nowhere else - really stuck here :(

http://img.photobucket.com/albums/v90/anthonymcgrath/raytrace_prob01.jpg

Chris-TC
03-22-2006, 06:27 PM
Does your glass have an index of refraction?
I haven't worked with Maya in a while, but your problem should be similar (excerpt from XSI manual):


Transparency Casting and Visibility If an object is a transparency caster, it can cast transparency rays that sample the scene. Surrounding objects are can be seen through its surface, provided that they are visible to transparency rays. Of course some amount of transparency must be defined in the objectís material for this to work (see Transparency (#Rek32917) for details).

If a transparent object has an index of refraction value that is not equal to one (in other words, some refraction is defined), its transparency casting and visibility options have no effect. Instead, you need to can adjust its refraction casting and visibility options (see Refraction Casting and Visibility (#Rek60023)).

Refraction Casting and Visibility If a transparent object has an index of refraction value that is not equal to one (in other words, some refraction is defined), its transparency casting and visibility options have no effect. Instead, you need to can adjust its refraction casting and visibility options.

When an object is a refraction caster, it can cast refraction rays that sample the scene. Surrounding objects are can be seen through its surface ó properly distorted according to the index of refraction ó provided that they are visible to refraction rays. For this to work, some amount of transparency must be defined in the objectís material and the objectís index of refraction must set to a value other than 1 (see Transparency (#Rek32917) and Refraction (#Rek27088) for details).




Basically what it's saying is that the refraction visibility options only work if your transparent object (your glass pane) actually has an index of refraction. If it doesn't you need to use the transparency visibility.
Unfortunately I'm not sure where to find these settings in Maya. I suggest referring to the manual.

ftaswin
03-22-2006, 10:04 PM
OK, logically that means the glass appear in reflection from some other reflections in the scene.

Reflection map ALWAYS create some sort of problem in CG. In this case, try:

- Turn the reflection index to 1 or 2 (bounce once or twice max on any objects) in the render global. Turning it up onluy making the problem worse.

- apply transparent lambert on the back window so it doen't receive any reflection at all, or if you don't see the back window when the car driving pass the camera, turn the actual object off.

- bend the end of your cylinder so you dont see it ends.

- I understand what you are trying to achieve with the cylinder, but it's a 3D world, you don[t have to mimic what actually happen in real world. Put your hdr into an environment sphere and if you REALLY have to see some real life like reflection on some part of the windows, do a seperate render and comp it.


Lot's of solutions, pick the easiest one against time.

I hope that helps

anthonymcgrath
03-23-2006, 04:56 PM
chris - thanks for the excerpt from the xsi manual - unfortunately I'm working in maya6 and its starting to feel more and more limiting as I try and do more advanced stuff - mental ray is just ignoring pretty much anything I want it to do - I can add a hdr sphere to the scene and that renders fine ...hiding out of sight when glass passes in front of the camera but the reflections appear to stand still on the car and I need them to look like their moving along the cars bodywork ...hence the cylinder

I worked with xsi for a year or so and adored its power but maya really is limiting - I'd be surprised if theres a button to control the reflect and refract ways in the way you suggest - it just isn't that powerful :(


ftaswin - the comping method you suggested is one method but it puts another factor into the puzzle and I've got about 30+ animations to fire out here with the same scene and not much time to do it all either. if this cylinder thing worked I'd be pleased as punch but its just intent on displaying itself as the image shows - I've tried all sorts.


any other suggestions are welcome as always

Chris-TC
03-23-2006, 07:25 PM
ftaswin - the comping method you suggested is one method but it puts another factor into the puzzle and I've got about 30+ animations to fire out here

If there's no other way I'd also say that you should comp it.

It's really not that difficult. For your beauty pass you simply hide the cylinder completely - this way it will neither get reflected nor will it be visible through the glass.
Then you add a reflection pass with just the reflections.

Comp the two passes together in post and you're done. This is probably the most flexible solution and it shouldn't be hard to implement either.

anthonymcgrath
03-24-2006, 09:31 AM
if it were my own project at home I'd have comp'd it a long time back but I need to have the scene set up so I can pass it to another member of staff and they dont have to faff on really - they just animate the characters in the car, hit render and pass it back for editing into the animation sequence.

I found another good workaround tho - I made the hdr cylinder about 50times bigger than it should be and adjusted the clipping plane to exclude it (the main car and other scene cars only cover an area of 500 units anyhow ..the hdr cylinder is somewhere in the 5000unit range if that makes sense).
strangely the camera doesn't render out the hdr cylinder behind the glass but the reflections are still there - seems to work fine ..hoot! :)

CGTalk Moderation
03-24-2006, 09:31 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.