Arnold for Maya Forum
Rendering with Arnold in Maya using the MtoA plug-in.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to bake a normal map from a mesh that has rounded edges?

Message 1 of 13
1999 Views, 12 Replies

how to bake a normal map from a mesh that has rounded edges?

New to Arnold so please bare with me.

Trying out some new workflows, to see if I can quickly get a normal map from an asset (in Maya).

So what I've done so far was:

1. Apply a roundcorners node on a aiutilty node (set the shade more to flat and color mode to Normal)

Result in render


2. Use render to texture an AOV (diffuse) to get the World Space normals.( i assume they are World Space?)

3. Open the exr file convert to 16bit in photoshop and save as a png.(cant save as another file format)

4. Use Handplane to convert the png file from Object space to tangent space (Handplane does not convert World space to tangent space).

5. Take the new converted file and apply it back in Maya as a normal map.

Result (normals are wrong)



I assume there is no way of getting a normal map directly baked on a texture from an AOV?

Is there a way to get the object space normals instead?

If you can render out a normal map, how should I have my smoothing groups?

How do I control padding?

How do I fix the graininess on the render to texture settings? (Camera settings (AA) were set to 4

Any help would be greatly appreciated.



Tags (2)
Labels (2)
Message 2 of 13

I've done this. Add an aov for normals - n. Render that to texture. You will get a world space normal map. You can convert that to tangent space in substance designer in a few steps.

Message 3 of 13
in reply to: Mike_Isaakidis

You can convert world space normals to tangent space with the Space Transform node. You also need to move it from -1 to 1 into 0-1 by adding up 1 and multiply with 0.5 afterwards.
Solution fabricated by Arnold devs, I just forward info, its also what happens under the hood.


Message 4 of 13

That's interesting to know. It might actually be less hassle than the method i tried. I will give this a shot. Cheers !

Message 5 of 13

@Mads Drøschler Sorry I can't get this to work at all 😞 Could you elaborate on the steps you took to make this work? I have the shader set up like this - then I do render to texture and still get -ve values in the texture, also I can't get render to texture to render anything other than an exr. I'd like to automate this eventually so it would be good to get this working!


Message 6 of 13

Here's the viewport and the texture bake in substance, see how there's still black areas that are negative.


Message 7 of 13
in reply to: Mike_Isaakidis

@Aten Skinner add 1 and multiply by .5 now to remap it into 0-1 space

Message 8 of 13

I'm already doing that in the shader though, see pic01 ^^

Message 9 of 13

Oh hang on have I got the wrong end of the stick here? You mean +1 and *0.5 as a post process, i.e. in Substance I was thinking you could somehow bake it out like that

Message 10 of 13
in reply to: Mike_Isaakidis

I know this ain't a maya screenshot.

Source the bumped Normal from AOV's back into a shade chain with READ AOV, the most left top.
Then source the unbumped normal with a state vector N, bottom, and source them to the space transform. See settings on space transform node.
Then move the entire thing into the correct space 0-1 with the constantbias scale +1 *0.5 Then exit to a WRITE AOV, I call mine test. then flip to it, and this is what I see.

Also, you need to setup the material, its the 2 nodes seperate from the transformation kit, its basically just an Arnold Material with the rounded corner plugined to Normal ( and we read this back into chain which is the first thing I described, top left node )


This is basically also what you do if you toy with volumetric displacements using OSL shaders or whatever if they sit in tangent space from the get go, then we can move it into the right space so for example a cloud wont start to shift in a 45 degree angle when displaced, but instead take middle as starting point so volume gets displaced properly in all directions.

I also do this on the OSL flowmap, we paint in 0-1 space and move the data to -1 to 1 so that a paint strokes has 4 directions, eg, we can make circular strokes and the uv offsetting is following the brush, spotless perfection around in a circle.


Message 11 of 13

Does the round corners work for angles that are not 90 degrees?

(like 60 or 105, 125)

Message 12 of 13
in reply to: Mike_Isaakidis

Hi did anyone get a final Maya shader that worked with this? The answers are great but still can't get it to work. If anyone could share an image of their setup that would be great thank you

Message 13 of 13
in reply to: Mike_Isaakidis

I'm bumping this - @Ben Moseley - over at the Arnold Support Blog is an ASS Material of the tangent calculation, you can copy the code lines and import the node-setup

its in the same way as Mads did it, but also the actual part how to visualize the Normal AOV is not clarified. I am uncertain, but could be that the part of setting up the (Normal) AOV as Material even differs between DCCs. I couldn't make it work in C4D. It's not clear how to feed / read / loop N from the scene geometry back to the custom Tangent Normal-AOV. Either by a second AOVwrite assigned globally as material or by object mask or aov tags locally? Or by a read/write from a Material on the normal nodes itself? And does the main AOVwrite Node need a Material assigned to the pass-through to actually draw anything at all?

Can anyone share a scene with the complete AOV setup set in place?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators

Autodesk Design & Make Report