Announcement

Collapse
No announcement yet.

ParticleVelocity: incorrect unit scale?

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

  • ParticleVelocity: incorrect unit scale?

    tyFlow returns both IParticleObjectExt interface, and ParticleObject interfaces. It seems like when PhoenixFD detects a ParticleObject interface in 3.14.00, it defaults to that even if the object also returns ParticleObject. That's fine, however I think it's interpreting the velocities returned by the ParticleVelocity function of the ParticleObject interface incorrectly....

    For example, according to the ParticleObject spec as defined in the MaxSDK "object.h", the ParticleVelocity function should return values in units per tick.

    However, if I have a scene set to 30fps, and return velocity values in units per tick in my ParticleObject interface (in tyFlow or tyCache), I don't get the correct behavior in Phoenix unless I set the motion velocity multiplier to 30. Which leads me to believe PhoenixFD is taking the values from ParticleVelocity, multiplying them by GetTicksPerFrame() and then incorrectly interpreting those values as being in per-second units, when the actual conversion should be (ParticleVelocity(i) * GetTicksPerFrame() * GetFrameRate()). This is assuming that PhoenixFD works internally in per-second units.

    Are my assumptions incorrect here? For reference, the values I return through my interface are (velocityPerFrame * (1 / GetTicksPerFrame())).
    Last edited by tysonibele; 10-09-2019, 11:53 AM.

  • #2
    Yes indeed, so far I found two places where incorrect units were used - in sources emitting from particles, and in the particle shader for Max. Let me trace it a bit more and will ping you when the fix is in the nightlies.

    Thanks a ton for the heads up! We've got the legacy where internally velocities are in voxels/sec, so this adds up too
    Svetlin Nikolov, Ex Phoenix team lead

    Comment


    • #3
      Ok good, so I'm not imagining things, heh. At least for now the option exists to crank up the motion velocity multiplier, so this isn't workflow breaking. Cheers!

      Comment


      • #4
        Oh, it's totally legit. There were 3 buggy conversions - 2 of them between the Phoenix particles and the Particle Shader which cancelled each other out but might still strike when rendering IParticleObjectExt that did not come from Phoenix, and the one in the Source. Unleashing the changes on the test scenes and in a couple of days they should be in the nightlies. Thanks again!
        Svetlin Nikolov, Ex Phoenix team lead

        Comment


        • #5
          Hey, this will be fixed in tomorrow's nightlies
          Svetlin Nikolov, Ex Phoenix team lead

          Comment


          • #6
            Lovely! Thanks!

            Comment

            Working...
            X