Jump to content

Create water droplets on moving car


salik

Recommended Posts

Hello everyone,

I apologize in advance if I had created my post in the wrong thread.

Currently I am trying to create and imitate water droplets on the front windshield of a moving car.
Wondering if anyone has any similar tutorials that I can refer to? I am quite lost on where to start...

Many thanks in advance!

Link to comment
Share on other sites

No tuts that I know, but maybe you can try a particle system (Dynamic node, with POP Object), you scatter points from a plane above, let them fall by gravity, stick to the windshield, add wind to make them move alo,g the windshield, and maybe add a force that attracts one another when they are sufficiently close (through a wrangle or pop grain maybe). Finally I would try metaballs to merge them into what would be the mesh to render... That being said, never triedthis effects :-)

Hope this helps anyway !

Link to comment
Share on other sites

Have a look at the Entagma website.

Packing the torus for distributing the raindrops using pop grain and also they have another tutorial placing droplets on a piece of geometry, a vegetable i think, which is also useful.

 

xyzdist and primuv are your friends.

Edited by nigelgardiner
thought of something else.
Link to comment
Share on other sites

Also, if your car is moving, consider doing all your simulation at the origin at first and moving the sim along with the car after. Use whatever forces to give the effect that the droplets are pushing their way around the glass, but keep the geometry static and you'll avoid a lot of collision issues, especially if the car is moving quite fast.

Link to comment
Share on other sites

4 hours ago, jamesr said:

Also, if your car is moving, consider doing all your simulation at the origin at first and moving the sim along with the car after. Use whatever forces to give the effect that the droplets are pushing their way around the glass, but keep the geometry static and you'll avoid a lot of collision issues, especially if the car is moving quite fast.

Okay.. When you mentioned keep the geometry static, do you mean to say the windshield in this case? 

14 hours ago, nigelgardiner said:

Have a look at the Entagma website.

Packing the torus for distributing the raindrops using pop grain and also they have another tutorial placing droplets on a piece of geometry, a vegetable i think, which is also useful.

 

xyzdist and primuv are your friends.

I did saw one similar but that is modelling/ replicating water droplets onto fruits for a still image output.. Not sure how I can implement that :/

Link to comment
Share on other sites

On 3/19/2018 at 3:13 PM, jamesr said:

Yup! See if you can keep the windshield stabilized at the origin, then crawl the droplets over it how you like, then put the droplets back to world space with the animated car.

So I was trying out the Procedural Modelling of water droplets in Entagma website. I am getting into issues where I am unable to get the up vector (the one highlighted in Yellow around 14:54). Instead of getting any lines, I am getting yellow values instead in which almost all of the vectors have at least 1 or 2 values either (x or z or both) are in the negative range.

Initially I have thought it could be due to the windshield that I had in my scene where it is extruded with a thickness and so, the points could be generated "behind". So I did another round of blasting such that I am only left with the "front" of the windshield but still it is giving me the same problem. FYI I did use a timeshift node so that the windshield animation is not in effect as I wanted to get a static version of the droplets.

Link to comment
Share on other sites

7 minutes ago, salik said:

Instead of getting any lines, I am getting yellow values instead in which almost all of the vectors have at least 1 or 2 values either (x or z or both) are in the negative range.

You mean at each point yellow text numbers are showing up instead of vector lines? When you create the visualizer, make sure to change the marker "style" from "text" to "vector" 

Link to comment
Share on other sites

1 hour ago, jamesr said:

You mean at each point yellow text numbers are showing up instead of vector lines? When you create the visualizer, make sure to change the marker "style" from "text" to "vector" 

Ah my bad! You are right indeed.

In this case, for the windshield geo that I have mentioned earlier, should I leave it as it is or cull out everything with the exception of the front? 
I tried using the whole piece, it also seems to have work, however the vector direction is different for all of them

On 3/19/2018 at 3:13 PM, jamesr said:

Yup! See if you can keep the windshield stabilized at the origin, then crawl the droplets over it how you like, then put the droplets back to world space with the animated car.

Wondering if you can kindly explain this in more details for me? At the moment I am able to replicate the setup as seen in the entagma tutorial, and I am still need quite some help in getting these particles to be animated..

Sorry for all the step-by-step question/ guidance as I am indeed in need of it

Edited by salik
Link to comment
Share on other sites

Quote

should I leave it as it is or cull out everything with the exception of the front? 

You should definitely leave it with some thickness, or else you won't be able to generate an accurate SDF for collisions. 

Quote

however the vector direction is different for all of them

Not quite sure what you mean by this. Do you have a a screenshot maybe?

Quote

Wondering if you can kindly explain this in more details for me?

Sure I can try! I haven't seen the entagma droplets tut all the way though, but from what I remember/saw, the droplets are static right? So maybe the exact setup won't work for your whole effect. But, you could still use their method as a base layer for "static" droplets, ones that don't really move like the "hero" droplets. 

Maybe you have seen this Sucker Punch Intro breakdown. Not all of the droplets are moving. The ones that are leave behind a little trail. 

Here's a couple of tutorials/posts I think you will find very helpful for creating those little trails.

http://www.toadstorm.com/blog/?p=465

 

What I mean by keeping the windshield stabilized at the origin, is to basically do all your simming on a static mesh, that sits near {0,0,0} in the world. Get the look of the trails and motion down there.

I imagine the car in your scene could possibly be moving a great distance, and with some speed. You can calculate and store the transformation matrix of your animated windshield piece. When you invert that transformation matrix, the windshield will be locked down at the origin.  With the windshield not moving at the origin, the collision geo you make for the windshield can be static - no need to cache out geometry for every frame (plus probably subframes if the car was moving fast enough!). You only have to deal with the forces you introduce. Once you're happy with the sim, you can apply the transformation matrix you stored earlier to all those droplets, and they will then transform around with the car. I can't remember the name, but there is a really good "math in houdini" series out there somewhere which goes into great detail about transformation matrices and going from world space to local space, and back to world again. 

 

  • Like 1
Link to comment
Share on other sites

Many thanks for getting back to me, James, but it seems that I am getting myself confused or so. Either way, I have managed to do a first pass but met with some issues (please see attached)

So after some digging, this is the best water droplets effect I can get.
As I am pretty much nowhere sure if my setup is considered good or not, please do give me any feedback you may have.

In this scene setup of mine, I notice an issue - if you scrub/ let the sim runs a couple of frames forward/ Frame 20, I realize that I am getting:
* points coming from the edges
* life expectancy in my popnet, too short - it  does not seems to last long on the windshield, too long - it either accumulates too much/ it seems almost like an endless flow...
* Also the output of the mesh, looks quite blobby?
* Lastly, I can't seem to make my 'splash' any bigger. If I scale the sphere any bigger, the result of DW_OpenVDBCombine2 node will leave some mesh behind the windshield, is there a better approach to this?

 

Guess I am indeed too ambitious. Planning to get the static part rectified before moving on.

 

Greatly appreciate for any feedback!

 

waterDroplets_test.hip

Edited by salik
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...