Announcement

Collapse
No announcement yet.

Objects instanced on particles have no Motion Blur

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Objects instanced on particles have no Motion Blur

    Hi,

    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.

    Any idea ?

    Thanks.

  • #2
    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...

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      Hello,

      I have sent a simple scene to vraymaya@chaosgroup.com

      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).
      Click image for larger version

Name:	blurBugs.jpeg
Views:	1
Size:	7.0 KB
ID:	844629

      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)
      Click image for larger version

Name:	blurWorks.jpeg
Views:	1
Size:	12.4 KB
ID:	844630


      Not sure if it's related, we see this while rendering :
      // Warning: kParticleSamplerInfo //


      Thanks !
      Last edited by alainfx; 02-11-2011, 03:32 AM.

      Comment


      • #4
        Have you received my maya scene ?
        Do you see the same problem ?

        Thanks !

        Comment


        • #5
          Hi, is there something I could do to help fix this ?
          Thanks.

          Comment


          • #6
            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.

            I've made a note to fix this anyways.

            Best regards,
            Vlado
            I only act like I know everything, Rogers.

            Comment


            • #7
              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.

              Comment


              • #8
                In recent nightly builds, I see this in the Release notes :
                [feature request] Ability to use vertex velocity vectors for motion blur in Maya 2012 and later - resolved.

                Is it somewhat related to my problem ? (objects instanced on particles )
                Thanks.

                Comment


                • #9
                  Originally posted by alainfx View Post
                  -In a real production scene, with or without particle cache : Does not work.
                  Then I will need an example where I can reproduce this.

                  Do you think the fix will be available soon?
                  It depends on the above

                  Best regards,
                  Vlado
                  I only act like I know everything, Rogers.

                  Comment


                  • #10
                    Originally posted by alainfx View Post
                    In recent nightly builds, I see this in the Release notes :
                    [feature request] Ability to use vertex velocity vectors for motion blur in Maya 2012 and later - resolved.

                    Is it somewhat related to my problem ? (objects instanced on particles )
                    Thanks.
                    It could be, if you find a way to generate the velocity information for your objects and store it into a vertex color set.

                    Best regards,
                    Vlado
                    I only act like I know everything, Rogers.

                    Comment


                    • #11
                      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...

                      Comment


                      • #12
                        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";

                        Cheers.
                        Last edited by alainfx; 02-12-2011, 06:11 AM.

                        Comment


                        • #13
                          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.
                          V-Ray/PhoenixFD for Maya developer

                          Comment


                          • #14
                            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_0 6.abc

                            Comment


                            • #15
                              We can't open the scene at all (Maya crashes), so there is no way to run the script.

                              Best regards,
                              Vlado
                              I only act like I know everything, Rogers.

                              Comment

                              Working...
                              X