Release Notes

 

Home
Up

TLF Flame shader for trueSpace

Version 1.0 Beta 7 release notes

Overview

bulletThis is a procedural shader - i.e. the flames are generated using mathematics, not stored images. The drawback is it is a bit slower than using scanned images, etc. The advantages are almost limitless flexibility and much reduced memory and diskspace overheads along with not having to source scanned images, video, etc.

bulletThe shader functions as both a colour and transparency shader. It will not provide any luminance as a real flame would (it doesn't act as a light source).

bulletThis is a two dimensional shader, not a three dimesional (volumetric) shader. (Or maybe it is three dimensional, given that it varies through time as well.... ;-) ).

bulletThe texture and alpha maps it produces are animated, as long as you set the Change and Rise rates to something other than 0.

What's new in Beta 7

Once again, no new features, but the shader is now about 20% faster. The shader now requires trueSpace 4.2 or above.

What was new in Beta 6

Ooops - introduced a flame shape selection bug in Beta 5. This version fixes it. Sorry... :-}

What was new in Beta 5

A few internal improvements that result in better image quality including better transparency.

What was new in Beta 4

New "Sheet" shape

I think you're going to really like this one.... :-)

The new "Sheet" shape, selectable from the "Shape" page of the dialog, fills the texture from "left" (U = 0) to "right" (U = 1) with a wall of flames. The basic number of flames can be set with the "Count" field in the "Sheet" section of the "Shape" page. You can also vary the amount of "fill in flame" between these primary flames with the "Fill" setting in the same section - 0 for no fill at all, then from 1 to 10 for increasing amounts - 10 will actually result in solid gradient from bottom to top, i.e. all the space between the flames is filled. I will be working to improve the granularity of the "Fill" setting - at the moment it is too coarse and very non-linear.

The really nice feature about this new shape (other than having lots of intermingled flames on a single polygon) is that the texture is seamless across the "left"/"right" edge boundary. This makes it ideal for applying to spheres, cones, cylinders, etc. and all the deformed derivatives thereof...

A few usage notes:

  1. This shape is much more sensitive to the turbulence scale settings - you'll probably want to use lower scale factors than for the other shapes.

  2. Ditto for the "Colour Maximum" settings.

  3. You'll probably want to turn the "Colour Minimum" settings off altogether (set to 0) to prevent an ugly band near the top of the texture.

  4. This shape makes no use of the "Colour Dropoff" settings - these controls will be disabled whilst this shape is selected.

Spin controls added

The edit fields for most parameters have had spin controls added to them - click on the left arrow to reduce the value and the right arrow to increase it. Whilst these do not act exactly the same as the Caligari control, it. is a fairly close approximation until I produce a replica - at least the swapping back and forth between the mouse and keyboard has been significantly reduced now. One side effect of this is that all these entry fields are now integers (no decimal points). Many such fields have thus been multiplied by 10 to allow sufficient accuracy, e.g. whereas you might previously have used a value of 5.7 in the "Red Maximum" parameter, you now have to use 57 to achieve the same effect. The Colour Minimum settings have been multiplied by 100 for this same reason. Internally, the shader is still using the old values (i.e. they are being translated to/from the edit fields).

There has been a fair bit of squeezing to get these spin controls in without increasing the size of the dialogs - the most obvious result of this is the replacement of the words Red, Green and Blue on the Colour page with a large "R", "G" and "B" respectively, each in the appropriate colour. Hopefully these won't blend in too much with anybody's colour preference settings...

Miscellaneous

Various little cleanups once again in the behaviour of the interface...

What was new in Beta 3

Looped animation support!

You can now configure the shader to produce seamlessly looped flame animations.

On the "Anim" page are three new controls in the new "Loop" section - a read-only "Current" that shows the current setting, a "New" that allows you to enter a new loop count and a "Calculate" button.

If "Current" is zero the sequence of flames produced does not loop (well, not for a VERY long time...).

