PDA

View Full Version : normal maps and maya


lovisx
11-03-2004, 01:21 AM
could people please post examples of their normal map renders in maya or mental ray for maya and perhaps what they did for the shader in Maya or Mental Ray for Maya.

Getting a good normal map shader is still a mystery to me. I currently use the one I got for Mental ray off the Kileroo site, but I just like to know if I'm doing it right or not. Because I notice the highlights are wrong at times and what not.

And if anyone knows what the settings for normal maps out of z brush to mental ray for maya are I would obviously kiss you . . . alot, and perhaps more than once.... and then probably once again. Just wink or something, and I'll give you another. Then before you. . .know it :buttrock:

TVeyes
11-03-2004, 09:10 AM
[/url]I guess you are talking about the shaders from the [url="http://www.headus.com/au/home.html"]Headus (http://www.headus.com/au/samples/disp-norm/index.html) site

This thread (http://206.145.80.239/zbc/showthread.php?t=21632) at ZbrushCentral.com indicates that for the above shaders the red and green channels of the normal map need to be swapped. You cannot swap channels in Zbrush only flip them through the Preferences > ImportExport settings. So it would be easier to modify the above shader so that the red channel is for the X axis and the green channel for the Y axis. I do not use Maya so have no idea how or if you can do that.

I have a zscript coming that will flip and/or swap channels of a texture map post creation, zbrush requires you to set the relevant preferences prior to calculating the normal map.

lovisx
11-04-2004, 03:56 AM
I read through the post on the thread that was posted.

I know tangent space is another issue, because polygons don't have good tangent space. I hear in video games that for each polygon they have a tangent space.

I was wondering if there is anyway of achieving this in Maya. I understand reversing the color channels and I'll work with that when I get some time.

Any info on tangent space and how it affects a model when it isn't nurbs would be nice.

And once again, examples of peoples normal maps and how they achieved it . . . . In Maya, because it seems easy to do in other programs.

lovisx
11-04-2004, 04:02 AM
sorry examples of peoples normal maps applied to their models and how they achieved it in Mental Ray for Maya

mestela
11-04-2004, 09:38 AM
Olivier Renouard has been working on this for quite a while (since before zbrush became the Next Big Thing), and from what I understand, you need his plugin to help with co-ordinate space translation.

Some links:

http://www.drone.org/
http://cube.phlatt.net/forums/spiraloid/viewtopic.php?TopicID=9&page=1 (read towards the bottom)
http://206.145.80.239/zbc/showthread.php?t=17139&highlight=olivier

lovisx
11-04-2004, 06:21 PM
I really like the normals when displayed in Advanced Shading in maya with Tangent space normals

why do they not look so good in render?

alexCarbonero
11-18-2004, 01:27 AM
I recently crated a tangent space shader for maya render, the only current version is for Maya 4 but I will compile 5 and 6 tonight. I was waiting for my visual studio 7 :)

just go to www.alexcarbonero.com (http://www.alexcarbonero.com) and then navigate to my Mel and Mll site.

you can download my custom menu and it include the tangentShaderUtil.mll.

Just export the normal map from zbrush and make sure you flip it vertically under import/export settings. Then bring into maya and connect the texture to the shader util and then to the
nomal camera attribute of your shader.

hope this helps

alexCarbonero
11-18-2004, 01:32 AM
sorry, cliked post twice

sunit
11-18-2004, 01:29 PM
okay - i'm amazed. this utility, alex, is wonderful. i applaud you :)

any chances for a mental ray equivalent?

all the same,
thank you for sharing,
sunit

lovisx
11-24-2004, 04:01 AM
I can't wait to try your shader alex. I've been a bit swamped right now and haven't much time to experiment. But the first free time I get will be dedicated to seeing what I can do with this shader.

Thank you so much

caustic
11-24-2004, 01:12 PM
Hi all,

lovisx: Sorry to butt in but I'm having a similar problem also, I couldn't render my normal maps in maya without them displaying self illuminated and bright, but thanks to our friend here alexCarbonero (frikken legend) and his great shader i can.

Now for the problem, I have 2 normal maps referencing one contigious mesh, one for the head and one for the body, Iv'e error checked everything i can think off, correct mapping, lighting, everything but the maps display black in viewport and render.

The funny thing is, if I seperate the mesh in anyway, even illogically, they suddenly display and will render, problem is the mesh is skinned so I need another way or I destroy the skinning info, I'd like the mesh to stay as a whole too obviously.

Any ideas, the winner gets a date with Claudia Schiffer!!



Disclaimer: Claudia Schiffer date only available in an imaginary state of mind, winner recieves thanks only in physical world. :P

alexCarbonero
11-24-2004, 06:42 PM
Glad you guys like the shaderUtil. Just a warning the one I put up is using a temp node id.
so don't save your scenes in the binary format or it might clash with some other node. Just save it as ma. I'll see if I can use my works id nodes. then it should be ok.

by the way I updated my menu lately because of a directory problem the zip file had.
so the menu might not work if you are using an old version

www.alexcarbonero.com (http://www.alexcarbonero.com)

caustic
11-24-2004, 11:14 PM
alex:

At present I only have the shaderutil loaded, thanks for the warning about the file saving, I think I had this happen to me but only when the hypershade window was open when Isaved.

Also I noticed that the maps won't render when the scene only has a ambient light, quite obvious really given the way normal maps work but it may be something you want to add as a warning.

Any timeframe on the mental ray version?

alexCarbonero
11-25-2004, 06:16 AM
I never written anything for MentalRay, if anyone has a good thorough tutorial on how to write mental ray shaders I can write it in no time.

ThomasMahler
11-25-2004, 07:03 PM
Hey Alex,

Wow, your Utility Node is awesome, that's exactly what I wanted! And it's so easy to use, just put the Normal Map into it and render - extremely cool, I would kiss ya if I could! (Well, maybe I wouldn't, but, you know... ;-)

I just tested it, first testRenderings:

http://members.chello.at/thomas.mahler/normalTest_01.jpg
http://members.chello.at/thomas.mahler/normalTest_02.jpg
http://members.chello.at/thomas.mahler/normalTest_03.jpg

Character isn't modeled for lowPoly, so you could get a lot better poly/detail distribution if you'd go for it. 1.600 faces (SubD Level 1), still working on the highPoly Displacements and textures (not a hell lotta details in there yet, I know)!

sunit
11-26-2004, 03:33 PM
Here are some tutorials:

MR and maya

http://www.anibbu.com/hwee/mentalray/

this is your manual:

http://localhost:4446/Maya6.0/en_US/RefGuide/index.html

MR and xsi:

http://www.play.org/articles/XSI+MentalRayCustomShader.html

what do you think?
regards,
-sunit

Zendorf
11-28-2004, 05:36 AM
Thanks alot for your efforts there Alex, the utility node works brilliantly! I have tried several times in the past to get ZB normal maps to work properly in Maya, and had almost given up until now.

Most people associate normal map usage with realtime game engine usage, and while it is more obviously beneficial there, they are also great for general 3d use. I am finding normal maps are perfect for background models, especially things such as walls, floors, furniutre, trees, etc and even background characters. While I would not tend to use them for main characters, but if you work up a shading network like the Killeroo one and get displacement for just the silhouette and normal mapping for the rest...the best of both worlds.

And boy do these normal maps render up fast in Maya. They really are indistinguishable from real or displaced geometry when seen at the right distance or when the silhouette is not a problem. I have found that softening all the normals in my normal mapped models 180 degrees has really helped round them out as well.

Just one thing..... when I fire up the hypershade for the first time, I am getting a
"Warning: File not found:render_tangentShaderUtil.xpm"
...not sure what this means?

Cheers...

Ash-Man
11-29-2004, 04:34 PM
"Warning: File not found:render_tangentShaderUtil.xpm"
it's just the icon for it in the hypershader thats missing
no big deal
you can make your owen if you want and place it in the icon folder in your maya dir,if it really bothr you that much

lovisx
12-01-2004, 06:41 PM
can you make this shader usable as a plugin that can be installed without administrator privilages

lovisx
12-02-2004, 03:00 AM
is there any possibility of a ground up explain x y chordinates and normals to tangent space and how the colors change the normals of the surface. Just so I can better understand the theory....

in better words, can someone please explain what a normal is and how the normal map is affecting the faces?

lovisx
12-02-2004, 09:00 PM
what is tangent space, and how is the camera able to read a normal map

lovisx
12-03-2004, 02:05 AM
here is an example of normals vs bump. The bump is sharper only because my graphics card isn't has good at displaying normal maps as it is at displaying bump

but the normal map has much more depth and form
http://www.geocities.com/lovis_2000/normalvsbump.jpg

alexCarbonero
12-04-2004, 08:02 AM
It's late, but it's ok, cuss I don't sleep :) Plus I'm drinking Wine hahaHAHAHAHA, well now that I sound crazy, here it goes. by the way it's 1:am :) and I guess I'm legally drunk.

When Maya renders it samples the surfaces being rendered and it gets the normal from the surface at every pixel being rendered. That normal is an interpolated vector between the edges or vertices. That normal is used to calculate the dot product and half angles of the given lights before it's converted into camera space.

But the normals of a high ress surface can be sampled and stored as and rgb value. A normal is simply an x,y,z vector of unit value. So you can store the vector as an rgb value by compressing the range from -1 to 1 to 0 to 1, thin is done by dividing the value by 2 and adding 1. This will give you a range between 0 and 1 which is compatible with rgb. You then write the values out.

But before you write the normals out, you have to multiply the vector by the inverseTangentMatrix Ha, Ha. This is where it gets good. The Tangent Matrix is composed of the Normal = Z+ The UTangent (needs to be derived, but luckily Maya gives you this in the API), and the Binormal( the crossProduct of the normal and UTangent). With this three vectors you can compose a Matrix and since all the vectors are of unit length, you can use the TransposeMatrix as your inverse Matrix. now you can multiply your normalVector by your inverseTangentMatrix to export your tangentSpaceNormals.

Now to render, you just do the inverse.

1.Take your tangent normals and multiply them by your tangentMatrix, composed of the normal,Utangent, and Binormal. (3 dot products)
and the result is your normal.

Dam, Tacos de carne azada sound good right now, No Tacos de cabeza :) yeaaah :)

alexCarbonero
12-04-2004, 08:29 AM
Thanks for the links, I started reading now, but don't hold your horses. there is a lot of matirial there, I thought It would be as easy as swapping some function calls, but it's not.

Thanks. sunit

lovisx
12-06-2004, 04:41 PM
Yo comi tacos de cabeza una vez. Solo note que la carne era un poco como se dice. . . . flojo, no muy duro, sentia como moco en mi boca

Fui a mexico por dos anos pero soy canadiense..


Thank you so much alex for this info, thank you so much.

lovisx
12-07-2004, 01:08 PM
:deal: http://www.headus.com/au/samples/norm-MR/index.html (http://www.headus.com/au/samples/norm-MR/index.html)

this is one solution Alex, for normals in Mental Ray

alexCarbonero
12-07-2004, 01:42 PM
si soy Mexicano, nacido Y criado, but I live in LA now.

yeah the headus example is what prompted me to make the maya node, cuss it was a pain in the ass. But it works, you just need to change the dot product order so that it works with zbrush normal maps.

lovisx
12-07-2004, 04:07 PM
changing the the colors or flipping the colors in z brush won't fix it?

lovisx
12-08-2004, 02:02 AM
could you do an example of how you would edit the dot product

I just switched (r and g) from being (y and x) to being (x and y) in the killeroo shadder.
but I'm not sure if its working right.

would this fix it.
the render I did with GI doesn't have me completely convinced.

Thanks

lovisx
12-08-2004, 02:22 AM
it still looks a bit off. There is a yellow spot light angled down on it from the side. The rest, like the green light is GI.

any comments?

http://www.geocities.com/lovis_2000/tester.jpg

lovisx
12-08-2004, 02:44 AM
I think the kileroo network works fine with normal maps exported right out of zbrush. I don't have zbrush at school so I can't remember if this has the x flipped or not.

http://www.geocities.com/lovis_2000/fixed.jpg

lovisx
12-08-2004, 03:49 AM
after looking at the batch renders,

neither of my solutions are accurately recieving light.

lovisx
12-08-2004, 04:05 AM
would any happen to know what the rgb values from the killeroo normal map for mental ray are equal to in x y z?

lovisx
12-08-2004, 04:17 AM
so I put the light at a lower angle, and no the map isn't working at all. I'm a complete failure, my life sucks, kill me now.:applause:

lovisx
12-09-2004, 03:45 AM
here is a comparson between normals and bumps in mental ray
http://www.geocities.com/lovis_2000/fixed2.jpg


http://www.geocities.com/lovis_2000/comparebump.jpg

so what's all the fuss about with normal maps, the bumps are not as deep, but they're more crisp... are my normals maps not working?:sad:

lovisx
12-09-2004, 03:52 AM
I set up a hybrid normal bump map. This seems to have the detail of the bump and the curves or the normal. Maybe it's too much work for too little results. Any critique of what might be wrong, or how to improve things, would be appreciated.

lovisx
12-09-2004, 03:58 AM
here is the hybrid normal map bump and simple bump map.

any comments on how to improve results very welcome
http://www.geocities.com/lovis_2000/hybrid.jpg

Ash-Man
12-11-2004, 04:44 PM
Normal maps are yet not stable on Maya, I wouldnt use in production to be honest with you
Id rather stick with displacment maps

APLevitz
12-12-2004, 10:07 AM
They work great out of the box in Max 7, though. So I'm pretty confident you'll see better support for those in your next update.

lovisx
12-13-2004, 04:25 PM
in what way are they unstable in Maya?

lovisx
12-14-2004, 05:09 PM
sorry refrase my question

in what ways are normal maps unstable in mental ray.

Is that why my normal map was not giving accurate detail?

ThomasMahler
01-05-2005, 09:46 PM
Alright, I tried it again... since my first results sucked, here are new ones.... Again, same model, about 1.600 Polys, this one was NOT modeled with lowPoly in mind, so it's just a simple test.

But I have a few problems:

1) BatchRendering won't render out the normalMap. The model stays completely black in the final rendering.

2) Maya won't show me the Normal Map within the Viewport, if I turn Advanced Lighting on - It shows me some parts of it, but the specular values willl be messed up and the model will look pretty much bugged. I'm on a 9700 Pro here.

