Home Technical Talk

3ds max : reproject a normal map on a different uv set ?

greentooth
Offline / Send Message
Noors greentooth
Hi !
For a specific project, i will probably have to reproject an existent normal map to a new uv set, where the uv shells could be rotated/flipped/scaled etc...
Do you know a way to do that in max ? A simple render to texture won't work fo' sure.

I've found that for maya :
http://www.mentalwarp.com/~brice/normal_shader.php
I guess my dev could take a look to make it for max, but maybe there's already solutions around here ?

Thanks !

Replies

  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    Whats your workflow for RTT. Im sure ive done it fine before.
    Providing you bake the Normals from a model with the normal map applied correctly it should work.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    mmh what my workflow should be ?
    I assigned my normal map to the normal bump node of my material, then tried to bake a normal map "element" in rtt. Gives me a really good looking normal map, but totally wrong obviously.
  • Rick_D
    Options
    Offline / Send Message
    Rick_D polycounter lvl 12
    if the shells are not rotated exactly the same then it won't work, fletch.
  • binopittan
    Options
    Offline / Send Message
    Apply your normal map as diffuse on your model with 100% self illumination.
    RTT, set as new UV set, bake as complete map element.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    nah man, a normal map is uv dependent as they are part of the tangent basis. If you rotate the uv's, you change the repair, hence the normal map has to be rebaked or modified. My maths are shit so i can't explain in details ^^ but normal maps can't be rotated like a simple texture.
  • Mark Dygert
    Options
    Offline / Send Message
    I agree you can't transfer a normal map that way.

    BUT you can still transfer it. It will work IF you use 2 meshes and projection. It will read the bump as height data on the surface and translate it appropriately, like it would a normal map applied to a high poly object.

    You can NOT transfer if you only use a single mesh with 2 UV channels. You must use projection and 2 meshes, to capture the height effects of the normal map. Of course rebaking from the high poly source is the most ideal but there are times when that isn't practical or even possible.

    When transferring maps it is generally a good idea to turn off Global Super Sampling and Anti Aliasing the default settings tend to blur the results and smooth things out especially if they are rotated. You want a pixel for pixel transfer so you turn those settings off.

    I included a visual example here:
    http://www.polycount.com/forum/showthread.php?p=1363332#post1363332

    Here is a mini-tutorial I wrote on how to transfer everything BUT the normal map.
    http://www.polycount.com/forum/showthread.php?t=58411
  • Justin Meisse
    Options
    Offline / Send Message
    Justin Meisse polycounter lvl 18
    [edit] oops, Vig posted while I was composin'

    I just did a quick test, it should work - I took my source mesh, applied a material with my normal map in the bump slot, set to amount 100, as a normal bump. Treat this as the highpoly. I duplicated it, rotated the uv's 45 degrees and baked the normals from my 'highpoly' to this mesh.

    EQ verified that max treats normal maps just like regular normals when baking and you know he's always right.
  • Mark Dygert
    Options
    Offline / Send Message
    Yea people add normal maps to their high poly meshes all the time and bake it out to the low. The method isn't really that different, just you're using your low poly mesh as your high.

    Of course re-baking from the original high poly source is preferable but not always possible.
  • binopittan
    Options
    Offline / Send Message
    You do NOT want to put your normal map in the diffuse slot and bake that way, it will seriously screw up your normal map because its dependent on each pieces orientation.
    Example: If you had a piece that needed to be rotated 90 degrees if you transferred the normal map without using projection, that new piece would have its normals facing the wrong way and it would cause seams and all kinds of weird shading.
    I don't see normal facing the wrong way weird shading and shit.
    xxx-2.jpg
  • Mark Dygert
    Options
    Offline / Send Message
    1st you don't really understand how normal maps work otherwise you would see the folly in your argument.

    2nd, Your rotation is slight, but even with the bad angle, shoddy lighting and skewed perspective I can see the shadows are different. Flip it 180 so red is on the bottom to see the problem more than just a little.

    3rd, I'm not sure which viewport shader you're using, but you should include a moving light in your scene to see how the normal map is actually reacting to light.

    4th, don't make me take time out of my day to cook up some actual examples, people always want me to take more time out of my day to add that BS to the wiki... =P
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    tis ok Vig, i made it :susp: (badly)

    nrm_plox.jpg

    So, same normal map, with different uvs orientation = different lighting. The right version is wrong, because the tangent space has changed !

    So Vig and Justin_Meisse are teh winners ! But what about the projection cage ? Could it be the exact mesh ? It should be to be accurate, no ? It seems i have some artefacts on my bake test though.

    THELOWNormalsMap.jpg
  • binopittan
    Options
    Offline / Send Message
    but you should include a moving light in your scene to see how the normal map is actually reacting to light.

    ....
    Damn you for not telling me this earlier

    ninjaed by noors
  • Damien_B
    Options
    Offline / Send Message
    Damien_B polycounter lvl 9
    Create a duplicate of your source mesh with old uvs and bump map applied, and render your new bump map off of it - to your model with the updated uvs. You have to treat it like a high to low bake for some reason..
  • Mark Dygert
    Options
    Offline / Send Message
    Ahh you guys are too fast, heh. But it takes time to think up subliminal signals.

    Just stare at the moving lights until it starts to slow down then do what the voices in your head are telling you to do... it will be ok.

    NormalMapFlipped.gif
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    haha he made it !
  • Eric Chadwick
    Options
    Offline / Send Message
    Artifact solutions here:
    http://wiki.polycount.com/NormalMap#Solving_Pixel_Artifacts
    Noors wrote: »
    But what about the projection cage ? Could it be the exact mesh ? It should be to be accurate, no ? It seems i have some artefacts on my bake test though.

    THELOWNormalsMap.jpg
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
  • pasha_sevez
Sign In or Register to comment.