WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-13-2004, 01:41 PM
Zafer Zafer is offline
Member
 
Join Date: Jan 2004
Location: maryland
Posts: 7
particle

Hello,
I want to animate a powder like substance being poured from a container. Is there an easy way to this? How can I animate particle movement? Any clue?
Thanks a bunch.
Zafer
Reply With Quote
  #2  
Old 05-17-2004, 10:22 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi Zafer,

Vizard supports particle systems, but currently the only way to create one is by hand editing a text file. I've attached a zip file that contains a particle file with a texture. To use it simply do the following in your script:
Code:
dust = viz.add('dust.osg')
dust.hasparticles()
Let me know if you have any more questions. Good luck!
Attached Files
File Type: zip particle.zip (8.6 KB, 672 views)
Reply With Quote
  #3  
Old 05-18-2004, 07:19 AM
Zafer Zafer is offline
Member
 
Join Date: Jan 2004
Location: maryland
Posts: 7
Hi Farshizzo,
I included the two files that you sent me in my source folder. Then I added the two lines below. However, I couldn't see anything. I tried to open the RGB file in FotoShop but it didn't work. What was I supposed to see when I added those lines into my script?
You told me about editing a text file. Could you give an example?
Thanks a lot...
Zafer


Quote:
Originally posted by farshizzo
Hi Zafer,

Vizard supports particle systems, but currently the only way to create one is by hand editing a text file. I've attached a zip file that contains a particle file with a texture. To use it simply do the following in your script:
Code:
dust = viz.add('dust.osg')
dust.hasparticles()
Let me know if you have any more questions. Good luck!
Reply With Quote
  #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
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:45 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC