Thread: particle
View Single Post
  #4  
Old 05-18-2004, 09:47 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi Zafer,

Try the following script. You should see the dust appear in front of you.
Code:
import viz

viz.go()

dust = viz.add('dust.osg')
dust.hasparticles()

viz.translate(viz.HEAD_POS,0,-1.8,-1)
The dust.osg file is a text file. Open up the file and scroll to the middle of the file. There are many variables that you can adjust to change the appearance of the particles. I'll list a few of them here:

lifeTime - This controls how long a single particle will exist before it disappears
sizeRange - Two number that control the beginning and ending size of the particles. The particles will grow to the ending size during its lifetime.
alphaRange - The beginning and ending alpha value of the particles. For example, 1 0, mean that the particle will start out opaque and end up transparent.
colorRange - The beginning and ending color of the particles. In the example I sent you the beginning and ending colors are both white.
rateRange - A min and max range of how many particles to create per second.
initialSpeedRange - A min and max range of how fast the particles initial speed should be

Hope that helps!
Reply With Quote