Max:Stencils

Disambig gray.png

This is a tutorial page.Versions available: PyPRP; 3ds Max; Korman.
 

We use stencils in real life to paint a words or patterns on to a surface so we don't cover that entire surface. We can do the same thing with our textures when making Ages for Uru. There are many uses for stencils: you can use them to "paint" a dirt path through some grass, to put moss or grime on a stone, and to make parts of an object reflective or shiny. In this tutorial, we will make part of an object shiny.

Creating the Stencil

My door texture in GIMP

I use Genetica to make textures and GIMP to edit them. For example, I created a texture for my doors in my age Neolbah. It's a great texture, but I want the dark purple parts to be reflective like the classroom doors in the Neighborhood. To do this, I need to create a stencil for the dark purple parts.

My door texture with the completed stencil
  1. Make a new white layer. The texture should now be completely white--don't panic!
  2. Now we want to make our stencil, so we should lower the opacity of the white layer so that we can see both the original texture and the white layer at the same time.
  3. On the white layer, use the eraser tool to erase the white that is obscuring the purple grooves. This can be a time consuming process if the surface you're erasing is similar to mine.
  4. Once you are done, raise the opacity of the white layer back to 100%.
  5. Delete the original texture layer, leaving only the white stencil layer. We are left with transparent grooves in the white texture, which will become reflective in game.
  6. Finally, save your texture. Make sure you use the Save As option, otherwise you will overwrite your real texture with the stencil.

3ds Max

Applying the Stencil

  1. Load the scene and select the object that you're going to apply the stencil to.
  2. Open the Material Editor, select a slot, and create a new Plasma Composite Material.
  3. In Plasma Composite you have three passes--you can think of them as submaterials. For our stencil, we are only going to use 2 of the passes, so uncheck the third pass.
  4. Click on the first pass. This will be your original texture, so ensure that it is a Plasma Standard Material and Blending is set to None.
  5. Go back to the Plasma Composite Material and click on the second pass.
  6. As before, make sure this pass is a Plasma Standard Material. We will be using both layers, so check Top. Turn on alpha blending.
  7. Click on the base layer in the second pass. Use your stencil for the texture here. If you want to make your object reflective, check Invert Alpha in the Texture/Color Alpha group.

Making the Object Reflective

The resulting material
  1. In the second pass of the Plasma Composite Material you created above, go into the top layer and change it from a Plasma Layer into a Plasma Static EnvMap. This is a texture generated on export that represents the environment. In other words, this is the reflection!
  2. Go down to the box labeled Face Generation and click on the blank button called says "Base Filename".
  3. Type in the name you want for you EnvMap file to be (I typed in DoorStenEnvMap.png). It looks like it wants you to pick something, but what you want to do is type in a new file name. Only use either .png or .tga extensions. With .png, a small box will pop up, asking you what properties you want for the .png file. I always just click on Ok and use the default.
  4. In the Face Generation box, there is a box for Texture Size. It defaults to 64, meaning that the exporter will generate an image that is 64 x 64 pixels. If your object is really small, or you don't care how nice the reflection is going to look, you could leave it.
  5. Click on the button that says "Generate From Node". The button will turn yellow, meaning that you need to select an object. You can either click it in the 3d Scene or select it from a list by pressing H.
  6. Max will now generate six texture faces and place them in those blank boxes.
  7. Go back to the main 2nd Pass material, and change the Opacity to something less than 100%. If you leave it at 100, your reflective part will reflect like a mirror. I set mine to about 40 and it looks good.
  8. Make sure you assign the Plasma Composite material to your object.

Troubleshooting

It rendered the frames, but each one that I saw was all black!
A few things can cause this:

  • You have no lighting in your Age yet, or you are only using Run Time Plasma lighting. Add some lights to light up your objects.
  • Your object is actually enclosed in something (oops).
  • The pivot point for your object is too far away! Reset the pivot point on your object.


I saw images, but they all looked like they were in the wrong location!
Again, your pivot point for your object is far off from your actual object. Reset the pivot point


I saw images, and they are from the right point, but I don't like what I saw!
Try to pick a different Node. Sometimes you may even need to throw in a Dummy point and use it as your Node. Just remember to remove the dummy when you're done.