Jump to content

Recommended Posts

Greetings to the best forum on the web :)

I am struggling a little with wrapping my head around the xyzdist() and primuv() functions in vex.

I have attached a scene file that holds a dopnet with some points created on frame 1. I would like those points to stick to the geometry coming into the second input on the dopnet.

any suggestions to how this could be done is appreciated. I am in particular interested in the usage of the xyzdist() and primuv() solution, however other methods is also encouraged!

should there be some people that wanted to "show off" a little vop magic that is cool too.

looking to learn so hit me with everything you got.

 

All in all a simple task but good fun.

 

Thanks for playing :)

Cheers

particles_on surface.hiplc

Share this post


Link to post
Share on other sites

one way.........I'm sure entagma has done this with Packing the Torus tutorial where the things must stick to the surface of the torus as they jostle about...

Share this post


Link to post
Share on other sites

Here's a Video with a few techniques of sticking Particles to surfaces, the file included should be helpful I think.

At around 2:35 is what you're looking for with a quick usage of xyzdist and primuv.

sticking_particles.hipnc

Edited by Gorrod

Share this post


Link to post
Share on other sites
9 hours ago, mestela said:

minpos is my new favourite lazy way.

 

pop_minpos.hipnc

not happy with you being lazy Matt, shouldn't the Push use @N instead ? (in case of non-spherical emitters)

Share this post


Link to post
Share on other sites

fair enough...thought I'd ask coz I don't know what happens when thing come back from popnet, is all. I'll just stab things in the dark then...FWIW, I did try N, and it looks wrong compared to P...so..have to dig...

Share this post


Link to post
Share on other sites

Heh, I was taking at dig at my lazy self, not your question. :)

You're right, pushing along @N should work, curious that it doesn't. It was more to do with how the sprite display sits right on the surface, so they'd clip, this was a cheap fix. If this were a Proper Solution, I'd instance real geo that was properly offset away from the origin along z, so they roll along the surface, or use a peaked version of the geo for the sim, and non-peaked for the merge at the end.

 

Share this post


Link to post
Share on other sites

ahh...of course...attributetransfer...instant gratification...(disappointed I didn't think of that meself!!!)

Share this post


Link to post
Share on other sites
16 hours ago, mestela said:

minpos is my new favourite lazy way.

 

pop_minpos.hipnc

Pop_minpos_capture.gif.73e02a0add4c3477af0ddcad07bdd73e.gif

This is cool. However with the minpos the position does not stick on the sphere if the sphere was animated. I am looking for a dop way of doing a scatter -> attrib interpolate to keep the points at the same spot on the geometry.

Share this post


Link to post
Share on other sites

Oh, ok, I think I understand the perceived problem, and then I'm with Matt, it's really nice to be able to set that up on a static object and then apply the animation on tip - of course depends on what you want to do....

 

  • Like 1

Share this post


Link to post
Share on other sites
13 hours ago, mestela said:

How accurate do you need to be? Point deform works well if your standards are low (and still works pretty well if your standards are higher than that, within reason)

pop_minpos_align_pig_pointdeform.hipnc

pig_surface_pops_deform.gif.ef3537667240c6d6d5de59ee6b779a7f.gif

 

It does not have to be 100 percent accurate  the problem with doing it with a pointdeform (or any post sim solution I could come up with), is that I am not getting the animated  geometry velocity as an effector on the particles (when  desired).. Let me explain a littte better:

- first step is to get the particles  to stick to a surface. (scatter ---> attrib interpolate, or point deform as in your example).

- second step is to get some animation on the particles (can still be done in sops as per your example).

- third step is to release the particles from  the surface having them  inheriting the velocity from the animated object (this is where I think dops is requered rather than sops, which is why I want step one and two to be in dops as well)

- fourth step is to not have all the particles exist one frame one, but get born over time, pickup their animation, and then based on some attribute created in step 3 get released and get velocity from geometry animation.

 

I hope this clarifies a little more what I am trying to do.

I appreciate every ones time so far.

 

Cheers

 

 

Share this post


Link to post
Share on other sites

I can't open your hip cause i have no access to H now but i'm curious :

Why do you guys prefer to use either

- primuv() / xyzdist()

- or min pos ?

Instead of the classical sdf and volumegradient() / volumesample() path ?

- inject a non divergent noise with curl noise for ex

- stick the pop to surface with the distance to sdf

Sound like a good option too ?

What are the advantage of other methods in this scenario ?

Thanks for your lights !

Cheers 

E

EDIT:

here is a test with sdf method.

i also love Matt technics didn't know this one ... pbd stuff looks really cool.

 

 

 

goal_sdf.hipnc

Edited by sebkaine

Share this post


Link to post
Share on other sites
On 12/17/2017 at 2:29 AM, Jesper Rahlff said:

Greetings to the best forum on the web :)

I am struggling a little with wrapping my head around the xyzdist() and primuv() functions in vex.

I have attached a scene file that holds a dopnet with some points created on frame 1. I would like those points to stick to the geometry coming into the second input on the dopnet.

any suggestions to how this could be done is appreciated. I am in particular interested in the usage of the xyzdist() and primuv() solution, however other methods is also encouraged!

should there be some people that wanted to "show off" a little vop magic that is cool too.

looking to learn so hit me with everything you got.

 

All in all a simple task but good fun.

 

Thanks for playing :)

Cheers

particles_on surface.hiplc

This method uses the function you want to learn about it! And the nice thing is that is very simple to implement. Of course you need also to implement the goal using forces or modifying directly the position to attract to the surface plus this, and because we are saving the delta, all points will always stick to the rest sampled position.

Cheers!

Alejandro

particles_on surface_aeb.hiplc

 

Edited by Pazuzu
  • Like 1

Share this post


Link to post
Share on other sites

Thanks everyone for your contributions. You guys all have a different but clever solution.

I setup an example myself as well, and this is what I came up with. 99% of the magic happens in the POP network with just a few lines of vex. This setup is very simple but it still have collision with moving and static particles on the surface. (thanks popgrains!).

 

anyway let me know what you think :)

 

@mestela you should consider adding this topic to your Wiki if it does not already exist. this opens up some really cool possibilities for advanced FXs.

@Farmfield Thanks for sharing your RnD adventure and making the hip files available! you rock.

 

 

 

particles_on surface_dopsolution.hiplc

  • Like 1

Share this post


Link to post
Share on other sites
13 hours ago, mestela said:

There already was a section, I've been cribbing from my own notes to contribute to this thread. :)

http://www.tokeru.com/cgwiki/index.php?title=HoudiniDops#Pop_stick_to_surface

 

 

Awesome! I should have looked there first before starting this thread then :P I just couldn't find anything on the subject.. maybe I skimmed through your site to fast for this one.

Thanks for the wiki man. It is really the best ressource out there (maybe except for odforce).

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×