dynamoanders Posted February 20, 2012 Share Posted February 20, 2012 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 Quote Link to comment Share on other sites More sharing options...
eetu Posted February 20, 2012 Share Posted February 20, 2012 This tutorial might help with the things you need? http://www.sidefx.com/index.php?option=com_content&task=view&id=1423&Itemid=132 Quote Link to comment Share on other sites More sharing options...
Macha Posted February 20, 2012 Share Posted February 20, 2012 (edited) 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 February 20, 2012 by Macha Quote Link to comment Share on other sites More sharing options...
dynamoanders Posted February 20, 2012 Author Share Posted February 20, 2012 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. Quote Link to comment Share on other sites More sharing options...
dynamoanders Posted February 20, 2012 Author Share Posted February 20, 2012 Hello again. I tried as you guys suggested, but the pic() seems really slow (maybe I´m doing something wrong?), and I can´t get the vopsop to work. Am I doing something wrong? Sorry, really bad at vopsop... particles_or_points_from_texture_v01.hipnc Quote Link to comment Share on other sites More sharing options...
eetu Posted February 20, 2012 Share Posted February 20, 2012 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. Quote Link to comment Share on other sites More sharing options...
dynamoanders Posted February 20, 2012 Author Share Posted February 20, 2012 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 Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted February 20, 2012 Share Posted February 20, 2012 http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=24801&highlight= This file i posted shows how to get UVs in VOPSOP. UVCoords is only used in SHOPs. It gets interpolated UVs. Quote Link to comment Share on other sites More sharing options...
eetu Posted February 20, 2012 Share Posted February 20, 2012 Ohhh, I forgot to click that pesky "Attach This File" button earlier Basically, add your UVs before the VOPSOP: particles_or_points_from_texture_v02.hipnc Quote Link to comment Share on other sites More sharing options...
dynamoanders Posted February 21, 2012 Author Share Posted February 21, 2012 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 Quote Link to comment Share on other sites More sharing options...
eetu Posted February 21, 2012 Share Posted February 21, 2012 If it doesn't feel dirty, write your image sequence to disk, and use filename_$4.png for the mapping. Quote Link to comment Share on other sites More sharing options...
dynamoanders Posted February 21, 2012 Author Share Posted February 21, 2012 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 Quote Link to comment Share on other sites More sharing options...
eetu Posted February 21, 2012 Share Posted February 21, 2012 You need to make a parameter of the filename, and then put the filename expression on that parameter on the vopsop node. 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.