Page 1 of 1

Active Stealth and Cloak Shield Gadgets

Posted: 10 May 2007, 07:11
by trepan
Here are a couple of screenshots showing the active stealth
and cloak shields demo gadgets.

Enemy View:
Image

Allied View:
Image

All of the units are using the active stealth command (that's what the red
triangles indicate). That operates on a per-unit basis, and uses energy based
on the metalCost of the unit by default.

The flea is equipped with a cloaking shield (note the large energy pull).
I've set it to chase the commander around to keep him and his tag-alongs
cloaked. The configuration file can be used to setup energy cost, cloak range,
uncloakable units, etc...

Posted: 10 May 2007, 07:32
by smoth
OMFG! this CAN BE the base FOR SOOO MANY THINGS!

Posted: 10 May 2007, 15:22
by AF
Have you got custom lua rendering of that shield? Hence the big blue bit on the near side and the red tint on the backside?

Posted: 10 May 2007, 20:09
by trepan
Both features (including rendering), are completely implemented in lua.

The cloak shield rendering is done with the following steps:
1. Make 2 sphere display lists:
- one with outward pointing normals (frontside)
- one with inward pointing normals (backside)
2. Set the shademodel to FLAT
3. Enable lighting
4. Enable depth testing
5. Set the backside material properties (including specular)
6. Set the face culling mode to FRONT, and call the backside display list
7. Set the frontside material properties (including specular)
8. Set the face culling mode to BACK, and call the frontside display list
9. Reset shademodel, lighting, depth test, and culling states.

Posted: 12 May 2007, 12:59
by trepan
Video Demo (5 MByte, poor quality)
http://trepan.bzflag.bz/spring/cloakshield.avi

Current parameters:
draw = boolean
init = boolean (initial state)
delay = restart delay in frames
energy = number (resource usage)
minrad = number
maxrad = number
growRate = number
shrinkRate = number
selfCloak = boolean

A list of 'uncloakables' can also be configured.

Posted: 12 May 2007, 15:32
by AF
Is it possible to render something similair to the heatclouds of CC3 for distortion effects?