WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-19-2009, 07:06 PM
srwing srwing is offline
Member
 
Join Date: Dec 2009
Posts: 2
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)
Reply With Quote
  #2  
Old 12-21-2009, 11:20 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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)
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 08:01 AM.


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