Final Frontier alpha demo

Miscellaneous Forums/Blitz Showcase/Final Frontier alpha demo

that rocket demo that you grabbed from bc..may have
been my old trail code from "sol". i think i passed this
along to specis at one point...anyway, sure they are
homeworld style trails, camera aligned tristrips..
using cylindrical billboarding logic...you wont be able
to render 200 ships with this effect..the amount of data
that would have to be passed to the card would cause massive
stall..

ok..if you want to know how theyre done..heres the basic
idea...
- you create a tristrip for your trail with correct uvs
- set..which should be interpolated 0.0 to 1.0 along the
- the len of the strip...you should also enable vertex
- alpha and apply a similar approach to setting the strips
- vertex alpha values..though this should be the other way
- around...1.0 to 0.0...you should store these values
- somewhere so that you dont have to read them from the
- tristrip later..
- the texture mapped to your trail should be repeated..
- uv tiled...the amount you do this should be based on
- the average trail len..you will need to experiment..
- you should use a multiplier when setting trail alpha
- values..based on the engine power...so max engine power
- would be 1.0 and min 0.0...so if the ship is idle,
- we multiply our prerecorded alpha values by this value
- this gives us the actual vertex alpha required..which in
- this case would be zero for all the verts...hiding the
- trail..
- the more power applied the engines..the brighter the
- trail will render...
- to align the verts can use some standard vector maths..
- you get the vector from the cam to the engine and the
- the vector of the engine trail - which is basicall the
- direction the the trail leaves the engine..
- using these two vector..get the cross product, producing
- a new vector at right angles to original vectors..
- this is the up vector of the trail..so we can set the
- top vertex of the trail head to this position..scaled
- by trail rad...the bottom point for this segment can
- then be found by negating this vector..simple ye ;)
- before you apply this logic to trail head..you should
- first shift all positions of the trail verts on place
- the right..this keeps the trail following the ship..

- ok perhaps that wasnt very clear..but there should be
- enough info there to start on your own trail system +
- optimise this logic...

- have fun ;) + goodluck