Problem Rendering a Normal Map Pass

8 views
Skip to first unread message

Shaun Chapman

unread,
Feb 13, 2009, 12:03:47 PM2/13/09
to X...@softimage.com
I'm hoping somebody can spot where I'm going wrong.

Here's what I'm doing...

Orthographic top view render of a grid that has an ICE deformer simulating water ripples, like bugs hitting the still water.

I'm  rendering both a mental ray Normal .nt (Normal Channel) and an sgi 8 bit (Normal Channel).  (I'm trying to get either one to work, but get the same results)

My renderer settings are, Scanline 0 0, Sampling contrast RGBA 1, Triangle 1, AO off, shadows off.

Now I try to plug either of these normal map renders onto a flat grid but only get weirdness. 

If I load a single image of the sgi 8-bit image into photoshop and use Nvidia tools to 'average' the normals, I get something that XSI likes, and it looks perfect.   I wish I could batch process 500 frames using this Nvidia filter.

My renders have gray scale info in R and B, white in G and after I run the Nvidia 'average' filter, the gray info is in R and G, white in B.

I'm using XSI 7.01 and setting my input images to Linear interpretation.  For Normal map settings I've tried both biased and unbiased.

What am I doing wrong here?  Thanks in advance.

--- Shaun

Alan Fregtman

unread,
Feb 13, 2009, 12:26:28 PM2/13/09
to soft...@listproc.autodesk.com
"I wish I could batch process 500 frames using this Nvidia filter."

You can. Read up on Photoshop "actions". Once made, it is possible to
run it on a whole folder or group of files.

Also lets you make "droplets" so you can drag and drop stuff to a
little .exe and have Photoshop do the desired action.

Alan Fregtman

unread,
Feb 13, 2009, 12:30:35 PM2/13/09
to soft...@listproc.autodesk.com
Making actions is pretty simple. There's a record button, you click
it, do something and then stop recording, then give it a name.

Here's a good droplet tutorial:
http://www.photoshoplab.com/droplets-for-the-lazy.html

Shaun Chapman

unread,
Feb 13, 2009, 2:36:29 PM2/13/09
to soft...@listproc.autodesk.com
Thanks Alan,

I will look into the droplets solution.
Still it would be nice if my renderings were "perfect".

--- Shaun

PURE - SHAUN CHAPMAN - VFX ARTIST/ANIMATOR
99 Madison Avenue, 4th Floor
New York, New York 10016
P 212-213-2200
F 212-213-2309

Guillaume Laferriere

unread,
Feb 13, 2009, 4:43:54 PM2/13/09
to soft...@listproc.autodesk.com
Did you try to use the Ultimapper to create your normal maps in tangent space?

Guillaume

winmail.dat

Alan Fregtman

unread,
Feb 13, 2009, 10:55:41 PM2/13/09
to soft...@listproc.autodesk.com
>From what I understand Shaun was doing an animated sequence of
normalmaps of deforming ripples.

Are you saying Ultimapper can run live every frame somehow?

peter boeykens

unread,
Feb 14, 2009, 6:24:49 AM2/14/09
to soft...@listproc.autodesk.com
> >From what I understand Shaun was doing an animated sequence of
> normalmaps of deforming ripples.
>
> Are you saying Ultimapper can run live every frame somehow?
>


If something doesnt work per frame - force it to.
there's a gazillion things you can do in XSI - without scripting knowledge -
by just knowing the syntax for a loop - which eventually takes you less than
30 seconds to write.

for i = 1 to 100
go to frame i
do some actions, use i as a variable where needed
next

Ultimapper is a bit more tricky than average but it's perfectly doable:
you can't immediately set the output filename, and it doesnt allow for a
framenumber, so you'll have to add the digit after the extension in the
corresponding text field for the map(s) you're generating. Also, it will
deselect, so you have to provide the name of the object, or get the
selection first.
This will generate a sequence for the tangent normalmap using ultimapper on
the selected object.

selected = selection(0)

for i = 1 to 100
SetValue "PlayControl.Current", i
SetValue selected & ".Ultimapper.TangentNormalMap", "normal." & i
GenerateUltimapper selected & ".Ultimapper"
next

Unfortunately - there's the messages to confirm to overwrite when maps exist
allready - so dont use this to overwrite a sequence!

Shaun Chapman

