Mental Ray Batch Render And Deformers

Ok, I posted a thread in the render section about this issue but now that I have a clearer idea of what is going on I thought the topic would be better served in here..

Basically I have two characters, both are polygon models with Nurb Sphere eyes, surrounding those eyes are lattice deformers with animatable clusters. When I move the characters around I move the clusters and both the eyes and their child objects the eyeballs deform perfectly.... this is visible through standard play blast and individual renders using Mental Ray FG Preview....

see below...

But the minute I run this scene through Batch render then the lattice deformers around eyes only work on the child objects (the eyelids) leaving the eyes themselves behind.... see below...

If I run batch render on Maya Software render settings and Production preset, the deformation error doesn't occur and as I said before neither does it happen in Playblast Open GL render or in Mental Ray FG Preview Preset if I render only single frames.... it only specifically seems to be with Mental Ray (any preset) when run through batch render...

Also just to try it out I also baked the motion of the clusters but that still made no difference...

So... any ideas... clearly something within the Batch Render command is causing this to happen but I'm at a loss to explain what?
Any help greatly appreciated in advance...

Well this has been covered on several occasions.

But first remember batch render and maya render while same program, its still not the same application. So saying:
"If I run batch render on Software render settings and Production preset, the deformation error doesn't occur" , does not help you in any way. Forget it, has no relevance whatsoever, its like trying to say that bike A works what the hell is worng with bike B. As you can see its extremely informative.

Anyway the clue is the above statement fo being same program but different application instance. How do they differ? Well batch render has no viewports, and thus batch render isnt aware of anything that happens to happen view port refresh time, gui buildup time or anything in particular that works on anything that builds uppon the gui auxiliary commands.

Now there is a catch it all solution available, bake the troublesome transforms before you batch (parent constraint is notoriously prone to this). And no im nt saying you should do this every step of the way, just when you render trough script. threes a sibling thread to this:

http://www.highend3d.com/boards/index.php?...doingScript.mov

Read it.

Anyway you could solve the update issue too... But I wont go into that since it requires you to know what maya does in EXACT order and quite frankly i don't expect very many non api programmer being able to tackle it with a comfortable mail length explanation.

Anyway,

QUOTE(Joojaa @ 05/02/07, 12:18 PM) [snapback]265268[/snapback]
Well this has been covered on several occasions.

My apologies for that I did a search on Batch Render and came up with lots of threads that seemed to have no relevance, I assumed that I might have been searching for the wrong thing but scanned briefly through the forums to see if anything popped up in the thread titles...

QUOTE(Joojaa @ 05/02/07, 12:18 PM) [snapback]265268[/snapback]
But first remember batch render and maya render while same program, its still not the same application. So saying:
"If I run batch render on Software render settings and Production preset, the deformation error doesn't occur" , does not help you in any way. Forget it, has no relevance whatsoever, its like trying to say that bike A works what the hell is worng with bike B. As you can see its extremely informative.

Indeed I see that now... thanks for clearing that up... I figured more info was better than "It doesnt work when I hit batch render"

QUOTE(Joojaa @ 05/02/07, 12:18 PM) [snapback]265268[/snapback]
Anyway the clue is the above statement fo being same program but different application instance. How do they differ? Well batch render has no viewports, and thus batch render isnt aware of anything that happens to happen view port refresh time, gui buildup time or anything in particular that works on anything that builds uppon the gui auxiliary commands.

Now there is a catch it all solution available, bake the troublesome transforms before you batch (parent constraint is notoriously prone to this). And no im nt saying you should do this every step of the way, just when you render trough script. threes a sibling thread to this:

http://www.highend3d.com/boards/index.php?...doingScript.mov

Read it.

Thank you I am... right now...

QUOTE(Joojaa @ 05/02/07, 12:18 PM) [snapback]265268[/snapback]
Anyway you could solve the update issue too... But I wont go into that since it requires you to know what maya does in EXACT order and quite frankly i don't expect very many non api programmer being able to tackle it with a comfortable mail length explanation.

Anyway,

Thats handy as my API programming knowledge is about the same as a Dolphin's grasp on dealing shares....

Thanks again for the response and the links I appreciate your help

Ok just to complete this thread after all the links etc... the problem has now been sorted and baking keys did not work...

In the end thanks to a suggestion from Escape Studios it was suggested that I cached the geometry for the eyes..... I did this and this sorted the whole thing out brilliantly...

Thanks again for everyone's help in this...

Hmm are you sure you baked the right thing? I mean if you for exmple baked something upstream but not the trasform that is tah target of a constraint?

Anyway point cache is a the exact same thing as baking to keys. Which brings us to the point baking would have worked had jyou just cached the right thing.

Well I'm sure I would have baked the right thing had I known exactly what I was looking for... but in the end all I had was the post you linked to, to go on and low to no major experience of Maya in these conditions...

