66365c4b0f393

66365c4b0f9c9
1 Guest is here.
 
66365c4b1195d
AM16's Ultimate Guide to Water & Lava (v1.02)
(Download this guide in ODT and PDF format)


Before You Begin

Aside from knowing the basics of DromEd, such as creating terrain brushes, room brushes, and editing object properties and links, you'll need a place in your mission to add water, and you'll need to create a StartingPoint if you haven't already, so that the player is capable of drowning.


   
To create a starting point, create a Marker, found in the Object Hierarchy Archetypes tree under Object→fnord→marker(-36). Select the marker and click the “Properties” button. Change the marker's name to “StartingPoint” by double-clicking the object name at the top of the Properties Window.

Now add the S→Scripts property and add the script “VictoryCheck”.
Lastly, add a link of Flavor “PlayerFactory” from the “StartingPoint” marker you just created to “Garrett (-2099)”.

[Note: In ShockEd the equivalents are Marker-> Level Start Marker for "StartingPoint", and the PlayerFactory link should be to "The Player (-384)". The VictoryCheck script also does not exist in SS2, so does not need adding]


Creating Water Brushes

You create water brushes just like you create "fill solid" and "fill air" brushes. You simply create your brush, and change its operation to "fill water", "flood", or "solid→water". Water brushes are used for both water and lava but each have different textures and act/react properties specified.

   
A "fill water" brush will replace any terrain geometry inside it with water.


   
A "flood" brush will convert any air inside it into water, leaving solid as is. Flood brushes are very useful because they allow you to flood complex terrain over a large area such as a canyon or sewers using a single "flood" terrain brush without altering the pre-existing solid terrain.


   
A "solid→water" brush will convert any solid inside it to water, leaving air as is.



An "Evaporate brush" will convert any water inside it to air, leaving solid as is.


Note: Terrain brushes each have a “Time” value listed in the lower left of the DromEd window, and any terrain brushes with a time value lower than your a terrain brush will be applied before it, and any brushes with a time value greater than it will be applied after.


Flow Groups & Flow Brushes

After creating a water brush and portalizing, you may notice the water surface texture is "Jorge", and changing the textures of the water terrain brush only changes terrain textures, not the water surface texture.

This is because water surface textures, as well as water's directional flow, and act/react properties are specified in abstract "Flow Groups", and the body of water your just created is not associated with a "Flow Group" yet.


Bodies of water are associated with a "Flow Group" by drawing a "Flow Brush" around the body of water. Each "Flow Brush" has a "Group" number field which associates it with a "Flow Group". Flow Groups are numbered from 1 to 64.


Creating Flow Brushes

To create a Flow Brush, click the "Create" button on the bottom of the screen, then select "Flow" then click and drag as you would any other brush to create your Flow Brush. Resize it (if necessary) so that it completely surrounds your water brush(es). Flow Brushes can extend beyond your water terrain brushes without any problems, as they only affect water inside them.



WARNING: The centers of Flow Brushes CANNOT be in solid. They will be considered invalid and ignored if they are, leaving your water with an ugly Jorge texture. If you select your Flow Brush and press F8, the camera will be teleported to its center. If the camera is in solid, the 3D view will change to wireframe. Use multiple Flow Brushes around complex terrain as necessary.


Note: On occasion, DromEd will load default water textures into the texture palette and apply them to any water without a Flow Brush. These bodies of water still need a Flow Brush, as they will not have act/react properties, or sound schema applied to them.


Flow Group Properties

Now that you've created a Flow Brush (and verified that its center is not in solid) you'll want to set up the Flow Group it is associated with. A Flow Group specifies what properties the water should have, such as what texture to use on the water surface (Green water, blue water, lava, etc), what kind of directional flow (X, Y, Z), how water texture should rotate (centered around what point, and what rotational speed if any), and what act/react properties the water should have (WaterStim, FireStim, Stench). You can use up to 64 different Flow Groups.

   
You'll noticed that when you have a Flow Brush selected, the "Group" number, "Edit Group", "Update in World", and "Properties" buttons appear.    The Group number tells you what Flow Group the Flow Brush is currently associated with. You can change the Group number by clicking the Arrow Buttons, entering a number from 1-64, or clicking the Group button and holding while dragging the mouse left or right.


To edit the directional flow, surface texture, or texture rotation of the Flow Group listed in the "Group" box, click the "Edit Group" button to bring up its "Flow Group Dialog".