unread,
Feb 17, 2009, 2:52:31 PM2/17/09
to soft...@listproc.autodesk.com
Hey folks, thanks for the replies. I haven't got back to this task
yet, so will update my solution later.

It just seems strange that the Normal Map standard that Mental Ray
channel renders isn't the same as what the Rendertree interprets as
correct.

--- Shaun

Alan Fregtman

unread,
Feb 17, 2009, 3:10:13 PM2/17/09
to soft...@listproc.autodesk.com
I may be wrong but I think the rendertree expects a tangent-space
normalmap whereas the framebuffer result is in either global or object
space.

André Adam

unread,
Feb 18, 2009, 3:45:56 AM2/18/09
to soft...@listproc.autodesk.com
And I'm pretty sure you are right. :) If Shaun does not mind the normal
map he renders to be fixed in space (eg don't ever try to deform the
object you normal-map), he can go and create object space normal maps
instead of tangent space ones. I have attached the rather cheap recipe
as a jpg. Basically you grab the Normal Vector of the surface you want
to derive the normal map from and push it into normalized space by
adding 1 and multiplying the result by 0.5. That's your normal map. Then
you apply this texture directly to the bump input of the other object's
material after applying an unbias (multiply by 2 and subtracting 1).
There you go, raw surface normal transfer.

-André

ObjectSpaceNormalMapping.jpg

André Adam

unread,
Feb 18, 2009, 3:51:26 AM2/18/09
to soft...@listproc.autodesk.com
Oups, and a small error in the JPG, the Vector_Math_Vector1 node in the
upper right corner should read 0.5 for the Scalar Input 1 parameter.
That one obviously got mixed up, sorry fo that... :)

> ------------------------------------------------------------------------
>

Marco Vitolini Naldini

unread,
Feb 18, 2009, 3:53:28 AM2/18/09
to soft...@listproc.autodesk.com
funny,
thats exactly the free tutorial of today on digital-tutors. ;-)


André Adam schrieb:

> ------------------------------------------------------------------------
>


--
-----------------------------------------
AniMotion - 3D Computerfilme und Grafiken
-----------------------------------------
Marco Vitolini Naldini
Gartenstrasse 14
D-82362 Weilheim
-------------------
Tel.: 0881/9253-688
Fax : 0881/9253-689
Priv: 0881/9253-686
Mob.: 0179/731-3635
-------------------
www.AniMotion.de
m...@AniMotion.de

André Adam

unread,
Feb 18, 2009, 3:59:22 AM2/18/09
to soft...@listproc.autodesk.com
Perhaps I should plan on a tutorial career branch then. On the other
hand, they give it away for free, right? Ok then, trash that idea... :)

André Adam

unread,
Feb 18, 2009, 4:10:56 AM2/18/09
to soft...@listproc.autodesk.com
Just had a quick look, they are doing it on a character model, right?
Now, they'll be in for quite a surprise when they try to animate it... :)

Shaun Chapman

unread,
Feb 19, 2009, 5:50:52 PM2/19/09
to soft...@listproc.autodesk.com
Thanks heaps André.

Your normal map conversions in the rendertree solved my problem.

Thanks for taking the time to illustrate the process too, made it real easy to understand.  Attached are my results... nice!

---- Shaun

---------------------------------------------


On Wed, Feb 18, 2009 at 3:45 AM, André Adam <a_a...@49games.de> wrote:
And I'm pretty sure you are right. :) If Shaun does not mind the normal map he renders to be fixed in space (eg don't ever try to deform the object you normal-map), he can go and create object space normal maps instead of tangent space ones. I have attached the rather cheap recipe as a jpg. Basically you grab the Normal Vector of the surface you want to derive the normal map from and push it into normalized space by adding 1 and multiplying the result by 0.5. That's your normal map. Then you apply this texture directly to the bump input of the other object's material after applying an unbias (multiply by 2 and subtracting 1). There you go, raw surface normal transfer.

  -André



Alan Fregtman wrote:
I may be wrong but I think the rendertree expects a tangent-space
normalmap whereas the framebuffer result is in either global or object
space.




--
ConvertingNormalMaps_byAndreAdam2.jpg

André Adam

unread,
Feb 20, 2009, 2:13:38 AM2/20/09
to soft...@listproc.autodesk.com
Cool, glad I've been of help. Cheers!

-André

> ------------------------------------------------------------------------
>

Reply all
Reply to author
Forward
0 new messages