3) It's a ZBrush Normal Map, 2048x2048. Allthough it still shows me details like pores, etc., it completely screws up when it comes to the crusted part on his head - That's a very detailed part in the source mesh (which has about 1.600.000 Polys) and on the lowPoly/NormalMap Version it appears very blurry, ugly.

So, here we go:

http://members.chello.at/thomas.mahler/normal_01.jpg

http://members.chello.at/thomas.mahler/normal_02.jpg
http://members.chello.at/thomas.mahler/normal_03.jpg

lovisx
01-06-2005, 04:50 PM
if you hook your normal map right into the maya shader in its normal camera, it will show up in andvanced rendering. Once you start using other shaders it won't work. Some reason they have beautiful support for the real time renderer but nothing for the software render.

Your normal map looks like it isn't deep enough, as if it's cutting off. I'd have to look at zbrush tonight, but there probably is a setting to control depth of the map. I know there is in Maya when you make normals. And when the depth is low you get those black artifacts in the creveces like you've got.

I've noticed that my normal maps are blurry as well, and that the when I apply the normal just as a bump map it looks alot more detailed. I think this is because each pixel of the normal map is describing more information than a bump map. I haven't had time, but I want to test more combining bump and normal maps.

I've just been experimenting though and haven't any formal education on this, so please, please post better info, those who know.