The "Anchor X, Y, Z" fields specify what point the texture should rotate around, if "angle" or "angle change/sec" is non-zero. You'll probably want to use the X,Y,Z coordinates of the Flow Brush for this.

The "Angle" field specifies what angle the water surface texture should start at.

The "X, Y, Z change/sec" fields specify the water's flow and texture scroll direction & speed of water. X is North/South, Y is East/West, and Z is up/down. The water's flow will move objects and the player.

The "angle change/sec" field specifies how many degrees the water surface texture should rotate each second, centered around the anchor X,Y,Z point.

The Axis field specifies the axis the textures should scroll and/or rotate over.


In OldDark, water surface textures on only 2 directional faces are rendered correctly, while water surface textures on the other 4 directional faces get stretched & skewed. When axis = 2, only Top & Bottom water surface textures are rendered correctly. When Axis = 1, only North & South water surface textures are rendered correctly. When Axis = 0, only East & West water surface textures are rendered correctly. In NewDark, all water surface textures render correctly and rotate and/or scroll in the direction(s) specified.


The "Texture" Field specifies the name of the texture used for the water surface. Usable textures are contained in .\Thief\Fam\Water (for software rendering) and .\Thief\Fam\WaterHW (for hardware rendering). Valid textures included with Thief1, are "bl" for blue water, "gr" for greenish water, and L2, L3, & L4 for lava. Thief2 includes those in Thief1, and adds "VM" for vermilion water. Also see the "Adding your own water textures" section.

"Used" activates or deactivates the Flow Group texture rotation/scroll animation. Checked = Active, Unchecked = Inactive. Flow movement is always active however, even if the textures aren't animated, and objects dropped in the water, and the player will still be moved by the flow as specified in the X,Y,Z change/sec. fields.


The purpose and effects of “global proj. thresh.” are currently unknown.


Note: If "X,Y,Z change/sec" is non-zero and "angle change/sec" is non-zero, it will move the Anchor point, and at least 4 of the directional faces will begin to move faster and faster. This is because the point the texture is rotating around is moving further and further away. Much like if you touched the center of a vinyl record, and moved your finger outward to its edge, you'd feel the rotational movement of the record increase against your fingertip.

If an X change/sec is specified, the Top, Bottom, East and West sides begin to scroll & rotate faster and faster while the North and South sides rotate normally. If a Y change/sec is specified, Top, Bottom, North & South Sides scroll faster and faster, while the East & West sides rotate normally. If a Z change/sec is specified, the North, South, East & West sides will scroll faster and faster, while the Top & Bottom sides rotate normally.

   
The "Update in World" button will apply the current Flow Group properties to any water inside it without having to reportalize.


