DaJuice Posted April 9, 2004 Share Posted April 9, 2004 Hey all. I have some terrain over which I want to scatter some stones/gravel/pebbles and I figured the best way would be to go with particles. The problem I'm having is with birthing the particles in a manner that works well for this example. It would be ideal if I could spawn a certain number of particles all in the first frame and then stop spawning altogether, but I don't know if something like that is possible. Any tips, or maybe suggestions for other approaches? Quote Link to comment Share on other sites More sharing options...
Stremik Posted April 10, 2004 Share Posted April 10, 2004 If your terrain is all like hills and valleys, would it make sence to turn those rocks in to rigid bodies and let them settle where the graivity brings them? Give them preroll time of mybe a hundreed frames or so, raise them above the surface and then drop them. Quote Link to comment Share on other sites More sharing options...
aracid Posted April 10, 2004 Share Posted April 10, 2004 Hey DaJuice If i were too approach that problem, i would go with the particle system, just as u suggested. when u bring the Surface or terrain into ur Source POP, as the source of ur Particles, i would set the Emission Type to surface random. impulse rate too how many rocks and stuff u would like to have on ur surface and your impulse actvation (which is a boolean), so u can have a little expression like $F < 2, which should be true for ur first frame. (being 1) so based on ur impulse rate, u should have a burst of particles on ur surface before frame 2. set ur constant rate to 0 and const activation to 0 too. your life expectancy should be quite long, depending how long u want your rocks and stuff to stay around but because u have no constant rate, that shouldnt matter much anyways. so set it high. (ie 1000) then go back to SOP's and setup a COPY SOP below ur selection of stones/gravel/pebbles. also make a SELECT SOP, then pipe the select into ur copy SOP(left imput), under ur copy SOP, theres a little button called Stamp inputs. thats where u can setup variables that apply to individual points (on a PER point basis that can be called anywhere in ur network.) so under the variable tab 1, create a variable called "randomRock" (exclude the quotation marks) then under the param entry, u can say ie "$PT % 5" (exclude the quotation marks) $PT being ur point number, and 5 is just a number i picked, change that to how many items ur have piped into ur select SOP - that expression should just give you an even distribution of the objects piped into ur select SOP. now pipe all ur different types of rocks and pebbles into ur select SOP, and under the select option, enter the expression "param ("randomRock", 0)" (exclude the first and last quotation marks) what this does is call the variable in your param expression that was setup in the copy sop, under stamp inputs param. that should loop through ur different inputs in the select SOP. now u could setup a transform SOP between the select SOP and copy SOP, and scale and rotate ur object in the same method as we called the different objects in the select SOP. fetch your source POP and pipe that into ur template input of ur copy SOP. that should do the trick. sorry im not at my houdini system now, so i cant get too specific. but i hope u get the idea :-/ Im sure this will work aracid Quote Link to comment Share on other sites More sharing options...
edward Posted April 10, 2004 Share Posted April 10, 2004 The default trick is to set the parameters in the Birth tab: Impulse Activation: $FF==1 Impulse Birth Rate: number that you want birthed Constant Activation: 0 Quote Link to comment Share on other sites More sharing options...
DaJuice Posted April 10, 2004 Author Share Posted April 10, 2004 Thank you all. Aracid, you already answered my next question, how to get random geometry for each particle. Now let me go put this stuff to work. Quote Link to comment Share on other sites More sharing options...
thekenny Posted April 12, 2004 Share Posted April 12, 2004 times like this i would love to just say, $HFS_DEMO/SOP/copy and look for the stamp examples. anyone have that one hanging around. i think that would do the trick. those old legacy example files where always the best place to learn how to use a sop do they come with the apprentice? -k Quote Link to comment Share on other sites More sharing options...
michael Posted April 12, 2004 Share Posted April 12, 2004 the last build they came with was the 5.0(?) demo disk... there are some eg files that come with Apprentice...not nearly as many though... Quote Link to comment Share on other sites More sharing options...
DaJuice Posted April 12, 2004 Author Share Posted April 12, 2004 Yeah the original demo files were close to 500MB altogether I think. Lots of good stuff in there. Ok, I've played around with this method and everything works great, but there is one big problem, at least it's a problem with the scene I'm working on. Particles are calculated before the terrain is rendered as a subdivision surface. And since this means that the particles are referencing the lower-res base geometry of the terrain, and not the render-time subd version, many of the stones may end up buried under surface, or worse, floating above it once a displacement map is applied. Is there some way to get around this? Quote Link to comment Share on other sites More sharing options...
Mcronin Posted April 12, 2004 Share Posted April 12, 2004 http://sidefx.vislab.usyd.edu.au/cd2_5.5.151/ Thanks to Ben for showing me how to find this. I knew it was still on vislab somewhere's. These are the demos that came with Apprentice when it was first released. If you dig around you'll see there are a bunch of various little examples that are still useful. Not sure the one you are after is in there though. I might still have the 5.0 stuff on my harddrive somewhere. I'll see if I can dig that up. 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.