ZylonBane on 9/10/2015 at 05:27
This post is the result of what I've learned playing around with the new hardware-accelerated Heat Disk object introduced in NewDark. It's not quite equivalent to the old software heat disk--it can't do that cool lensing effect, for example--but it does allow for some neat effects in its own right.
As in Dark Classic, this effect is available under SFX/Heat Disks. it accepts the following parameters:
start offset x
start offset y
start offset z
start radius
end offset x
end offset y
end offset z
end radius
bottom jitter
top jitter
number of blobs
max disks/blob
height of effects
Z-compare
Yikes. Okay, let's work through these...
First, the core component of a heat disk system is the
blob. Blobs are collections of
disks. A blob with no disks is nothing. At a bare minimum you must have one blob, with one disk, of non-zero radius, to see this effect do anything.
What are disks? An individual disk in NewDark seems to be a static distortion bitmap. Viewed against a solid-colored background it appears as a uniform disk that fades outward, much like a corona. Viewed against a detailed background, it visually distorts what's behind it, like looking through a warped piece of glass. Note that it's a
static distortion bitmap. It doesn't undulate, pulsate, rotate, or anything. This would make for a pretty unconvincing distortion effect by itself, which is where
jitter comes in.
Jitter controls how much each disk can be randomly offset from the centerpoint of its blob every few milliseconds. There are two jitter parameters-- bottom jitter and top jitter. These both appear to have the same effect, so I recommend just using one or the other. Sane values are from 0 to about 0.1. Values in excess of that look ridiculous.
With one blob, one disk, and some jitter, you'll see a single disk dancing around. Bump up the number of disks for a more realistic, complex-looking effect. Disks are drawn on top of each other additively, so the more disks per blob, the more visible the distortion effect will appear.
So if we can directly specify as many disks as we want on a single blob, what's the point of having more than one blob? That's where the
start and
end parameters enter. Start and end offset x/y/z work pretty much exactly like the bounding box parameters for particle systems, but with one big difference-- these coordinates don't specify corners of a cube, they specify start and end points of a
line. The engine will take the number of blobs you've specified and evenly distribute them along that line, like pearls on a string. Likewise, the start and end
radius parameters set the size of the disks in the first and last blobs, with intermediate blobs being interpolated between the two values.
The two remaining parameters are--
height of effects: definitely does something to the sizes and positions of blobs, but not in any useful way. Leave it at 0.
Z-compare: Always set this. When not set the heat disk effect is visible through terrain.
So in summary...
start offset x/y/z/radius: line start coordinates and initial disk size
end offset x/y/z/radius: line end coordinates and final disk size
bottom jitter: disk jitter (0 - 0.1)
top jitter: 0
number of blobs: blobs distributed between start/end points
max disks/blob: disk effects per blob
height of effects: 0
Z-compare: true
Misc NotesYou shouldn't allow players to walk through or even get too close to a heat disk effect. The individual disks have a maximum onscreen size, so within a certain distance this will cause them to appear as if they're shrinking and sliding away as the player approaches.
Blobs are more expensive than disks. That is, 1000 blobs with 1 disk each will render much more slowly then 1 blob with 1000 disks.
Since you can only define a line, not a region, you have to use multiple heat disk objects side-by-side to cover a rectangular region.
All distance and size parameters appear to be in standard DromEd units.
Other properties that affect heat disks include:
- Renderer/Transparency (alpha)
- Renderer/Bitmap Color
- Renderer/Z-Bias
- Shape/Scale (sort of works, but weirdly; recommend not using)
Here's a video I recorded of using this effect to distort objects behind a heat source. YouTube mostly mangled any subtlety in the effect, but hopefully some of it comes across:
(
https://www.youtube.com/watch?v=DIgAbPoECl0)
In addition to heat effects, I've also had some success using this to add distortion to running water particle effects. It can even be used to simulate a blurry view through a window, by using a high disk density with no jitter.
Inline Image:
http://i.imgur.com/yxf2se3.jpg