The "Properties" button will create (if one doesn't exist) a concrete Flow Group archetype in the "Flow Groups" hierarchy tree (accessible through the Object Hierarchy) associated with the Flow Brush's current Flow Group, and open its Properties window. From here, you can add properties to the Flow Group to be applied to the water as you would an object.

Newly created concrete Flow Group archetypes will be placed in "Flow Group→Water Flow Group" by default. When viewed in the "Flow Groups" hierarchy tree in the Object Hierarchy, you can drag your concrete Flow Group archetypes into one of the pre-existing Water or Lava abstract archetypes so they'll inherit their properties, and they will retain their position when you save and load the mission.

Thief1 contains the "Water Blue Flow Group", "Water Green Flow Group", or "Lava Flow Group". Thief2 includes those in Thief1 and adds "Water Toxic Red Flow group". These different archetypes include "Act/React", "Schema", "Water Texture Color", and "Water Flow Group Index" properties, explained in the next section.

Because abstract archetypes are saved in the GameSys, not your mission, if you edit the pre-existing abstract Flow Group archetypes or add your own abstract Flow Group archetypes you'll need to save your custom GameSys.

Note: Concrete archetypes are saved in the mission, and will have positive object IDs, while abstract archetypes have negative IDs and are saved in the GameSys.


Properties that can be added to Flow Group Archetypes:

Act/React→Sources – With this property, you can add act/react stimuli to your water. For example, you can add WaterStim for regular water, FireStim for Lava, StenchStim for poison water, etc. Full discussion of the Act/React System however, is beyond the scope of this tutorial.


Renderer→Water Flow Group Index – (Valid values: 0-3) This property is used with the


"Editors→Mission Parameters:Water Colors" window, described in the next section.


Renderer→Water Texture Color – This property likely is supposed to modify the underwater color and visibility. It is applied to the Blue, Green, and Lava abstract Flow Groups in the "Flow Groups" hierarchy tree in the Object Hierarchy. However, it doesn't appear to work. Instead, underwater color and transparency, is specified in "Editors→Mission Parameters: Water Colors" window, described below.


Schema→Material Tags (Default: "Material Liquid") This property specifies what schema material tags to use, as specified in the Schema files. Full Schema discussion however, is beyond the scope of the tutorial.




Water Colors

In the "Editors→Mission Parameters: Water Colors" window, you'll find settings that specify Underwater color and "underwater transparency/water surface texture transparency" for up to 4 different Water Flow Group Indexes (0-3). See also the Water Texture Transparency section below.

The "Water Flow Group Index" property added to Flow Group Archetypes in the Object Hierarchy is used to reference which underwater Color and Alpha settings (0-3) on the Water Colors window are used on a Flow Group.

"color <x> Color" specifies what color in RGB values underwater will appear. Blue water often has a value of "R40, G10, B40", Green Water often has a value of "R40, G50, B10", and Lava often has a value of "R200, G0, B0".


"color <x> Alpha" specifies how opaque or transparent underwater and the water surface texture will appear. Default is ".35". Lava uses "1.0". If you want water to appear invisible, use
"0". Water textures are rendered fullbright, but increased transparency lessens how bright water textures appear. This is why Lava with an alpha of 1 appears to glow, and water with an alpha of .35 is highly visible in complete darkness.


Note: Lava and Green water textures do not respond to "color X Alpha" because of a setting on the textures in the Object Hierarchy Texture Tree.


WARNING: In Newdark, as of v1.21, you will need to save and reload your mission in order for "color <x> Alpha" settings to apply to Water Surface Textures. This appears to be a bug.


More Water Texture Transparency

   
Although you can specify water texture transparency with the "color <x> Alpha" setting in the "Water Colors" window, you may wish to have different settings for underwater transparency, and water surface texture transparency. This can be accomplished by adding the "Water Texture Color" property to the Water Texture itself in the Object Hierarchy Texture Tree, which overrides the "color <x> Alpha" setting specified in "Editors→Mission Parameters: Water Colors" on water textures.


In the Object Hierarchy Texture Tree, water textures are stored in "WaterTex" .

There are several other archetypes listed here but only "water_gr" and "water_bl" contain textures.

Note: In Thief1, there's an incorrectly named concrete texture archetype, "t_fam_waterhw/blout" in "WaterTex→water_bl". In Thief2, this texture has been deleted, but for both Thief1 and Thief2, the correctly named texture, "t_fam/waterhw/blout" in "WaterTex" should be moved to "WaterTex→water_bl", the incorrect texture deleted, and your GameSys saved.

   
If you edit the "water_gr" archetype, you'll notice it has the "Renderer→Water Texture Color" property added to it. Although the color settings of this property are ignored, this property's Alpha value will override any Alpha value specified in the

"Editors→Mission Parameters: Water Colors" window. The "LavaTex" archetype containing all the lava textures also has this property set, and the Alpha value set to "1".

If you wish to change the Water Surface Texture transparency of Green Water Textures, or Lava Textures, you'll need to edit or remove the Water Texture Color property, from their archetypes, and save your GameSys.


Water Texture Transparency in NewDark

Newdark introduced a new feature called "Lightmapped water" that can be enabled through the Build Dialog (command:build_dlg) when portalizing your level. Enabling lightmapped water makes light cast shadows on the surface of the water. With this feature disabled (and in OldDark) water is rendered fullbright. However, the water texture's transparency lessens the perceived brightness.


A consequence of using lightmapped water, is that shadows cast on water will cause the shadowed areas of water to appear slightly more transparent than well-lit areas of water. Also, Lava will no longer be rendered fullbright, which makes it look rather odd. Adding "Renderer→Render Type: Unlit" to the LavaTex archetype, or individual textures, sadly has no effect. Hopefully this will be changed in a future release, if there are any.


NewDark also opens the possibility of using high quality textures on water as support for the PNG, DDS, PCX 32-bit, BMP 24/32-bit, BMP RLE, TGA RLE formats has been added. However, with these file formats, water texture alpha settings in DromEd have no effect as of v1.21. This is because the textures need to be indexed in order for alpha settings in DromEd to work. When using these file formats, transparency is specified in the texture file itself, instead of the alpha settings in DromEd. Hopefully, this will be changed if another version of Newdark appears.

With no texture transparency and lightmapped water off, water surfaces using these texture formats would also be rendered fullbright. This is fine for Lava, but problematic for water. Turning on lightmapped water, and/or editing the transparency in the texture file will give you normal looking water when using *.tga or *.dds files. However, lava textures will no longer be rendered fullbright when lightmapped water is enabled, and look funny, unless you place a lot of lights around them.


Adding your own water Textures

There are two directories used for water textures, depending on which renderer is used. The OldDark Thief1 software renderer uses water textures in ".\Fam\Water". The Hardware renderer in OldDark and Newdark uses water textures in ".\Fam\WaterHW".

Water uses two textures. One is used for the water surface when outside the water looking IN, and the other is used for the water surfaced when submerged inside the water looking OUT. The basic naming scheme Dark uses is "<name>In.pcx" (for looking INto water from the outside) and "<name>Out.pcx" (for looking OUT of water, from the inside). Entering <name> in the "Texture" field of a Flow Group will use that texture as the water surface.

If your water texture is animated, it will be required to use Dark's animated texture naming format. The name used for animation frame 0 will use the same format as above “<name>in.pcx” or “<name>out.pcx” (e.g. “BlIn.pcx” “ScumOut.tga” “VmOut.bmp”). All other frames will use this name with an underscore and their frame number appended to it (e.g. “blin_1.pcx” “ScumOut_2.pcx” … “VmOut_13.bmp” etc, etc). In OldDark you can have up to 20 animation frames, in Newdark, you can have up to 99.

Indexed *.pcx or *.gif textures use Full.pcx as their palette. You'll need to either convert your custom water textures to use Full.pcx, or create your own Full.pcx that uses a palette that matches your new textures, but the pre-existing water textures will be forced to use your new Full.pcx as well. In NewDark, you can use *.tga, *.png, *.bmp or *.dds files which have no palette, but DromEd water alpha settings do not apply to unless they are indexed, so you have to set transparency on the texture itself as of Newdark v1.21.


Underwater Fog

Normally, underwater visibility is set using the Renderer→Water Texture Color property added to a concrete Flow Group in the "Flow Groups" hierarchy tree, or with the Water Color Index added to a concrete Flow Group and "Editors→Mission Parameters: Water Colors" settings.

A little flourish you could try adding to your mission is adding fog in the area beneath the water's surface using a room brush with the weather property added. (See AntiMatter_16's ultimate guide to weather effects for adding fog to a mission.)

