Jump to content

Control particles from texture?


dynamoanders

Recommended Posts

Hey guys.

I´m stuck in something that feels simple...

I wonder how I control particles from a texture?

I have the setup complete already (learning a lot from Peter Claes excellent "Technical Effects", a dvd I really can recommend!).

Is there some way I can get the information from cops? Or directly in a point sop?

Like an op: path?

I´ve tried different stuff, but I am not just getting there...

I´ve been reading the help too, but maybe I´m not searching with the right words?

Does anyone have any suggestions?

Thanks

//Anders

Link to comment
Share on other sites

Hey Anders, try the colormap vopsop. You can read in your texture and use it to, say, delete unwanted areas, or scatter points. Try making an attribute called area, promote it to primitive and use for emitting in a popnet.

If you need a path you can always plug it into he second slot and use op :'opinputpath(".",1)' to access it. I find that very convenient. Be careful when referring to a cop context as that does not work on farms, when ifds are used for rendering.

There is an hscript expression for looking up maps but there was a bug in H11 versions that made it superslow. Not sure if that's been fixed.

Edited by Macha
Link to comment
Share on other sites

Hi eetu and Macha!

Thanks a lot for your answers!

I´ve followed a bunch of your posts, and a whole lot of your stuff are really impressive :-).

I think the vopsop idea would work the best, though both are working.

I try to stay away from cop as much as possible cause it feels like it´s slowing it down, but vopsops are still scary, but I guess I have to jump in with both feet...

Thank you for the help.

Link to comment
Share on other sites

Here's a couple of fixes (nodes in red).

For the pop version, it's better to put the colors to your emission source geometry, so they only need to be looked up when a particle is born, not every frame after the popnet.

For the vopsop, you need to have U and V for the texture lookup to work. In this simple case you could've used scaled global x/z coordinates for u and v, but generally it's better to have them as proper attributes.

Link to comment
Share on other sites

Hi eetu.

Thanks for your tips!

I did what you suggested, and adding the color before the pop is really a good idea :-).

But I don´t understand how to add the proper UV:s in the vopsop? When I search the help for UV and vex (and vop), I get an suggestion for a UV Coords node, but it doesn´t seem to exist in the vopsop??

Also, I wanted to have an animated texture, and that makes it superslow when using the pointsop with the pic() expression.

Thanks

Anders

particles_or_points_from_texture_v02.hipnc

Link to comment
Share on other sites

Hey eetu and Erik_JE.

Thanks for all your help. It definatly got it working :-).

Now the only problem is getting it to work with an animated texture, he he.

I will post here if I find a solution (I think one way is to do it with a foreach node, but they are not multithreaded yet).

Thank you

//Anders

Link to comment
Share on other sites

Hello again eetu.

I tried that already, but I get an error when doing it in the vopsop "cannot have channels which depend on time".

It´s working when I reference it in the pointsop before the popnet, but then it gets really slow..

Here´s the file

particles_or_points_from_texture_v03.hipnc

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...