Latest  | Search | Go
Edit this page   |   Attach file 

  Home | Tutorials | Technical Reference | Runtime | API Documentation | ContentCreation > CreatingDecals  

How to Create Decals in Reality Builder

Tutorial Author:Jeremy Stieglitz

What is a Decal?

A decal is a surface mesh that conforms to the topology of the ground over which it is placed, and to which an alpha blended texture is applied. Its purpose is to break up the repeating pattern of a tiled texture, generally to make parts of large surfaces look particularly worn or detailed in unique places. For instance, a decal could be anything from a poster on a wall to a distinct crack in the floor. The following comparison indicates the dramatic visual benefits of using surface decals:

rampdecal.jpg

In Reality Builder, placing and configuring decals is easy, so let's step through the process of how it's done!

Using a DecalActor To Place Your Decal

First, select DecalActor from the Actor classes combobox on the toolbar and click "Insert". You'll then see the DecalActor arrow in front of you. The DecalActor will draw a decal projected onto the surface where the arrow points. So point your arrow where you want the decal to appear (e.g. the ground, a ramp, a wall) by rotating and translating the arrow with the appropriate gizmos. Once you have your DecalActor pointing at the desired surface, it should look like this:

decal1.jpg

However we don't want the DefaultTexture on our decal, so type in the name of the actual decal texture you want to use (assumed to be in your "Textures" folder). You can also adjust the scale of the decal (useful to increase the decal is appearing too small or to decrease if too many polygons are being selected), and the UV projection scale to prevent UV wrap (increase this value if your projection appears to tile > 1). At this point, your decal will begin to look as it should:

decal2.jpg

However this is still just an unlit, unshaded representation of the decal you actually want! Once you're satisfied with the size and placement of your decal, you should then double-click the "Convert To Prefab" False value, and the DecalActor will be finalized into a Prefab. Once you have done this, there's no going back to placement adjustment with the DecalActor (unless you begin again with a new DecalActor), so be sure you're ready for this step before you take it.

At this point, your new Decal Prefab will have a new Material applied to it ("Get" it with the Material Browser). It will by default use the "Diffuse" shader with the appropriate decal-texture you used in the DecalActor, and will appear something like this:

decal3.jpg

You're almost done! For the ultimate in decal goodness, try applying the "Decal.fx" shader either with or without SH enabled (you can generate PRT for your new Decal Prefab), and you'll get a decal that fits in well with the surrounding environment:

decal4.jpg

As you can see, Decals have considerable visual benefit on a tiled surface. With DecalActor you can place them in rough form over the target surface, convert-to-Prefab, and then configure their Material as you see fit.

Attachment sort Action Size Date Who Comment
rampdecal.jpg manage 37.8 K 20 Jan 2005 - 08:20 Main.guest  

CreatingDecals   Edit | Attach | Ref-By | Printable | Diffs | r1.3 | > | r1.2 | > | r1.1 | More