BNA!@Posted: Sun May 25, 2003 10:38 pmĀ :
Another entry to the "Get Your Ass In The Known" series :)

Ok - you've messed around with the creation of normal maps for Doom3 or Tenebrae and bumped into the limits of either your pc or the tool that renders out the normal map.

This can easily happen when you model exceeds a million polys.

Impossible you think?

No - the more you try to achieve good results the more often you'll find yourself detailing down a single bolt for a tech panel to 20k polys, let alone the panelframe itself which alone weights in 250k...

Now there's an easy solution for this and eventually for another problem you've experienced.

Let's get it started:

You want to create a set of very highly detailed panels, each using the same "frame", but varying content in the middle of it.

Split you model into modules and palceholders.

Let me illustrate it for you.
Here's the full panel you want to renderbump:


The red part is the highly smooth frame, the blue part is what everybody has the righ to name it "sucky pipe" and the invisible part is the "canvas".
"Invisible?" You ask - what the hell is this?
It's the yellow outlined part you see in the screenshot.

It is a square polygon with it's surface normal flipped away from the camera vew, so you are looking at the backside of it hence you're able to look right through it.
This square polygon act's as a placholder for various reasons:
- when you render the red frame alone, it'll ensure the correct boundaries of your normal map, especially since this smooth frame has rounded corners
- when you render only the "sucky pipe" it will ensure that this amazing pipe will not get distorted and the proportions for later compositioning will stay intact

If you may think that it's all not neccessary since you always render all in the same run, then you obviously haven't rendered pervertly detailed geometry :)

When I do a panel, it often ends up with a full polycount of 5 or 6 millions - that's admittedly more than my pc can handle - chances are that you'll also run into serious problems...

So you have to split it up - a nice side effect is, that you can cut down your render times significantly and you always have a nice collection of templates / modules at hand.

First template - the frame:


What are we doing here?
We're rendering only the frame, what else :)

Note that the background canvas polygon is still flipped backwards.
This render will output only the frame itself as both - a colormap and a normalmap.

Now you're basically done with your panel if you want it nice, easy and boring.

But you want more - for example a really sucky pipe:


Now this render will output only the pipe as both - a colormap and a normalmap.
Again note that the background canvas poly is flipped and invisible.

You will also note that the renderoutput is not distorted in any way - if you would have choosen only to render the pipe without the canvas poly you would notice that the engine stretches the output image to fit the dimensions you've entered, so you've lost all proportions.

Just in case you're scratching your head what this is all about - it's about building a set of renderbumped images you can compose together in a image editor later.

Look - with keeping the background poly in place and modelling only the individual geometry for the panel on top of it you can add an unlimited amount of geometry to your panel.

Just render one highly detailed bolt on top of the canvas, then drop the rendered frame into your image editor, add a new layer and drop the bolt there.

Delete the grey background and copy and paste the normal map of the bolt around as often as you want it (however - do not rotate it!!!) and you have a panel with 100 bolts each originally weighting 100k polys - impossible to render when the geometry is in the same object, but easy if you've split it up.

Or use the sucky pipe and do a copy and paste for a few times - the same.

Don't limit yourself to the geometry your object can hold!

When you're done copying and pasting the normal maps you still have to fill the background with the equivalent for "flat" in the world of normal maps - the color: R: 128 G: 128 B: 255

This approach is also very handy if you wanto objects to overlap but can't get it done properly in 3D.

I know the little tutorial is a little confusing for people who are new to this, but if you already got stuck a few times I'm sure you get what I mean :)

As usual - all questions go below...