CINEVERSITY

    Maxon Logo
    • Login
    • Search
    • Recent
    • Popular
    • Users
    • Groups

    Math modifer not affecting liquid particles consistently.

    Question & Answers
    2
    2
    43
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      atomician last edited by

      liquid flow dynamics v2.c4d

      I'm having trouble getting the math modifier to work as expected, as per attached file. I simply want to make liquid particles go up or down based on their color.

      This is what I've done:

      • Gravity set to zero
      • Created a liquid emitter that spawns a particles in a capsule shape.
      • Particle color is set to red: rgb(255,0,0)
      • I then apply a Math Modifier to change the velocity of particles based on color:
        • Target property is Velocity
        • Target channel is XYZ (have also experimented with just Y)
        • Source is the color property, channel R
        • Operation is Add
        • Multiplier is 0, 100, 0

      I'm presuming that the R channel value of a solid red particle will be 255?

      So as I understand it, this means the red particles would have their upwards velocity increased (every substep? - currently set to 20) according to this formula:

      velocity = velocity + color.r * v
      

      So we start off with zero velocity so I assume the formula looks like this:

      substep 1:
      velocity = 0 + 255*100  // final velocity is 25500 for Y axis
      
      substep 2: 
      velocity = 25500 + 255 *100 // final velocity is 51000
      
      etc
      

      So the particles should shoot up out of sight right? But instead what happens is they float slowly up to the origin of the project and then settle down and stop moving in the centre of the project. Please can I get some help as to why?

      1 Reply Last reply Reply Quote
      • Dr. Sassi
        Dr. Sassi last edited by

        Hi atomician

        The add function would add per frame that amount to the velocity. Which could go to very extreme values, if applied to non non-fluid. Fluids work similar (to my understanding) like other dynamic options, they take over, like MoGraph has very little option to change the position of a clone (like overwriting the dynamically defined position) Test your setup with a Basic Emitter, there is works.
        .

        The color that is "red" in sRGB to "100%" is way less than 1.0; it is around 0.42. If you use ACES 2065 with its much larger color space, then a 100% red will give 1.0 for the color. Anything else will result in something smaller than 1.0. (0-255 are not numbers used internally; it is an option to allow previous integer-based color "thinking" to continue.)
        .

        In the moment a fluid is working, the overwrite Velocity change is, as far as I'm aware, not an option. There is a transition time "Ease In" where some externally introduced changes can take place, as your setup influences the first frame, and the next less, and typically stops completely at frame four. Fluid needs then Forces to change. This short little period takes you set up, and it is a smaller number, based on ~0.42 instead of 255
        .

        To get an idea of what can be changed, look at the
        Simulation> Modifier> Liquid> Liquify
        has to offer in the Set Property mode.
        https://help.maxon.net/c4d/2025/en-us/Default.htm#html/OFPLIQUIFY-FP_LIQUIFY_GROUP.html#FP_LIQUIFY_MODE

        My best wishes for your explorations

        Dr. Sassi Sassmannshausen Ph.D.
        Senior Trainer, Maxon Master Trainer, L&D - Strategist
        Cinema 4D mentor since 2004, Member of VES, DCS.

        1 Reply Last reply Reply Quote
        • First post
          Last post