lovisx
01-06-2005, 04:52 PM
no, no, in all honesty I have had time.... it's just those damn video games!

lovisx
02-04-2005, 04:05 PM
any word on how normal maps work in 6.5 and mental ray?

Rook
02-04-2005, 04:22 PM
Normal maps work in Maya 6.0 with mental ray. You need the killeroo normal map network. I can't remeber exactly, but I switched the inputs around a bit for the file r g b color to the first utility node. The network should be hooked up so r=x g=y b=z
If you open the killeroo network in the hypershade you will understand what I mean.
If you look at my grand space opera challenge (linked at the bottom of my post) you will see that all my characters have normal maps on them and where rendered in mental ray.

lovisx
02-04-2005, 04:44 PM
did you find any loss of detail compared to bump map? Why did you use normal and not bump?

I find the normal map looses detail in mental ray and kind of fuzzes out, while the bump map is clear and crisp.

lovisx
02-04-2005, 08:01 PM
for those who don't know here's the killeroo poly normal map mental ray shader
http://www.headus.com/au/samples/norm-MR/

Rook
02-04-2005, 11:38 PM
Normal maps gave me the best result to what I sculpted in zbrush. If I used a bump map of the same details it just didn't look right.
I did notice that the normal map was not as sharp as I would like when I rendered it, but it still looked better then the bump map.

