mohaa-spearhead-sdk/tutorials/decal_tutorial.html
2003-02-06 00:00:00 +00:00

44 lines
No EOL
4.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html>
<head>
<title>MOHAA - SDK</title>
</head>
<body>
<u>Decal Tutorial</u>
<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Decals are textures that are placed on top of geometry in your level.
Whenever you shoot a bazooka at the ground and make a scorchmark or write your
name in bullet holes on a wooden door, decals are created in your scene. However,
there is a tool within the engine that allows you to place your own decals wherever
you want for a variety of purposes. This can be used for not just bulletholes,
but also posters, cracks, detailed shadows, decorative wall, trim, and lots of
other things.
<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Playing with decals is easy and fun, and is actually editing in real-time
from within the engine and not in Radiant. Run any level and perform the following
steps:
</pre>
<ol>
<li>Bring down the console by hitting the tilde key ( ` ). Then type in
“pushmenu decals”. This will bring down the decal console.
<li>Click on the black checkbox on the “Edit Mode” button in the lower left corner so that the red x appears
<li>Bring up the console again and type in “map levelname” (t2l1 or MP_Berlin_TOW, for example.)
<li>After your level reloads. Type “pushmenu decals” again in the console.
</ol>
<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Now youre ready to start playing with decals. Simply click one of decals in the list to the left, then click the “Make” button. This will place a decal (highlighted with a glowing green and white wireframe) on whatever surface is in the center of where the player is facing. Most of the controls that you need to know are pretty self-explanatory. Use the Up, Down, Left, and Right buttons to shift the decal across a surface. You can control how much these buttons will move the decal by adjusting the slider underneath the Left button and Down Buttons. Adjust the rotation and scale of the decal by adjusting the Roll and Radius sliders, respectively. You can also adjust the x and y scale of the decals independently with the Width and Height Scale Sliders. The Randroll button will randomly change the rotation for you. To change the decals texture, simply click a new member of the list on the left.
You can also adjust the Alpha channel translucency and the Red, Green, and Blue filters for the decal independently. Hitting the lighting button will toggle the decal from between being lit and being fully bright. Sometimes even when a decal is lit it still looks too bright so thats when the RGB sliders come in handy.
To return to normal player movement mode, click anywhere on the screen except the console, then move around. To bring the arrow back up and return to using the decal console, hit the tilde key twice to bring up and close the console. Make another decal, then hit the next and prev buttons. This will allow you to browse through your decals and adjust their properties. The delete button will remove your currently selected decal. The Show Curr button will hide the glowing wireframe around the decal. This can be helpful when you are trying to adjust the RGB levels or placement and the wireframe is distracting you from how the decal will look when finalized. To get rid of the console, hit the Escape key.
<BR>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bezier Patches and terrain geometry are totally fair game when it comes to decals as well. You can make some great fake tree shadows on terrain using decals that would be impossible to achieve using the normal lighting tools. About the only thing you cant put a decal on is static entity geometry or other animated entities.
Play around with it youll find that decals are fun to work with, and they can be a great way to break up repetitive textures without resorting to making completely new ones. You can add things like cracks and ivy to your walls that will add depth, interest, and variety. When you are done, click the “Save” button in the lower left corner of the console, then type “quit” in the console. This will create a .dcl version of your filename. However, whenever you make geometry changes and recompile your map, you will need to update the .dcl file, as your decals wont show up in the new .bsp. To reintegrate the decals, simply run your new map, repeat Steps 1 4 outlined above, then click the save button. This will make sure that your .dcl file is synched up with the new .bsp.
</p>
<U>Bringing Custom Decals into the Decal Console</u>
</body>