PDA

View Full Version : Animated visibility with mental ray


Hardrawk
01-27-2006, 02:45 PM
Hi!

I have this scene with multiple objects with animated visibility on off. When done animating i discovered that mental ray don't like this because when batching the scene all objects become visible in the rendering. When rendering from within Maya everything is fine fine fine.. I have tried the "optimize non animated object visibility" switch in mental ray globals, but this doesn't seem to work either. Is this a well known bug? I would love to find a solution to this since the project is running to an end.. Thanks!

Regards Johan.

Hardrawk
01-28-2006, 11:04 PM
Come on guys, doesn't anyone know why this is..?

djx
01-29-2006, 11:09 AM
This frustrated me for quite some time and I tried various work-arounds. Actually there is a really simple work around. When you do your batch render, just render 1 frame per command instead of a range of frames. Obviously this is really easy with a render manager (like smedge for example), but with a bit of scripting you could write fairly simple batch that loops through the frame range, one frame at a time.

To do it in maya is very messy. There is an attribute called mi-visible that you need to animate instead of the regular maya visibility. Its not animatable by default so you have to use the channel control window to make it keyable. The main problem is that the maya viewport display completely ignores this parameter, so you cant tell what state you objects visibility is in. And just to make it really confusing, if you double up and use the visibility attribute as well as the mi-visible, then you're back to where you started from - it doesnt work!

Hardrawk
01-30-2006, 09:24 AM
Thanks! Pretty easy.. That worked lika a charm. I just made a batch script line for each frame, and voila...

Regards

djorzgul
03-01-2006, 03:43 AM
hehe, you can key the mi-visible attr. in maya 7.
just ordinary right-click-set key...

=LuxX=
03-03-2006, 09:38 AM
hi there,

I got a same sort of problem, i've got a animation that I want to render in mental ray. I want to render it with: By frame 3. When i render it in maya everything is oke, but wen i start the batch render its all messed up. I still see the " cell's" that are suposed to be invisible.
I dont know nothing about scripting is there a easy way to solve this problem?

SkinnyBoy
03-27-2006, 11:01 PM
So where can I find the mi-visible attribute?

Had a search through Maya help, but cannot find anything.

shoox
03-28-2006, 08:27 AM
in render settings choese the mentalray tab under translation > performance u will find cheak box called optimize Non-animated display visibility un chaek this box and it will working i think :thumbsup:

AloeDesign
03-28-2006, 04:10 PM
see my recent thread on this very topic: http://forums.cgsociety.org/showthread.php?p=3396072#post3396072

dangerweenie
06-21-2006, 05:10 PM
I'm pretty new to scripting, and having the same problem you are...

can you share that script with us?

thanks!

m

Thanks! Pretty easy.. That worked lika a charm. I just made a batch script line for each frame, and voila...

Regards

dangerweenie
06-21-2006, 05:12 PM
Hi!

I have this scene with multiple objects with animated visibility on off. When done animating i discovered that mental ray don't like this because when batching the scene all objects become visible in the rendering. When rendering from within Maya everything is fine fine fine.. I have tried the "optimize non animated object visibility" switch in mental ray globals, but this doesn't seem to work either. Is this a well known bug? I would love to find a solution to this since the project is running to an end.. Thanks!

Regards Johan.

Hello Johan,

I had the same problem...thing is, some of the maya visibility keyframes did work rendering in mental ray, while on other objects they did not... very peculiar. Did you notice that you didn't have to set .mi visible keys on some of the objects in the scene?

Regards,

Matt

Ash-Man
06-23-2006, 12:39 PM
one other way

is to animate the visablity the same way you do it in Maya software render then

In the render Settings > Translation > Preformance > Optimize Non-animated Display Visibility is OFF

Hardrawk
06-25-2006, 07:02 PM
Hello Johan,

I had the same problem...thing is, some of the maya visibility keyframes did work rendering in mental ray, while on other objects they did not... very peculiar. Did you notice that you didn't have to set .mi visible keys on some of the objects in the scene?

Regards,

Matt

Hi Matt!

What kind of scene are you rendering..? Is it a lot of frames for a larger animation or is it a smaller number of frames? The method I tried worked fine for me since I only had a limited number of frames to render so the scripting didn't get too heavy. I'm quite sure this is not the best way to do this though... I can show you the ".bat" batch scripting if you like to use it anyway.. it is no rocket science, just make a "new document.txt" change the extension to .bat and add the following lines, one for each frame since you want maya to reload the scene for every frame to override the visibility thingy...

render -r mr -s 1 -e 1 -cam nameOfCamera -im imagename C:\maya\scenes\mayaScene.mb
render -r mr -s 2 -e 2 -cam nameOfCamera -im imagename C:\maya\scenes\mayaScene.mb
render -r mr -s 3 -e 3 -cam nameOfCamera -im imagename C:\maya\scenes\mayaScene.mb

etc.. Just change the camera-, image- and scenename to match your setup..
To execute the script just doubleclick on the .bat file and maya should work it's magic.. oh, and if you want to get a grip of how the rendering progresses, tick the show progress messages checkbox in renderglobals under translation..

I hope this helps..!

Regards

/Johan.

CGTalk Moderation
06-25-2006, 07:02 PM
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.