General Tips


Sprite POP

To rotate sprites so they randomly rotate left and right try .  fit01(rand($ID+3), -1 , 1 ) * $F


Delete a percentage of pops after the sim > Delete SOP  $PT>= ($NPT*0.7)  deletes 30% 

Getting VOP Variables into POPs

There are several ways I have explored  to pull variables created in SOP VOPs or VOP POPs into  POPs  so that the data can be read and used.

Example one :- inside your vop pop create your new attribute using the add attribute vop. Then inside pops call that attribute using the poppoint expression as an example you might of altered the colour value of your pops within your vop pop. You would then drop a colour pop and using the poppoint expression bring in your new attribute. So in each channel of the colour pop you would add


poppoint($PT, “foo” , 0 )     poppoint($PT, “foo” , 1 )  poppoint($PT, “foo” , 2 )  


The changing values in each channels expression ie the 0 , 1 , 2  denote the float index , in this case R ,G ,B 

example one 

Example two :- uses the same principles as above but we control the drag values of each particle based on $ID. with the expression

poppoint($ID, “raindrag” , 0 )

example two 

Example three :- Creates the custom attribute in a vop sop which of course creating a point attribute. The attribute is promoted and then brought into pops with the source pop and called in the distribution Attribute parameter as you can see below.

example three 

Creating Variables based on colour

The example scene contains more methods of creating attributes based on colour and then dragging them into POPs. the great thing about Houdini is there are so many ways  scene file sops_createColourAttributes.hip

Example 1

  1. Uses a point sop to add colour

  2. Add a paint sop , check on override colour attribute Cd , paint red in this case. Which adds to the $CR to the Cd  point attribute

  3. Add a Attribute create sop as per the image.Set the name to anything suitable in this case emission. Set to point and enter a value of  point("../Paint_red",$PT,"Cd",0 ) . This expression looks at the paint sops point colour value for  Cd and the first value 0 which is the red channel.

  4. Add a Attribute promote sop , promote your newly created attribute emission to a primitive attribute so pops can use it.

  5. In pops use the attribute emission in the source tab > distribution parameter.

Example 2

  1. Uses the same sort of approach but  this time we create a primitive attribute with the value of prim("../primitive1" ,$PR , Cd , 0 ) . Again this expression reads the colour values from a primitive sop which is where we add some colour. The primitive attribute again can be read by the pop source node.

Example 3

  1. Create a point sop with any colour value in this case red using $CR * $BBY*0.5

  2. In the pop network note the source pop in the birth probability. This uses the $CR value to birth particles.

Use a point colour attribute for particle emission

Example 4

  1. Uses  a lot of the processes from examples 1 2 3. In this case we use a primitive sop to add colour.The big difference being the noise that is used . The expression $CR * clamp(sturb($TX,$TY+$T,$TZ,0.3),0 , 1)  .The noise is offset by time ( $T ) . This will give a noise based emission of particles.


scene file sops_createColourAttributes.hip

Instanced objects in POP’s


Notes :-  

Instance objects onto particles and ie teapots and have the particles avoid each other. Also use a env light set to occlusion and a ROP set to write out the irriadiance


scene file :- rse_popinstance_irrad_01.hip

otl file :-