To set up a looped animation follow this procedure:

  1. Concentrate on the colour shader until the size, shape, texture and colouring of your flame is how you want it.

  2. When you are happy, go to the "Anim" page, enter the number of frames you are going to produce in your looped animation in the "New" entry box and press the "Calculate" button.

  3. The shader will calculate new values for the Change Rate and Rise Rate settings. If the current settings will work with the entered loop length you will be told and the new loop length will be entered into the "Current" setting. If new values are required, you will be prompted to confirm the changes. If you click OK, the changes will be made.

    This process is used because the "Y Scale", "Rise Rate" and "Loop" settings are all inter-related in achieving a seamless vertical motion loop, whilst the "Change Rate" and "Loop" settings are inter-related in achieving a seamless change in the shape of the flame through the loop. When you press the "Calculate" button the shader will attempt to find the closest settings for "Rise Rate" and "Change Rate" to those you have already set that will achieve a seamless loop of the length requested.

    The length you enter should be the number of unique frames you want in your animation - e.g. if you entered 120, then frames 0 to 119 will be different to each other, but frame 120 will be identical to frame 0, frame 121 identical to frame 1, etc. Furthermore, the transistion from frame 119 to 120 will be a seamless continuation of the animation - therefore the transition from 119 to 0 will also be a seamless continuation of the animation. The net result is that frames 0 to 119 form a seamless loop of animation that is 120 frames long in total.

  4. At this stage you would normally copy your settings across to the transparency half of the shader as discussed in the "Quick Copy" feature notes in the Beta 2 section below.

New "Radial" shape

An optional alternative shape to the planar flame that has been produced up until now. The new "Shape" page will allow you to select the new "Radial" shape. When this is selected the additional controls to set the number ("Count") of flames around the shape, a starting "Angle" (by which the shape will be initially rotated) and a rotation per frame of animation ("Rotate") setting (these latter two settings are in degrees and degrees per frame, respectively). This is a work in progress - the idea being to produce a texture more suitable for mapping onto non-planar objects. Try this one on a spheroid...

