Engine

Blitz3D Forums/Blitz3D Programming/Engine

asdfasdf(Posted 2004) [#1]
How do I make Jet Engine Exhaust and Water?


IPete2(Posted 2004) [#2]
For Jet engine exhaust do you mean heat haze or jet with flames etc.

If flames etc. use types and particles...or get Eole's particle system.

Or check out the code archives for particle code.

IPete2.


asdfasdf(Posted 2004) [#3]
Yes, heat haze. But flames would be cool.


AntonyWells(Posted 2004) [#4]
Heat haze. Render the backbuffer (Texture size, using cameraport) to a texture. Then create a haze shilloute(I.e that emits from the engine) Then project it's uvs into screen space(Using cameraProject verteX,y,z etc)
then convert the screen space into u,v space ( projectedX/TextureWidth(hazeTexture)
then shimmer the u,vs with cos and sin.

Texture the haze shilloute(sp?) with the heat haze texture.


asdfasdf(Posted 2004) [#5]
Can you give me a code example?


AntonyWells(Posted 2004) [#6]
Give me the media and I'll knock something up, but I've not got the time to do a rocket/haze mesh etc.

Mainly because I can't model to save my life. ;)


asdfasdf(Posted 2004) [#7]
You mean like the mesh?


AntonyWells(Posted 2004) [#8]
Yeah, so all I have to do is load the required data and code the fx(It's a short amount of code).. I'm not messing about with boxes and what not..well, not tonight anyway ;)


_PJ_(Posted 2004) [#9]
I use a very simple (but dead easy) Jet particle system for my spaceships. It is probably too basic for what you need, but may be okay as a starter.

In principle, it places a smoky sprite just behind the spacecraft with an initial alpha relative to the speed of the spaceship. Then, each loop, these sprites (maintained in a Type), are faded out (with EntityAlpha) then deleted when the Alpha gets to 0 (In fact, it may be more efficient to recycle the faded ones!)

Here's some sample code:


	NewShipJet.ship_jet=New ship_jet
	NewShipJet\sprite=CopyEntity (jet)


	PositionEntity newShipJet\sprite,EntityX(ship),EntityY(ship),EntityZ(ship)
	PointEntity newShipJet\sprite,cockpitcam
	MoveEntity newShipJet\sprite,0,0,4
	NewShipJet\alpha#=(speed#/topspeed#)
	ShowEntity NewShipJet\Sprite




For updateshipjet.ship_jet = Each ship_jet
    updateshipjet\alpha#=updateshipjet\alpha#-0.01
        If updateshipjet\alpha#<0 Then updateshipjet\alpha#=0
        EntityAlpha updateshipjet\sprite,updateshipjet\alpha#
            If updateshipjet\alpha#=0
                FreeEntity updateshipjet\sprite
                Delete updateshipjet
            EndIf
Next




mrtricks(Posted 2004) [#10]
I got heat haze working, but it absolutely killed my performance.