Binary Proxy Animation

Maya specific mental ray topics

Binary Proxy Animation

Postby Remydrh on Thu Jun 05, 2008 12:01 pm

Ok, I've managed to get the binary proxy to work fine except for one caveat: deformation.

Zap mentioned it would write deforming objects to a file. I have tried this in Maya but cannot get it to work. I have tried a Geometry Cache and also baking the cache to keyframes and it simply writes the geometry in the state it's in for the first frame of the batch render.

Is there a way to do this? Ideally for something like converted paint effects.
Remydrh
 
Posts: 363
Joined: Fri Dec 09, 2005 2:14 am
Location: Culver City

Re: Binary Proxy Animation

Postby haggi on Fri Jun 06, 2008 2:46 pm

Did you setup the geoshader in a way it write every time to disk?
Problem here is that you will have to render twice. First render a sequece with write object for every frame and setup the file name in a way it contains the current frame number, you can do it with an expression. Then you can set the mode to read object. Because the expression still exchanges the filename on a per frame basis, the sequence should render correctly with deformation.
haggi
 
Posts: 220
Joined: Mon Mar 20, 2006 7:04 am

Re: Binary Proxy Animation

Postby Remydrh on Fri Jun 06, 2008 4:30 pm

Hm, no I didn't. In Zap's post on his blog he made it seem as though it would write the deformations to the same file, just that the file would get larger and larger based on the object and total frame range. I don't know why it wouldn't do that anyway, it would make things easier.

Last time I tried an expression in a mental ray shader (framebuffers) to do something similar it never worked, the API apparently wouldn't allow it.
Remydrh
 
Posts: 363
Joined: Fri Dec 09, 2005 2:14 am
Location: Culver City

Re: Binary Proxy Animation

Postby haggi on Sun Jun 08, 2008 9:04 am

No, as much as I know no sequences are written into the file, only the shape definition.
MR API has noting to do with a working expression. It works as much as I know. The only problem can be that in batchrendering the exprssion is not executed some time. This sometimes happen if you dont have any connections to and from the expression. e.g. if you write something like:

setAttr -type "string" blabla.filename "thisismyfilename.1.mi";

This way maya dont have a reason to evaluate this expression because there is no direct connection. To be sure that the expression is evaluated connect something to it like:

dummyNode.tx = frame;

This you have a in an out connection and maya executes this expression.
haggi
 
Posts: 220
Joined: Mon Mar 20, 2006 7:04 am

Re: Binary Proxy Animation

Postby bart on Thu Jun 19, 2008 8:06 am

For those listening in, I thought I'd post a few tips on using mip_binaryproxy in Maya.

General concepts

1) The shader is used both to write the proxy file, and read it. So use the write switch to write it, and the turn it off to read it.

2) The geometry input takes in an instance, which is the same thing as the transform node in Maya. This instance must be known by mental ray before running the mip_binaryproxy geometry shader. So make sure to create the object/instance used for the geometry shader after the object/instance which you are trying to write to a binary proxy file.

3) The shader itself is hidden. So either you must expose it in the mentalrayCustomNodeClass.mel script, or you can create it explicitly with a mel createNode command.

Step-by-step for a single, non-deforming object

1) Create the object which you want to turn into a proxy. Note the name of its transform node. For example, pSphere1 is the transform node name of the first poly sphere one might make.

2) After that is made, create for example a cube to which we will attach the geometry shader. The geometry shader will attach to the instance, eg, pCube1.

3) Create the shader in the Hypershade if you've unhidden it, or by mel if not, eg
createNode "mip_binaryproxy";
Note that actual name of this instance of the geometry shader which it returns, such as "mip_binaryproxy1"

4) Attach this shader to the cube instance/transform node. Look in the mental ray tab of its AE, enable the geometry shader, and either drag it into the slot from the Hypershade, or type in the name you noted. This should now enable you to click the box to the right of the slot in order to see the AE for this shader.

5) In the AE for your mip_binaryproxy shader, specify a pathname for writing it. The name extension is not relevant, but I have seen Zap recommend using .mib (for mi binary) as a convention we might adopt as a user community.

6) Then, check the box for writing the file.

7) Now, render, strictly for the purpose of writing the proxy to the file. You will see your original object/instance, but not see any rendered object in the cube location. If you do, make sure you are using the mental ray renderer. (We've made this mistake multiple times when trying to do this from scratch. :) )

8) Now, check to see that there is indeed a file written where you specified it. You may also want to check its size.

9) If it is there, uncheck the box for writing the proxy.

10) Render and now you should see the proxy now wherever you place the cube.

More information on the flags control a bit later. Hint: This proxy file can be used either as a placeholder or an assembly.
bart
Site Admin
 
Posts: 1659
Joined: Sat Dec 18, 2004 9:34 am
Location: Marina Del Rey, California

Re: Binary Proxy Animation

Postby Remydrh on Thu Jun 19, 2008 2:26 pm

If it is written as an assembly what is the advantage? Since this writes just one combined object. If as an assembly can it write a collection of object like a subscene or a RIB box type of function?

We're about to render out an exceptionally dense scene with fast_occlusion and was hoping to use the proxy.
Remydrh
 
Posts: 363
Joined: Fri Dec 09, 2005 2:14 am
Location: Culver City


Return to Maya

Who is online

Users browsing this forum: No registered users and 0 guests

cron