This is on Maya2012 SAP (includes SP1), VRay nightly 2.15.01 build 17175 (22/10/2011), Windows Seven 64bit.
Motion blur works all right when we use poly objects instanced on nParticles, like this :
nParticle-->Instancer (replacement)
Problems start (all objects disappear) when we use an expression to drive this :
ParticleShape-->Instancer (Geometry Replacement)-->Object Index.
The idea is to have a different Object Index for each frame and each particle.
It’s the usual way of dealing with crowds in maya (without Massive).
I guess VRay doesn’t like to have an object changing from frame to frame, but it shouldn’t care, as all those objects have the same structure, point count, faces.
Only differences are the point positions.
I successfully used this method with other renderers (and Motion Blur worked), so maybe there is a way to make it work in VRay.
Can you post a scene or send one to vraymaya@chaosgroup.com so that we can take a look? It should work, but perhaps something is lost in the translation…
This scene contains 3 poly objects instanced on particles.
On the nParticleShape1 , we have this attribute set : Instancer-->ObjectIndex: objectID
And this expression is written on the particle object :
objectID = fmod(frame + particleId, 3);
Render frame 5.
You get the bugged behaviour seen on the picture (almost no instance is visible, only the ones that were created at the current frame).
To make it work, replace the particle expression by this one :
objectID = fmod(particleId, 3);
Render again, you get the other picture (with lots of motion blured instances)
Not sure if it’s related, we see this while rendering :
// Warning: kParticleSamplerInfo //
Yes, it will work fine if you increase the number of geometry samples for motion blur, or else set the motion blur interval to be within a single frame, f.e. if you set the interval center to 0.5 and the duration to something less than 1.0 - the idea is to keep the shape of the objects the same within the motion blur frame.
Thanks Vlado.
I have tried this workaround, and it doesn’t seem to work in all cases :
-In a simple scene (as the one I sent), without particle cache : Works.
-In a simple scene (as the one I sent), with particle cache : Does not work.
-In a real production scene, with or without particle cache : Does not work.
Do you think the fix will be available soon ?
EDIT : maybe my production scene doesn’t work in any case, because the objects I instanciate on particles are Alembic cached objects.
I understand the need for an example scene.
But the one I already provided shows that you can’t use a particle cache :
-In a simple scene (as the one I sent), without particle cache : Works.
-In a simple scene (as the one I sent), with particle cache : Does not work.
When rendering on a farm, you need to have a particles cache (or each render-node would have different dynamic results).
So, we need a cache, but it kills the Motion Blur, so we can’t render…
Ok, you win
I sent a cut-down production scene at vraymaya@chaosgroup.com (less than 2 MBytes zip file)
Here are the files included (Maya2012 Subscription Advantage Pack) :
-cache\alembic\troop_test_06.abc
It’s the alembic file.
Because of a maya bug, you need to place it as expected by the maya scene (in your project “cache” directory), or maya may crash.
-scenes\testBugMotionBlur_01.mb
It’s the scene that bugs when trying to render (Motion Blur doesn’t work, objects are not even rendered).
Interval center is 0.5 and the duration is 0.9
If you turn Motion blur Off you will see several fish swimming.
Alembic nodes are under the “troops” group.
If you want to select the “instancer1” node, be sure to close the Attribute Editor before (or switch to Channel Box), as there are hundreds of instances, maya would slow down.
I used this mel command to create the alembic file (from another scene) :
AbcExport -j “-fr 1 3 -uvWrite -root |pSphere1 -file D:/thePathToYourAlembicFile.abc”;
I used this mel command to import the alembic file :
AbcImport -mode import “D:/thePathToYourAlembicFile.abc”;
I have no luck with openning your scene. Maya constantly crashes, even if I put the cache directory in the project directory. If I try to import your alembic file from the menu, the dialog strarts from the very same directory and there is not problem in this way. I can even load the scene I’ve made again. Do you have more information about this crash? Do I have to do something else? You can try to send us an ASCII scene.
I have checked, it seems maya displays the right relative path in the Attribute editor of Alembic nodes :
cache\alembic\troop_test_06.abc
But when I try a getAttr, I see the full path to our server, which obviously doesn’t exist on your side.
Please try this MEL script :
int $first = 1;
int $last = 399;
int $cur = $first;
while($cur <= $last)
{
setAttr -type “string” (“troop_test_06_AlembicNode” + $cur + “.abc_File”) “cache/alembic/troop_test_06.abc”;
$cur++;
}
It will set the path to the relative path.
This will work if the Alembic file is located here (I think you already have it right) :
YourProjectMainDirectoy\cache\alembic\troop_test_06.abc
A month ago I sent to Autodesk the steps (see below) to see this maya crash (Case 06772124), after several tests they reproduced it, so they logged this maya bug as MAYA-6573.
-Export a mesh to some foo.abc file.
-Import it.
-Save the scene.
-Rename the foo.abc file to something else.
-Load the scene in maya, it crashes