Jesper Rahlff Posted December 17, 2017 Share Posted December 17, 2017 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 Quote Link to comment Share on other sites More sharing options...
Noobini Posted December 17, 2017 Share Posted December 17, 2017 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... Quote Link to comment Share on other sites More sharing options...
Gorrod Posted December 17, 2017 Share Posted December 17, 2017 (edited) 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 December 17, 2017 by Gorrod Quote Link to comment Share on other sites More sharing options...
mestela Posted December 17, 2017 Share Posted December 17, 2017 minpos is my new favourite lazy way. pop_minpos.hipnc 2 Quote Link to comment Share on other sites More sharing options...
Noobini Posted December 17, 2017 Share Posted December 17, 2017 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) Quote Link to comment Share on other sites More sharing options...
mestela Posted December 17, 2017 Share Posted December 17, 2017 *yawn* Quote Link to comment Share on other sites More sharing options...
Noobini Posted December 17, 2017 Share Posted December 17, 2017 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... Quote Link to comment Share on other sites More sharing options...
mestela Posted December 18, 2017 Share Posted December 18, 2017 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. Quote Link to comment Share on other sites More sharing options...
mestela Posted December 18, 2017 Share Posted December 18, 2017 Less lazy attempt: pop_minpos_align_pig.hipnc 1 1 Quote Link to comment Share on other sites More sharing options...
Noobini Posted December 18, 2017 Share Posted December 18, 2017 ahh...of course...attributetransfer...instant gratification...(disappointed I didn't think of that meself!!!) Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted December 18, 2017 Author Share Posted December 18, 2017 16 hours ago, mestela said: minpos is my new favourite lazy way. pop_minpos.hipnc 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. Quote Link to comment Share on other sites More sharing options...
mestela Posted December 18, 2017 Share Posted December 18, 2017 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 Quote Link to comment Share on other sites More sharing options...
Farmfield Posted December 18, 2017 Share Posted December 18, 2017 LOL; what? The minpos works just fine on an animated object... animated_minpos.hiplc Quote Link to comment Share on other sites More sharing options...
Farmfield Posted December 18, 2017 Share Posted December 18, 2017 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.... 1 Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted December 18, 2017 Author Share Posted December 18, 2017 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 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 Quote Link to comment Share on other sites More sharing options...
sebkaine Posted December 18, 2017 Share Posted December 18, 2017 (edited) 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 December 19, 2017 by sebkaine Quote Link to comment Share on other sites More sharing options...
Pazuzu Posted December 19, 2017 Share Posted December 19, 2017 (edited) 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 December 19, 2017 by Pazuzu 1 Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted December 19, 2017 Author Share Posted December 19, 2017 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 1 Quote Link to comment Share on other sites More sharing options...
mestela Posted December 19, 2017 Share Posted December 19, 2017 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 Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted December 19, 2017 Author Share Posted December 19, 2017 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 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). 1 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.