Tips Page

LW LogoTexture mapping complex objects using just planar mapping

Skill level: Beginner/Intermediate

Download the completed exercise & textures here Texblend.zip

Preamble

Lightwave has a superb rendering engine, backed up by a good range of texture types, but the most useful, & sometimes most frustrating, is the virtually unlimited number of texture layers that you can apply to an oject. Proper use of this facility can overcome the blindingly frustrating lack of UV Mapping, which is included in just about every 3d package known to man. Normally, the use of planar mapping, is all you need. However, texture striping will occur if the shape you want to map has any flat edges at its extremes.

Image1 (Click on the image to see a larger version)

This image is a render of the Triceratops model that can be found in the animals directory, with the skin surface being just one texture map along x. Autosize is used to position the texture map - which was draw over a screen grab of the side view (see section on texture creation).

Things look pretty bad, even if you ignore my garish texture & lighting. Striping is evident along the forehead. If we change the map for one that is applied along y, things look even worse.

image2

Don't Panic

I will now attempt to illustrate one way of overcoming this problem using multiple planar mapping along different axes, using texture falloff to blend the different texture maps.

My example is using garish colours to show the operations being carried out, & doesn't really require the textures to be in any particular order. Normally the first texture in the list is the base layer & will have 100% opacity, the next layer should have less & so on. This example uses falloff to blend the textures where they meet, so you can leave all layers set to 100% opacity, although you might want to see what happens if you don't....

  • First create a blank scene & load in the objects\animals\triceratops object & set up a couple of lights to illuminate things - the default light & a point light will do.
  • Set the camera up so things look similar to the image above
  • Save the scene. save the object as Triceratops2.lwo (better safe than sorry).
  • Either create some texture maps for the object, or download my files. You will need a side view, top view & bottom view. If you don't have the Version 5.6 then you should load them all now.
  • Open up the surface panel & select The TriceratopsSkin surface & click on the 'T' button for surface colour. Planar mapping will be selected. Now load the texture map triceratop.tga into the texture image slot.

image4

  • Click on Automatic sizing & take note of the image y dimension & centre coordinates for Y.

image3

  • If you render the scene now, you will see striping along the sides of the beast the same as the image you saw earlier. Turn off Width Repeat & Height Repeat.

Now we do something that might seem a bit odd, but bear with it, all will become clear.

  • Create a new layer by clicking on the 'Add New Texture' button & load the image tricerabottom.tga into the texture image slot, using the y axis.
  • Once again, click on automatic sizing & note that the size & centre are the same as the previous image. Also turn off Width Repeat & Height Repeat.
  • Hit F9 to render this image.

image5You should see something like this.

This is probably just what you expected, after all, we are applying 2 textures over the same axis. How do we get around the problem? Simple. Move the texture coordinates so that the top & bottom textures actually sit just above & below the object respectively. In this case the skin surface height is from y=0 to y=3.3357 The 'Automatic Sizing' button initially puts each texture at the centre point of the surface, so we need to move it For the bottom texture, set the Texture Centre to y=0.

  • Step back to Previous texture & set it's Texture Centre to y=3.3357 (at the top of the object).

Just moving the centre of the texture has no obvious affect, so what gives? This is where the texture fallof comes in handy. In essence, we want the bottom texture to appear only on the bottom half, & the top texture to, well, appear on the top half. This is the bit where things can get a little bit tricky, so read carefully.

  • Set the texture falloff for the top and bottom textures to 30.0

Why? because texture falloff in any given direction obeys these rules

a) It starts at full strength at the texture centre.

b) It falls off a given amount per UNIT, irrespective of the actual size of the surface. The texture will fall off completely by the time it reaches 0.5 m from the centre by setting falloff to 50%.

If all axes are used, with equal settings, the fallof is a sphere of texture that is 1m in diameter. So, the reason we set the falloff to y=30 is because the surface is 3.3357m in y & we want it to fall off to 50% about half way up (the belly) and 100% at the top or bottom depending on the direction. 30 x 3.3357 is approx 100. If we left the textures centres in the middle of the surface, they would fall off equally above & below, creating a stripe of solid texture in the middle, fading off to 50% at the top & bottom

image6 I have changed the surface colour to pink so you can see the effect

So, the top texture fades off to the bottom & the bottom texture fades toward the top. Where they meet, in the middle, they are both at 50%. The pink surface colour now shows up in the middele of the creature where both textures are at 50%. This is obviously not how we want the skin to look. Try tweaking the falloff figures down a bit, to 20 or so, but the striping that we want to get rid of starts to creep in again.

We can tweak the bottom texture slightly, to put it a bit nearer the belly, but will have to increase the falloff so it doesnt encroach on the top texture.

  • Set the tricerabottom Texture Centre to y=0.5m & set the Texture Falloff to y=37.
  • We now need to add a texture to EACH side of the creature, so press 'Add New Texture' & using planar Mapping, load in the Side texture triceraside.tga & select X as the axis. Once again, turn off Height and Width Repeat & hit the Autosize button.
  • Set the fallof for x to x=50% & the Texture Centre to -1.25m (negative - offset to the left). This will be the left hand side of the creature.
  • Repeat the above procedure, to create the right hand texture, but this time set the Texture Centre to 1.25m (positive - offset to the right).
  • Now render the image.

image7 You will still see a fair amount of striping down the side of the creature.

This is where some simple Texture Alpha Images (opacity maps) come in handy.

  • Now go to each texture & load the appropriate maps. They are named triceratoptrans.tga, tricerabottomtrans.tga & triceraside.tga. these maps attempt to mask out the areas where the striping occurs. All maps are very blurry, and at this stage are not very detailed (or accurate), but they demonstrate the principle well enough.
  • Do a render now & you will find that just about all the striping is gone.

image8 The rest is up to you.

Things to do next:

  • Add maps that use the z axis, especially on the face. Don't forget to add some fall off in the z direction & to position the texture centre near the tip of the nose.
  • Create some decent textures that will blend together better than mine.
  • Edit the opacity maps so that they only affect the precise areas that are striping - remember that black=transparent.
  • Try adding a detailed bump map to create wrinkles around the eyes & knees.

If you want to create your own textures, I have grabbed a side & top image for you to paint over. All the files needed, including an object with the finished texture are in this zip file.

wireframetopwireframeside Click to view the full size images.

To use the object (tricerabox.lwo), first load in the original triceratops model from your disk, then load in the box. It's texture will replace the skin texture on the dinosaur model. I didn't include the actual model for copyright reasons.

If you have any problems with this, please email me

   
 
Go%20to%20the%20top%20of%20the%20page
 
Go%20back%20a%20page Go%20to%20the%20home%20page Go%20forward%20a%20page