As I'm sure you can appreciate, when you're relatively new to maya, theres plenty you can misinterpret if you've never used one function or another... Its very easy for an experienced user of an application to throw out what seems to be straight forward information and still have it misinterpreted because a user has never used for example a bake function and so simply looks it up in the Help file, taking no account of any potential workflow or pit falls that might befall them...... As a Lightwave user of 10 years I know this issue from the other side so I do appreciate the potential frustration of offering up an answer and then having the person question it again or plain ol get it wrong and bleat about it not working....

As it stands the two eye components had no keys to bake, both sat within a lattice deformer, the eyeball itself also had an aim constraint... there was no keys on the objects to bake, the transforms were handled via the lattice, it seemed logical to me to bake the keys that existed... in this case the animated clusters on the lattice and on the aim constraints... I could find no info on baking transformations in the help and I know everyone here is busy or understandably hasn't the time nor the inclination to hand hold a newbie through what they consider to be a relatively simple operation.

Therefore I put the request out to another forum and they provided me with a simple solution, create a cache for the geometry plus a line of info that said, choose the animation shelf, click ANIMATE then GEOMETRY CACHE then CREATE GEOMETRY CACHE... it was a simple effective answer born of experience in the same issue, presuming nothing about my own skills or knowledge...

It worked.... So I thought I'd post up the info here in case someone like myself hit a similar problem.

Let me finish by saying I do appreciate your help and the time you take to reply to these posts in the first place and I apologise if it seems like I am ungrateful in any way, far from it, just sometimes us newbies to Maya do need a little hand holding from the more experienced users, because things like "am I baking the right thing?" wouldn't even have entered my mind unless you mentioned it and Maya can be somewhat...er...eccentric.... in the way it works compared to other apps I've used in the past.......

Anyway thanks once again...

Well Mayas kind of straightforward. And mayas not weird, its just that maya builds on the notion that a user can cope with more than 10 interactive steps at a time. Which I know is more then people can do, in the beginning but maya copes with this in a way that does it well.

however mayas also not working like most applications most people are used to. Simply beacuse most applivations arent autoring tools that cope with whatever you like. Also most applications dont come with full remote launc suites designed to work on any 3 platforms.

in fact mayas not weird at all if you look at it form a traditional mega computation point of view, this is how all applications used to work, once upon a time and still do in many cases, whan you deal with server side stuff. Certainly much engineered but still.

QUOTE
it was a simple effective answer born of experience in the same issue, presuming nothing about my own skills or knowledge...

Sure i just pointed out its the same thing as baking because in the true sense of words it is baking (it bakes into a cache not a keyframe, same thing different fromat). However i cant say to use it, because that automatically drops out all the 7.0 and in some cases 8.0 users out there which are quite plenty. (you didnt mention the version), se id rather fix a generc answer than a maya xxx specific one.

Anyway back to the topic:

QUOTE
As it stands the two eye components had no keys to bake, both sat within a lattice deformer, the eyeball itself also had an aim constraint... there was no keys on the objects to bake, the transforms were handled via the lattice, it seemed logical to me to bake the keys that existed... in this case the animated clusters on the lattice and on the aim constraints... I could find no info on baking transformations in the help and I know everyone here is busy or understandably hasn't the time nor the inclination to hand hold a newbie through what they consider to be a relatively simple operation.

Ok, theres something in this part that is implying something to me. Are you saying you think baking operates on key frames? Well it does not it takes everything including keyframes and turns them into keyframes. So in your case, while cache is perfectly valid its a also probably 10 times heavier then need be.

Anyway how to decide what to bake. Well you could have baked the transformation of the latices too or the points in the laticce (or the points in the object wich is what you did). Next time try to graph your history and think what connection is lagging.

idea is to try to decipher wat point lags and fix it. You fixed is so more power to you.

But im not interested in quick fixes im interested in you understading. ask for quick fixes but dont exopect them form me. my price is this, and quite frankly i dont stand the other end.

PS. just to add a bit, mayas flexibility comes at a price, the combinations are unlimited so the rig is more a computer programming language than anything else. there will always be possibilities for issues. And secondly mental ray is not native maya code, so the exporter can become blind to certain effects within the update chain, with some of the default options. So not only do you need maya talking trough stuff, you need the translator seeing it too. So in a way mayas justa a unconnected jumble of small modules (very common in academic an unix line of the world)

this is also why mayas hard to teach, because you cant focus on workflow, you need to focus on how it works and then make a workflow. because any tutorial out there will expose you to one of a 100000 ways, ofccourse of those 10000 only 1-10 make sense, howewer often the tutorial is just one not in the 10

Hi there

