Announcement

Collapse
No announcement yet.

RGB change on collision

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

  • RGB change on collision

    I thought this would be simple to do, but it's proving rather difficult to get to work. I am trying to start off with one color of liquid and when it collides with an object, to change it's color to that object or RGB swatch. I haven't had much luck, and have tried the Volume Brush/ RGB emitter trick here https://docs.chaosgroup.com/display/...rceinBrushmode, even though it's for smoke. I'm exporting RGB on my grid and particle channels. . I can get my liquid to mix if I have 2 emitters and they start as 2 different colors, but I can't seem to change it just with collisions or by picking up another color.

  • #2
    Hey,

    For the liquids, check Step 5 of the tutorial - using the Mapper method. Here is the link to the section - https://docs.chaosgroup.com/display/...istanceTexture

    Cheers,
    Georgi Zhekov
    Phoenix Product Manager
    Chaos

    Comment


    • #3
      AAaah, thanks! That tutorial was such a beast I didn't make it all the way down. Would be nice to maybe have a bit more distinction with how to do the techniques in liquid instead of all smoke. But this way was easy and made sense

      Comment


      • #4
        Hmm, it should work exactly the same for liquids and smoke. Can you share what issues you met, so we can improve the documentation?

        Cheers!
        Svetlin Nikolov, Ex Phoenix team lead

        Comment


        • #5
          Ok, when I get some time I'll try to go through some of the sections using liquids and see what happens...

          Comment


          • #6
            I went through the tutorial and all the steps seem to work except I have issues with passing through an object (Chapter 4). Even with using smoke, my box that is supposed to change the color creates colored cells before the smoke passes through and changes. Using liquid I can't get it to be effected at all by passing through the box. (DistanceTexture steps work correctly though). I've attached the scene so you can take a look... I'm on 3ds Max 2018 and Phoenix 3.13. I was also wondering why I needed to set my diffuse color in the material to black otherwise the default gray washes out the color in my liquid?
            Attached Files
            Last edited by japetus; 15-04-2019, 12:09 PM.

            Comment


            • #7
              Hey,

              The method with the brush source will work only for the fire/smoke simulation unfortunately. For the liquids you will have to use the Mapper method.

              As for the issues you're having with colored cells - make sure you have enough grid resolution. Your scene is really low res. Another thing you should note is that you're currently observing only the RGB channel but in the real case, you would use the smoke and just use the RGB for the shading - so if you turn on your GPU preview and then set the color of the smoke to be based on the RGB it should look a lot better.

              As for the diffuse color, currently the Alpha of the Grid texture is accounted for as well, so if you put a color correction node after the Phoenix texture and there set the Alpha to 1 it should behave as you expect. We'll take a note to look into changing that to reflect what other textures do.

              Thank you,
              Georgi Zhekov
              Phoenix Product Manager
              Chaos

              Comment


              • #8
                Thanks for clarifying that stuff! Nice to know about using a cc node to get the alpha correct...

                Comment


                • #9
                  Hey, thanks, going to add an option to the grid tex that controls whether the Alpha is 1 or is the intensity of the RGB color. Right now it behaves just like Maya's "Alpha is Luminance". Indeed using a brush source to output rgb into the liquid solver can't color the fluid like in the fire/smoke solver because there are not liquid particles underneath.

                  Cheers!
                  Svetlin Nikolov, Ex Phoenix team lead

                  Comment


                  • #10
                    Just checking in here...i'm doing another project where an object with a texture hits the liquid and has to color the liquid from white to another color. Still only way to do that is the mapper method?

                    Comment

                    Working...
                    X