The rotation controls are just another way of animating the texture, i.e. with these you can rotate the texture on the object over time without actually keyframing anything. It can also be a useful way of rotating the texture into place on the object without UV mapping (assuming the necessary placement can be achieved given you can only control one axis of rotation this way). Just leave the "Rotate" setting at zero (the texture doesn't rotate over time) and then change the "Angle" setting as appropriate.

I would be particularly interested in feedback on this "Radial" feature...am I wasting my time???

Miscellaneous

The noise routine has changed in this version to support the seamless loop feature. The end result of this is the magnitude of the effect that the colour and turbulence controls have on the overall flame has changed.

If you are new to the shader, this doesn't matter.

If you have used the earlier versions, the nature of the effect each control induces remains the same, its just the numbers required to produce a particular outcome have changed. The default settings when you first open the shader have been altered to reflect this. In general, if you used the same settings as you did with the earlier versions the flame would now be wider and more turbulent...(hope that's clear as mud :-) ).

The lime green in the preview windows has gone. Where there was green its now just plain old black. This is a side effect of the "Radial" feature.

What was new in Beta 2

Much more consistent interface - not so much in it's appearance (which has always been consistent ;-) ) but rather the way it behaves within TrueSpace.

Squashed a couple of internal bugs - they didn't affect stability, just the flexibility, particularly the independance between the Colour and Transparency halves.

Added controls, in particular minimum settings for colour components, a randomisation facility and a quick copy facility for copying settings between the Colour and Transparency halves of the shader. To make room for these controls as well as future additions, without taking over all your screenspace, the dialog box now uses a tabbed "property sheet" interface.

Seperate dialog boxes for Colour and Transparency - they look essentially the same, but you can now more easily keep track of whether the settings you are looking at/changing are for the Colour or the Transparency shaders. Please note that the Transparency shader still refers to individual colour components. At the moment the transparency is only calculated on an average of these components - i.e. an overall alpha value is calculated, not coloured transparency.

Beta 2 is not backwards compatible with Beta 1. Sorry, but some things had to change...

New randomisation facility

On the turbulence page there are two new controls - a seed entry field and a randomise button. By using a different seed for the shader on different objects you can now get different shaped flames in the one frame - i.e. you no longer have all your different flames looking the same shape and dancing in synchronisation (a very weird and disconcerting/artificial effect).

The randomise button is just a quick way of generating a random seed rather than having to think one up (duh!) and type it in.

New quick copy buttons

In Beta 1 you just about always had a significant amount of smoke generated - this is caused by the flame shape of the transparency shader differing from colour shader. It is now much easier to control this.

Along with the separate dialog boxes, each dialog box has a button in the bottom left corner that will instantly copy all the settings from the current shader to it's reciprocal - i.e. the button on the Colour shader dialog box will copy the Colour settings to the Transparency shader dialog, and vice versa. You still have to press Apply on the relevant dialog box for any changes to take effect, whether they are entered directly or copied.

Note: For the button to work both dialog boxes must be opened beforehand. One can be hidden, the other's button will still copy the parameters across. However, if one of the dialogs has not been opened, nothing will happen when you press the other's Copy button..

If you still want smoke (and sometimes you do... :-) ), a nice quick way to produce it as follows:

  1. Concentrate on the colour shader until the size, shape, texture and colouring of your flame is how you want it. Make sure your sizing leaves enough room at the top to allow the smoke to dissipate (i.e. fade out before it gets clipped by the polygon edge).

  2. When you are happy, press the "Copy to transparency" button.

  3. Switch over to the transperancy shader, which is now set up to mimic the size, texture etc. of your flame. Go to the "Turbulence" page and click the "Randomise" button.

Voila! (Don't forget to do a full screen render to see the real effect...)

You can adjust the transparency shader settings to vary the smoke volume, density, etc.

New minimum settings

You can set a cutoff level for each of the colour components. This allows you to trim back the halo around the flame, as well as control the limits of any 'smoke' you want to produce using the Transparency shader.

Miscellaneous notes

bulletTurn up the "Ambient Glow" setting... :-)

bulletThe material preview window will be black when on the sphere setting. Change to the square to get a proper preview of the flame shader.

bulletFor the planar shape, use a cubic or planar UV mapping on your objects. Planar mapping works best most of the time, including on spheres. For the radial shape use a spherical UV mapping. Of course, feel free to experiment, these are just suggestions to get you up and running quickly...

bulletThe easiest way to use it is to create a plane and apply the shader as both colour and transparency shader. If you are working in a solid display mode (3DR, Direct3D or OpenGL) but set objects to render in wireframe, you can quickly experiment with the settings using the paint face tool - each time you apply your changes then use the paint face tool the face will update, giving you fast feedback and avoiding the wait for a full object or scene render.

bulletNote that the texture produced using the above method and when you do an object render is a very good indicator, but not as good as the texture produced when you actually do a full screen render - in particular you will see a heavy black shroud around the flame and some unwanted noise within the flame that largely disappears when you do the full screen render.

bulletHopefully the settings are reasonably self-evident, or at least will be after you have played with it for a little bit. The default settings will give you a fairly ordinary red-yellow flame. You can change the RGB component settings to achieve green, blue, orange flames, etc. By varying the turbulence scale settings you can vary from a candle flame to a bonfire flame. Each of these values are fairly interdependant - a bit of playing and you will see what I mean - I suggest you only change one or two parameters at a time until you get the hang of it.

bulletThe turbulence octaves setting will vary the detail in the flame - you normally won't need to set this very high. The change rate controls the rate at which the flame changes shape, whilst the rise rate controls how rapidly detail in the flame moves from the bottom to the top (these latter two values will only be of interest to those producing animations rather than stills). If you set the rise or change rate values too high then you will lose any sense of animation - it will just look like a flickery sequence of unrelated flame images.

bulletThis has been developed under trueSpace 4.2 running on Windows NT 4.0 SP5. Feedback on its operation (or lack thereof) on other platforms (Win 95, Win98, ... ) would be welcomed.

What I hope to add in forthcoming versions:

bulletWork on the alternative shapes for non-planar mappings.

bulletOnline help (Click here for a preview from this site).