One problem with this, is that Fog in Newdark and OldDark is not volumetric. Instead, fogged areas appear more opaque based on the camera's distance from them. So if your water is fogged and visible from extreme distances it will look rather funny. With some clever scripting work and using Fog Zones though, you might activate fog only when beneath the surface.


Advanced Brushwork

Terrain brush operations such as "Fill Water" "Water→Solid", "Solid→Water", "Evaporate", and "Flood" can be used to efficiently create complex terrain architecture that would be much more difficult using only fill solid and fill air brushes.
These operations were used extensively to create the unusually shaped, irregular architecture of Running Interference in Thief2. This mission was essentially constructed by creating a massive fill water brush, then evaporating sections of it, to create rooms with walls of water. Areas of these walls of water were then converted to solid using the "Water→Solid" brush operation, so that they wouldn't be affected by additional evaporate brushes that would share the same space. This technique allows you to create new architecture without affecting previous geometry.

The usefulness of this technique merits its own extensive tutorial, but it is beyond the scope of this one. I recommend playing around with these operations, and trying to wrap your mind around how Running Interference was built.


Note: When the edge of a "flood" brush meets the edge of solid terrain on the same plane, the brush with the larger "Time" value will take precedence when applying terrain textures. The same is true of an "evaporate brush". This can be useful in various situations, for example if you wish to use a trim texture underneath a staircase that has a fill air brush beneath it to carve away the underside.
« Last Edit: 12. August 2013, 11:40:09 by Zygo »
66365c4b11c19
Still needs some adjustments of whitespace (see original PDF). I don't recommend trying to flow text around images as in the original though.
66365c4b11d18
Added a clarification for setting up the player object in SS2 vs Thief.

Your name:
This box must be left blank:

System Shock takes place on a space station named ...:
1 Guest is here.
You're clinically dead once the death movie plays. Not before.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
66365c4b153c7