#1
|
|||
|
|||
How to use precipitation.dle?
I was wondering if anyone has any information about the precipitation.dle file in the Vizard plug-ins directory? I can not find any documentation on the use of this file and am wondering how to use it effectively and/or what kind of settings are available.
This is what I have so far : precip = viz.add('precipitation.dle') snow = precip.snow(1) #Create snow with intensity of 1 snow.setSpeed(0.0001) |
#2
|
|||
|
|||
After adding the plug-in you can either create a snow or rain object from that. Each one has methods that allow you to set the size, speed, and wind for the particles. Here is a sample script that you can use to change the effects.
Code:
import viz viz.go() viz.add('tut_ground.wrl') precip = viz.add('precipitation.dle') snow = precip.snow(1) import vizmenu menu = vizmenu.add() OptionsMenu = menu.add('Options') SpeedSlider = OptionsMenu.add(viz.PROGRESS_BAR,'Default','Speed') SizeSlider = OptionsMenu.add(viz.PROGRESS_BAR,'Default','Size') WindSlider = OptionsMenu.add(viz.PROGRESS_BAR,'0.00','Wind') WindSlider.set(0.5) def onSpeed(pos): val = pos*10 snow.setSpeed(val) SpeedSlider.message('%.2f'%(val)) vizact.onslider(SpeedSlider,onSpeed) def onSize(pos): val = pos*0.1 snow.setSize(val) SizeSlider.message('%.2f'%(val)) vizact.onslider(SizeSlider,onSize) def onWind(pos): val = pos*20 - 10 snow.setWind([val,0,0]) WindSlider.message('%.2f'%(val)) vizact.onslider(WindSlider,onWind) |
|
|