Announcement

Collapse
No announcement yet.

Render whitewater/foam in Vray for Houdini - HELP

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

  • Render whitewater/foam in Vray for Houdini - HELP

    Hi,

    I have the whitewater simulation which gave me particles. How should i go about rendering it as foam/whitewater?
    I have tried using VolumeFoam as well as other volume materials but no luck. I am using the latest nightly build (8th feb '22).

    I either get spheres in place of particles or blank. Is there a document as to how I can use the whitewater particles to render in v-ray.

    Do i have to rasterize the particles to a volume using density?

    Thanks,
    S.

  • #2
    Hey suraj_agarwal ,

    Rasterizing to VDBs and caching those to disk is the most straightforward way and what people tend to do. This means however that you get no reflections for your foam - for the moment, we don't have an equivalent to Mantra's workflow with the gradient being used to drive the reflections.
    Another option that will give you reflections is the Foam shader - it works with particles so if you go that route, there is no need to rasterize - simply cache the whitewater particles to alembics and apply the Foam material to the cache.

    Hope that helps!
    gosho.genchev@chaosgroup.com

    Comment


    • #3
      Hey Gosho.Genchev ,

      Thanks, that helps a lot! I tried the foam material method.

      Couple queries : How do I use the particle age attribute from my simulation? I understand that there is a node called V-ray userFloat and userColor, but where is it supposed to be plugged in the material for it to take the age attribute? There is an option called size multiplier by particle age option but it doesn't seem to effect anything.

      Do I have to "fit" the age attribute to a certain range for it work?

      P.S. : My whitewater cache is in bgeo.sc, does it have to be in abc in order to detect attributes?

      Thanks
      Click image for larger version

Name:	foamMaterial.JPG
Views:	808
Size:	26.9 KB
ID:	1140007

      Attached Files

      Comment


      • #4
        If you could share your .hip file it'll be much easier to help.
        V-Ray For Houdini | V-Ray Hydra Delegate | VRayScene
        andrei.izrantcev@chaos.com
        Support Request

        Comment


        • #5
          Hey bdancer ,

          I am unable to attach a sample file as an error occurs saying that I cannot upload .hiplc files.

          I have sent you a private message with a drive link to the file, please check!

          Looking forward to your reply.

          S.

          Comment


          • #6
            bdancer were you able to find the source of the problem?

            Comment


            • #7
              Hey suraj_agarwal ,

              I just checked your scene and indeed, the option in question would not work by default. We would have to do a fair bit of changes to make it work, and ultimately - I think it won't do what you expect it to do. From the Foam shader documentation:

              Size Multiplier by Particle Age – When enabled, animation of the Size Multiplier parameter is evaluated individually for each particle. The Age channel of individual particles is treated as if it is the Timeline itself, and animation applied to the Size Multiplier is evaluated over it. Therefore, the Size Multiplier animation is applied to each particle, starting at its time of birth. For example, animating the Size Multiplier to go from 1 to 0 over Timeline frames 0 to 30 will individually scale down each particle during the first 30 frames of its birth. Conversely, when this option is disabled, the Size Multiplier animation treats the particles as a collection of points, and scales them simultaneously, regardless of their current age. For example, animating the Size Multiplier to go from 1 to 0 over Timeline frames 0 to 30 will simultaneously scale all particles in the simulation over the first 30 Timeline frames, and none will be visible on frame 31.
              This means that you would need to animate the Size Multiplier parameter on the shader itself, in addition to having the age parameter exported for rendering.

              I'll say outright that I think there's a much simpler way to handle this in Houdini.

              By default, you get the normalized age from DOPs when doing particles simulations. Even if you don't have it, you could easily calculate it as nage = age/life. You could then use this as a multiplier for the pscale attribute, essentially giving you the same result, with the added bonus that you could easily preview this in the viewport.

              Here's an example scene - LINK.

              Click image for larger version  Name:	1139852.png Views:	0 Size:	695.3 KB ID:	1141842


              A couple of side notes - it would be better to use Alembics for rendering if you plan to send to the farm.

              Additionally, we'll probably hide this toggle since, as demostrated, there's a much more straightforward way to do this in Houdini itself.

              Hope that helps!
              gosho.genchev@chaosgroup.com

              Comment


              • #8
                Oh great! pscale attribute works fine. Thanks for the info! This helps a lot!
                Is it possible to to retain attributes from vrmesh as I would from alembics? I would love to be able to use vrmesh as it's much more kind on the ram and storage

                Comment


                • #9
                  > Is it possible to to retain attributes from vrmesh as I would from alembics?

                  Currently no.
                  V-Ray For Houdini | V-Ray Hydra Delegate | VRayScene
                  andrei.izrantcev@chaos.com
                  Support Request

                  Comment

                  Working...
                  X