lovisx
02-05-2005, 04:47 PM
I mentioned awhile ago about combining normal maps and bump maps, here's how you do it.

It's very simple.

okay, before looking at this picture remember that the normal map shouldn't hook directly into the bump map node becuase you need something to translate the color info to either maya or mental ray renderer. Here are a couple places you can go to get these important nodes.

http://www.headus.com/au/samples/norm-MR/ this is to render normal maps in mental ray. you put your normal map in the image node and you have to switch it so that r=x b=z and g=y

after you have all this ready, hool the headus shader into the normal camera of the bump map node.

http://www.carboneros.com/mel.htm this has a node to use for rendering normal maps in maya software renderer. Hook your normal map into this node and then hook the node into the normal camera of your bump map.

Sorry for the quick explanation
http://www.geocities.com/lovis_2000/bump-and-normal.jpg

Rook
02-05-2005, 10:01 PM
Thanks, I'll have to try that one out and see what kind of results I get.

lovisx
02-07-2005, 05:43 AM
I emailed headus (the kileroo site) about normal mapping in mental ray this is the answer I got:


"Hello Louis,

> does the normal map loose detail when rendered in Mental Ray?

Not that I've noticed. The Killeroo samples use half rez maps to make
the download easier, so if you're seeing a lack of crispness, that
the reason why.

