Jump to content

Emitters radiate from a point or circle


Flexman
 Share

Recommended Posts

I added some dusty rotor downwash from a helicopter but I'm not getting the effect I want and wondered if anyone has any ideas on how to do this.

 

I want the particles to emanate around a circumference (mid rotor length), or a single point (under the rotor shaft) and move away in a circle. Leadwerks particles, as far as I can see support a rectangular area and a linear acceleration (one direction only from a 'wind' direction). But since they wind is blowing 360', the rotor downwash, it doesn't quite give the desired results.

 

Any help or suggestions?

 

screenshot402t.jpg

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

eh... needs fine tuning, but this might work for your purpose...

 

require("scripts/class")
local class=CreateClass(...)

function class:CreateObject(model)
local object=self.super:CreateObject(model)
SetWorld(fw.transparency.world)
object.circlevalue = 0
object.emitter=CreateEmitter(5000,10000,Vec3(math.cos(object.circlevalue),0,math.sin(object.circlevalue)))
object.emitter:SetParent(object.model)
object.emitter:Paint(LoadMaterial("abstract::smoke.mat"))
object.emitter:SetColor(Vec4(1,0,0,1))
object.emitter:SetRadius( .3, .01 )
object.emitter:SetRotationSpeed( .5 )
object.emitter:SetWaver( .5 )
object.emitter:SetPosition(object.model.position,1)
SetWorld(fw.main.world)		


function object:Update()
	object.emitter:SetVelocity(Vec3(math.cos(object.circlevalue),0,math.sin(object.circlevalue)) )
	object.circlevalue = object.circlevalue +.5
end

function object:Free()
	object.emitter:Free()
	self.super:Free()
end

end

 

EDIT-- parented the emitter to model to remove the need for the UpdateMatrix function

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

or just rotate the emitter around a point/object...

require("scripts/class")
local class=CreateClass(...)

function class:CreateObject(model)
local object=self.super:CreateObject(model)
SetWorld(fw.transparency.world)
object.emitter=CreateEmitter(500,5000,Vec3(1,0,1))
object.emitter:SetParent(object.model)
object.emitter:Paint(LoadMaterial("abstract::smoke.mat"))
object.emitter:SetColor(Vec4(1,0,0,1))
       object.emitter:SetRadius( .3, .01 )
object.emitter:SetPosition(Vec3(model.position.x+2,model.position.y,model.position.z),1)
SetWorld(fw.main.world)		

function object:Update()
	TurnEntity(object.model,Vec3(0,-10,0))
end

function object:Free()
	object.emitter:Free()
	self.super:Free()
end
end

 

EDIT--- added radius setting to allow you to see the emitter

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Brilliant, I added the emmiter.Turn(...) to the Update() method and it seems to have the desired effect. I'll play around with the parameters while I write this reply...at some frame rates you can see a 'spiral' pattern emerge. In the cockpit it looks pretty convincing.

 

*more edits*

 

After some more parameter experimentation I get a really nice 'shockwave' effect in the dust.

 

...CreateEmitter(300, 1200, Vec3(0, 1, 0), 0) ;

...SetVelocity(Vec3(8, 0.01, 0))

...Turn(Vec3(0, -33, 0))

...AlignToTerrain(TTerrain(game.scene.terrain)) ;

 

I set the Area and Radius according to the helicopters altitude from the ground and rotor RPM (which is a percentage). Above 60 feet it's "hidden". Maybe I should pause it? Not clear what's more efficient.

 

Thanks for those suggestions. Got a good result /thumbup

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...