WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-14-2016, 01:15 PM
willpower2727 willpower2727 is offline
Member
 
Join Date: Feb 2015
Posts: 39
Cool Interpolated scaling or force?

I'm trying to visually enhance an explosion (mesh bomb from 3ds converted to osgb) with the fire.osg. I want to make the fire osg expand rapidly but not instantaneously. I can re-scale it but the change is too abrupt. I have tried applying a force but it only moves the whole object in one specified direction. I'd like it to sort of blow up in all directions. Any ideas? Here's what I've tried so far:

import viz
import vizact

viz.go()
fire = viz.addChild('fire.OSG',scale=[2,2,2])
fire.hasparticles()

viz.phys.enable()
viz.phys.setGravity(0,0,0)
firep = fire.collideSphere()

def rescale():
print('rescale')
fire.setScale([1,1,1])

def explode():
print('apply force')
fire.applyForce( dir=[100,0,0],duration=5)
# fire.setScale([4,4,4])


viz.MainView.setPosition(0,0,-1.5)

vizact.onkeydown(' ',rescale)
vizact.onkeydown('s',explode)
Reply With Quote
  #2  
Old 10-17-2016, 06:22 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,458
Open the file in Vizard so you can edit the text and search for 'initialSpeedRange'. The two values shown set the min and max range of the particles initial speed. Try increasing those values and see if it helps.
Reply With Quote
  #3  
Old 10-18-2016, 11:07 AM
willpower2727 willpower2727 is offline
Member
 
Join Date: Feb 2015
Posts: 39
Brilliant! Thanks Jeff, I was able to play around with some of the other parameters as well and it looks awesome.
Reply With Quote
Reply

Tags
explosion, fire, osg, osgb, physics

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with applying force Madzar Vizard 1 06-15-2015 05:36 PM
3DS Max to Vizard osbg Scaling Issue vicmcg9 Vizard 3 08-03-2014 01:31 PM
How to create AMTI AccuGait force plate plug-in using serial port connection? manueleh Plug-in development 0 09-20-2012 02:22 PM
Scaling Portions of a CAL3D Model shivanangel Vizard 2 07-26-2012 01:17 AM
Scaling Avatars and Setting Bone Positions awstorer Vizard 0 11-17-2010 08:51 AM


All times are GMT -7. The time now is 10:24 AM.


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