The main reason we use them (normal maps) is that its the only way to
get accurate detail; they're extracted from the hirez scan data, and
the final render looks exactly like the scan.

bye for now,

Phil"

so I'm sold now, I'm using normal maps instead of bump from now on. I think me error was using low res images about 800 by 600. From now on I'll use 2k images me thinks.

lovisx
02-07-2005, 08:45 PM
some people don't know about this program, but it works better then transfer surface info in Maya.

http://developer.nvidia.com/object/melody_home.html

it's from Nvidia.

lovisx
04-13-2005, 02:29 AM
here's a beautiful shader for rendering normal maps in mental ray maya
JS_Normalizer

in the downloads section of this website
http://www.pixero.com/


all hail Jan Sandstron:buttrock:

sempernow
07-20-2005, 08:50 PM
Does any of you know where I can find the rayDisplace plugin for maya 6.5? The plugin is available in Highend3D but the link is broken for some reason :shrug:. It was compiled by Olivier Renouard the plugins is suppose to help Generating and using normal maps in Maya.

Is there a better way to create normal maps in maya?

Abe_killer
09-27-2005, 04:12 PM
i might sound stupid but why are you using normal maps (or even bump maps )to render highr ez stuff in mental ray and not just a displacement map?it might be longer to set up but the result is much closer than using normal or bump , used mainly in real time applications (games..)

APLevitz
09-27-2005, 04:49 PM
Render time is part of your workflow, too. Weigh the sacrifice, and streamline where possible.

I use a combination of displacement maps to shape my model and normal maps for those details which don't really change the silhouette. Your mileage may vary.

Abe_killer
09-27-2005, 04:52 PM
i found that normal /bump maps add dark areas if your model is not already highrez anyway...so using disp map for renders (even if it takes longer) is the most efficient one...but i guess it depends what u want to render..

schlook
03-01-2006, 12:12 PM
here's a beautiful shader for rendering normal maps in mental ray maya
JS_Normalizer

in the downloads section of this website
http://www.pixero.com/


all hail Jan Sandstron:buttrock:

I canīt get it to work properly... it works if i connect the normalmaps outcolor to the lamberts normal camera and then render it using maya software. But when i connect the normalmaps outcolor to js_normalizer and then connect the js_normalizer normalmap to the lamberts normalcamera it still wont work with mentalray... iīm obviously doing sometghing wrong here.. but what?

CGTalk Moderation
03-01-2006, 12:12 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.