mzo Posted May 3, 2022 Share Posted May 3, 2022 Hi, I'm kind of stuck with something I'm trying to achieve. If anybody could point me in the right direction, that would be fantastic. I'm trying to combine two techniques in the same shot. I have an image that drives a flip simulation. Image has two colors and each color will become a different fluid that interacts/mixes with the other one. Initially, this image was still and it was easy for me to achieve that with attributesfrommap and mapping Cd to viscosity and density. Now I need the underlying image to be an animation (only the character moves, the rest is still). I got the character animation driving the particles representing its shape using the volume optical flow technique. However, I'm struggling to find a way to merge these two systems together and basically add the character movement to the fluids mixing together generated from image Cd. This is a test project folder, which includes the images to drive the sim. motionFromAnim.zip Quote Link to comment Share on other sites More sharing options...
ryew Posted May 4, 2022 Share Posted May 4, 2022 You could be overthinking it and may be able to just do what you're after in a single system. Since you're sourcing from points for all the parts you want already, try transferring the velocity of the character points to your background image points (attribute transfer or copy and blur, etc.) and/or add some custom velocities timed with the motion of the character as well to create the swirling you want (don't worry about creating a specific system itself, everything is a cheat - whatever gets you the end look is valid). Quote Link to comment Share on other sites More sharing options...
mzo Posted May 4, 2022 Author Share Posted May 4, 2022 1 hour ago, ryew said: You could be overthinking it and may be able to just do what you're after in a single system. Since you're sourcing from points for all the parts you want already, try transferring the velocity of the character points to your background image points (attribute transfer or copy and blur, etc.) and/or add some custom velocities timed with the motion of the character as well to create the swirling you want (don't worry about creating a specific system itself, everything is a cheat - whatever gets you the end look is valid). Thanks, this makes sense. I will try to add the velocity computed from the optical flow to the mixing fluid from image data and see if that works. Regarding adding custom velocities to create the swirling, etc., could you point me to some example HIP file where I can study how that works? I normally do procedural modeling in Houdini, so working with sim and velocities is something I'm a little rusty about. Quote Link to comment Share on other sites More sharing options...
ryew Posted May 5, 2022 Share Posted May 5, 2022 (edited) Try this series of videos out from HoudiniSimon, he explains things pretty well and provides some .hip files Edited May 5, 2022 by ryew Quote Link to comment Share on other sites More sharing options...
mzo Posted May 5, 2022 Author Share Posted May 5, 2022 1 hour ago, ryew said: Try this series of videos out from HoudiniSimon, he explains things pretty well and provides some .hip files That's great, thanks. I had a quick look already, and it seems very useful. Later today, I will follow it step by step to learn better. In the meantime, I have a quick question about the method you suggested yesterday. I put it together in one sim. I used volume rasterize before attribute transfer to get the velocity from the flat volume slice (originating from volume optical flow) and copied it into a 3D box filled with points representing my 2d image. It seems to work as the velocity vectors match the character, including its thickness. For the rest of the attributes (viscosity and density), I assigned them manually to the points depending on their color (I have only two colors). However, once I dive into DOP and start the sim, I disable the gravity, so I only see the velocity influence, and this changes from outside DOP. The movement inside the sim is different, and also the vectors look different. Why is this happening? Thanks Quote Link to comment Share on other sites More sharing options...
ryew Posted May 6, 2022 Share Posted May 6, 2022 At a guess, your density and viscosity settings might be dampening the input velocity - try leaving them at default values to see what effect your input velocities are having unless you specifically need to modify them; if it's still an issue, try adding a multiplier to your velocity to scale it up. If it's still the same project, feel free to upload the .hip file on its own and I'll take a look when I have a moment. Quote Link to comment Share on other sites More sharing options...
mzo Posted May 7, 2022 Author Share Posted May 7, 2022 14 hours ago, ryew said: At a guess, your density and viscosity settings might be dampening the input velocity - try leaving them at default values to see what effect your input velocities are having unless you specifically need to modify them; if it's still an issue, try adding a multiplier to your velocity to scale it up. If it's still the same project, feel free to upload the .hip file on its own and I'll take a look when I have a moment. Thanks, I tried all of those things already but had no luck so far. Here is the hip file. Please take a look when you have a minute. Thanks Anim1.hiplc Quote Link to comment Share on other sites More sharing options...
ryew Posted May 9, 2022 Share Posted May 9, 2022 The new scene didn't work for me, but here's a quick modification of the first one with viscosity and density modifications disabled; the velocities match between input and sim. motionFromAnim_mod.hiplc Quote Link to comment Share on other sites More sharing options...
mzo Posted May 12, 2022 Author Share Posted May 12, 2022 On 5/9/2022 at 10:41 AM, ryew said: The new scene didn't work for me, but here's a quick modification of the first one with viscosity and density modifications disabled; the velocities match between input and sim. motionFromAnim_mod.hiplc Thanks for this. Yes, I can see the velocity is now correct in terms of moving in the sim as in the animation. I'm trying to understand what I was doing wrong. Was there a specific step that was preventing it from working? Quote Link to comment Share on other sites More sharing options...
ryew Posted May 16, 2022 Share Posted May 16, 2022 I couldn't say; I wasn't able to run your later file and didn't try to debug it since the previous file worked and seemed enough to go by Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.