I have the same problem! (1 1/2 Year later :wink:
I have figured out the following:

IF
More than 2 objects in a lattice (lattice shape altered!)
AND
Animated objects, rendered in MentalRay 3.5.1.2 (Maya8)
THEN
Failure like described in this Thread!

In detail:
I have parented EyeLid AND Pupil under EyeBall
EyeBall in a Lattice
Change the Lattice (Oval Comic-Eye-like)
Rotate the Pupil and Rotate the EyeLid (animated over some frames)
(Look down and close Lid half)
Does render correct with MayaRender, but does NOT render correct
with MR3.5.1.2

If I leave out the EyeLid (only Pupil under EyeBall
or in other words, only 2 Obects in Lattice
then it renders correct in Maya AND MentalRay!

Ok! I have read your Workaround but in my opinion,
this is a MR-Bug, maybe fixed in later version !??

QUOTE(foolproof @ 07/20/08, 11:36 AM) [snapback]288595[/snapback]
Ok! I have read your Workaround but in my opinion,
this is a MR-Bug, maybe fixed in later version !??

It depends. maya to mr is trying to do the deal ok. The bug is DEFININTELY not in mr itself. If there is one.

Its just that maya to mr does NOT allways see whats going on in the bake porccess. Thing is the renderer is a baking process (so baking beforehand is NOT necessarily a workaround after all thats whats supposed to happen, it can even make the redners speed faster). So baking the scene is EXACTLY the same thing as doing the render. Its just you making sure the step works. (so mr never sees a laticce, ever! it just sees the deformed surface)

its easy to fool maya tough. Maya decides whether or not to incrementally change the primitives by searching for inputs that are keyed. Sometimes maya does not see they are because its not actually keyed with a key frame anywhere. Now the trick is to, connect a anim curve into one of the shapes inputs. It doesnt need to do anything in particular jsut be there maya then picks the clue and makes a more costly export for the node.

This definitely still happens, tough less for normal use situations, and it definitely will happen as loong as your dealing with freedom of use. The moment they forbid you form making your own node connections its all spiffy.
QUOTE
Ok! I have read your Workaround but in my opinion,
this is a MR-Bug, maybe fixed in later version !??

the fact that you need to use maya is a bug if you look at it a certain way. So while thsi is definitely not a bug in MR it might well be a bug in the exporter. Id rather call it a limitation tough, since theres plenty of things that NEVER works all right out for maya to mr. They are not bugs per see they are concious things that have been left out. Things that work in maya software but wnt work in mr.

But you dont happen to have a simple scene that exhibits this and i can test to see what the proble your having REALLY is. (if you post post a maya asii file ma ie you choose *.ma in the save box, that means DO NOT CHOOSE *.mb!)
[b]

PS:[/b] yes i know users arent supposed to need to know how things work. Sure, but then anagain no one needs you to do the work either. Somebody esle can allways be gotten to do the job So it certainly pans out to know how it works. Because without knowing how things work, you cant devic a workaround. If you cant device workarounds you cant do everything. (life is about workarounds, after all going to work is a workaround for not having everything we need for free. Not to mention whole of 3d that IS a HUGE workaround)

PPS: maya 8 is definitively the worst maya since maya 5.0 to come out bothe 7.0, 8.5 and 2008 are fer superior to maya 8.0

Thanks for the quick answer!
(Unfortunately, I am not able to upload .ma files to this forum)

I have checked it again and again with each time the same result:
Eylid and Pupil (both polygon objects) parented under Eyeball (Poly), deformed by
Lattice, animated and rendered with MR 3.5.1.2 leads to this
incorrect rotaion of the eyeball an Eyelid as showned in the pictures
in the first part of this Forum-thread
In the meaning of Maya is the Workflow legal and correct!
(Maya does render it correct too)
I agree with you: The bug is maybe to localize in the MayatoMR exporter!

Anyway - I have to go on: My Workaround now is as follows:
Sphere working as pupil AND Eyeball. (Blackcolored center=pupil)
Upper AND Lower-Eyelid-Polys combined.
Driven by two Clusters for opening and closing the Lids
Eyeball parented under Eyelid.
Eyelid (with parented Eyeball) in Lattice for Deforming. (Cartoon-like oval Eye)
This is not a groundbreaking workaround :wink: but it works under MR3.5.1.2.
The rendered pictures are like I have expected!
Thank you an best regards!

PS: Maybe somewhere with the latest maya version 2008 could check, if
this "bug" still exists.

QUOTE(foolproof @ 07/23/08, 06:13 PM) [snapback]288729[/snapback]
(Unfortunately, I am not able to upload .ma files to this forum)

Thats baceuase tahts not how you woudl do it. You upload it somewhere esle and then link it in. Thats a integrl part of how the WEB works, not really how the board works.

But i can as a mnatter of fact get this working on maya 7.0, 8.0. 8.5 and 2008 so no its not a big issue to me! So because i see no error I dont need t circumvent it at all.

Its just taht theres a lot fo other things that error out when you get really nifty about your rigs. And no i dont even expect the exporter to ever adress all my problems. Since some of them are unadessable untill we can get rid of renderers taht work on polygons.