Applying a normalmap

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Applying a normalmap // Archive: Tech Forum

1  2  |  

Post by Tiles // May 24, 2008, 10:37pm

Tiles
Total Posts: 1037
pic
I need a bit help ^^

I have baked a normalmap with Xnormal (great tool), and want to apply it to my model now.

Therefore i have dragged the DX9 Texture shader to my model. Then loaded the texture into it.

http://reinerstileset.4players.de/ext/applynormalmap1.jpg

Okay, i have my DX material applied now. Down the LE, and having a look where to apply the Normalmap shader. And that's where i have my problem with. End of road and still no way to apply my normalmapshader. Hmm.

http://reinerstileset.4players.de/ext/applynormalmap3.jpg

Manual doesn't state anything about this case. How do i apply an external normalmap?

Post by SteveBe // May 24, 2008, 10:48pm

SteveBe
Total Posts: 282
pic
Hi Tiles,

Use the one below, TextureBump.

Post by Tiles // May 24, 2008, 10:53pm

Tiles
Total Posts: 1037
pic
Thanks for the advice. Still the same problem. Where do i load my normalmap here? Where can i find the D3D Window you show here?

Post by Tiles // May 24, 2008, 11:00pm

Tiles
Total Posts: 1037
pic
Ah. Got it. It didn't update the change to the texturebump shader. I had to leave the LE layer and come back. Now i have a field to load my normalmap. Thanks :)


Leads me to the next problem. I cannot see a difference between normalmapped and not normalmapped. Hmm :p

Post by SteveBe // May 24, 2008, 11:05pm

SteveBe
Total Posts: 282
pic
Use Ctl double click on normal bitmap square to load your normal texture.

Post by Tiles // May 24, 2008, 11:08pm

Tiles
Total Posts: 1037
pic
Aww, that's mean. The bump part is another register. Have totally overlooked that one, so i had no picture to ctrl-double click at. Many thanks for the help :)

EDIT, and now i know why i have overlooked the register. It didn't show. A bug i would say :)

Post by SteveBe // May 24, 2008, 11:13pm

SteveBe
Total Posts: 282
pic
You' Rewillkommen.:)

Post by Tiles // May 25, 2008, 2:38am

Tiles
Total Posts: 1037
pic
Okay, so far so good. Just the result is not this convincing. Honestly the result is zero. It doesn't show the smallest influence by the normalmap. I do obviously something wrong.

Here a test with a cube. I have subdivided it a few times and made a normalmap in Xnormal out of it. Then loaded it all into workspace. applied the texture-bump shader with texture and normalmap to a testcube, and ...

Post by prodigy // May 25, 2008, 3:47am

prodigy
Total Posts: 3029
pic
but far as i can see there's no real normal map on your model..


Let me search a nice little free soft that i found on the internet long time ago..

Post by prodigy // May 25, 2008, 4:08am

prodigy
Total Posts: 3029
pic
Ok here it is.. FOR ME?! is the best free software for nomal map creation.

Simple and efective..

few points before start.

1) IS a Dos app but there's a bat to make the run in win more easyer.
2) Load TGA (cant remember if run with jpg and such) but make the test and tellme :D if not you need to conver your textures to tga. (16 or 32b)

Open the bat with the notepad and edit with your texture names..

if you don't put a path like "c:\win\img.tga" and you use only the filename.tga as is showed you need to put the image in the same folder where this soft is located.

i can make a simple video if is needed.. but if all of you make 3d i think this will be a piece of cake :D

Post by Jack Edwards // May 25, 2008, 4:29am

Jack Edwards
Total Posts: 4062
pic
Normal maps are like directional bumpmaps. The point in going from high res to low res would be to take a model with cracks and gouges and modeled detail, then bake that detail into the normal map for the low res model.

The other approach is to paint the detail into a heightmap and then use a mormal map plugin to create the normal map. Here's an example of that approach using GIMP:

The height map:
12507

The generated normal map using Sorbel 3x3:
12508

The result mapped to a cylinder:
12509

Post by Tiles // May 25, 2008, 6:59am

Tiles
Total Posts: 1037
pic
Thanks Prodigy for the suggested app. Still, i have an app to bake normalmaps. Xnormal. And i normally keep my hands away from commandline apps :)


There is a normalmap applied. It is the Texture-Bump DX Shader. It has variations. But none of the variations really shows. I stumbled across this when i tried to apply my normalmap to my character. It makes nearly no difference if just a DX Texture shader applied or the DX Texture - Bump with a normalmap. They both look identical.


That's why i tried this test with a cube with a normalmap for a sphere. When normalmapping would work i would see a difference between the first cube and the third cube. Only difference is that the texture gets a bit darker at some places. When normalmapping would work i would see at least texture disortions here and there. But even that is missing.


I obviously do something wrong. Else this modification at the normalmap would have an effect. But what happens is that the same texture shows different light questionmarks. The cube is cubic mapped.

Post by Tiles // May 25, 2008, 7:05am

Tiles
Total Posts: 1037
pic
The scene.

Post by Jack Edwards // May 25, 2008, 7:16am

Jack Edwards
Total Posts: 4062
pic
To make the normal map from GIMP basically you make a bumpmap from your color map or by hand then:

Select: Filters->Map->Normalmap

In the dialog that pops up change the filter type to Sobel 3x3 and click ok.

Save out the new funky blue image to png format for loading into TS.

You can't really paint directly onto normal maps since the color data has been converted to vector information with the RGB values representing unit vectors for the normal at that particular point in the texture.

For converting existing colormaps into normal maps you probably need something more full featured like Crazybump:
http://www.crazybump.com/

Post by Tiles // May 25, 2008, 7:21am

Tiles
Total Posts: 1037
pic
Thanks Jack, but i am not in Gimp here. I am in trueSpace. I have a normalmap. It is trueSpace not noticing it ;)

Post by Jack Edwards // May 25, 2008, 7:31am

Jack Edwards
Total Posts: 4062
pic
You can't paint the question mark directly on the normal map, it doesn't work that way...

Also TS cannot generate a normal map from a color map. It needs geometry.

Post by Tiles // May 25, 2008, 7:34am

Tiles
Total Posts: 1037
pic
To make it more obvious, i have a SDS mesh in the background. That's the mesh i made a normalmap from. That's the look i expect to have when i apply a normalmap to the lowpoly mesh. At least in the direction.

In the front i have one version with just the texture shader, and one version with texture and bumpmap. Now tell me which one is the one with the normalmap? There is not the slightest difference besides a few strange shadow effects. Both versions looks square-edged. But that's not the normalmap effect i would expect.

Post by Tiles // May 25, 2008, 7:40am

Tiles
Total Posts: 1037
pic
Chross posting ^^


Okay, when i cannot paint directly then it was a bad example. But then the second example should be more obvious. This normamap is made with Xnormal. There is no difference in the result though. I do something wrong. But what?

Post by jamesmc // May 25, 2008, 7:40am

jamesmc
Total Posts: 2566
Here's a quickie wooden crate with a diffuse and normal map.

I used a plug-in in Carrara6pro called Baker (by Inagoni Plug-ins) and made both the diffuse and normal maps.


I then exported the OBJ with textures converted from Carrara as procedural shaders.

I switched to work space sampled the crate with the eyedropper, then re-applied the diffuse map and the normal map in work space by (ctrl-double click) on each section (diffuse and normal) The results are seen below.


I think it's important that the diffuse and normals be baked first before they are utilized. Maybe not, but it works for me. Imported the Normal as a tga. The normal map here is jpeg so is not lossless - just for viewing. :D

Workspace View.

Post by Jack Edwards // May 25, 2008, 7:42am

Jack Edwards
Total Posts: 4062
pic
Tiles, you're confusing Normal maps with Displacement maps.

Normal maps only effect the shading and lighting -- not the geometry.

I've attached two versions of your texture redone as a normal map. you'll notice after applying them that if you rotate your model around you will catch specular highlights off of the edges of the planks.

12517
12518

Post by Jack Edwards // May 25, 2008, 7:50am

Jack Edwards
Total Posts: 4062
pic
Ah I think I see the problem you are having. You still have faceted vertex normals. I think the vertex normal are not effected by the normal map. You still have to set the normal smoothing to smooth or auto-facet. Or manually set sharp and smooth edges.

Post by Tiles // May 25, 2008, 7:51am

Tiles
Total Posts: 1037
pic
You mean i will never get my low poly mesh looking this smooth than my high poly mesh with the normalmap method? And i thought that it is exactly for that. Hmm. Seems that i really mixed the methods here. No wonder am i in trouble, heh :)

Thanks Jack :)

And thanks for the tip with the smooth normals :)

Post by Jack Edwards // May 25, 2008, 7:53am

Jack Edwards
Total Posts: 4062
pic
Well... I wouldn't say never. It'll just take some work. ;)

Ok... well to be exact, you'll still have sharp edges when you rotate the model, but what the normal maps do is to shade it so it looks like there's more geometry there than there really is.

Welcome! :)

Post by jamesmc // May 25, 2008, 7:57am

jamesmc
Total Posts: 2566
Tiles, you're confusing Normal maps with Displacement maps.

Normal maps only effect the shading and lighting -- not the geometry.

I've attached two versions of your texture redone as a normal map. you'll notice after applying them that if you rotate your model around you will catch specular highlights off of the edges of the planks.

12517
12518


Yeah, what Jack said...took me awhile to figure out the difference.

An example of how normal maps are invaluable is from a Zbrush work flow.

I make a model that has 1,000,000 polygons (subdivided 5 times or so)

But I want to use it in a game or need a lower subdivision, but the same result

Zbrush will let me lower the divisions down to 1 or about 3,000 polygons, make and export a normal map that shows all the wrinkles, dents and cracks I had at the 1,000,000 polygon level.

I think normal maps are the greatest thing sinced sliced bread. You can make and model very high polygon meshes, then make a normal map for it and use it on a lower polygon model with the same results! Fantastic I say. :)

However, remember all the real cracks, crevices and dents that you model aren't really there, just the normal map of it. A 3D map if you will of cracks, crevices and dents. Hope I didn't confuse anyone.

Normal Map = Map of directions = that is, directions in which the model surface flows (depths and heights) It isn't the actual model displacement, but a map of that displacement.

(crosses eyes and looks at Jack for clarification) :D

Post by Tiles // May 25, 2008, 8:08am

Tiles
Total Posts: 1037
pic
you'll still have sharp edges

I guess that's what i was trapped here. I expected the geometry to change a bit :)

Great tip with the smoothing by the way. Now i see that my normalmap doesn`t fit. There are shadings at the wrong places. I guess the normalmap needs rotation or flipping. 180 degrees didn't solve it yet. I give a message when i find out. For now i have closing time. Was a hard day :)

Post by jamesmc // May 25, 2008, 8:13am

jamesmc
Total Posts: 2566
Here's a before and after screen of crate with normal map (left) and one without normal map (right)

Post by Jack Edwards // May 25, 2008, 9:11am

Jack Edwards
Total Posts: 4062
pic
LOL James. :)

The clarification: The normal map is a map of the angle of the surface at that point for purposes of calculating lighting and shading.

The render engine can then fake the extra detail because it knows the angle of the normal (ray perpendicular to the surface) at that location.

Post by Tiles // May 25, 2008, 10:44pm

Tiles
Total Posts: 1037
pic
Just for the records, the normalmap was correct aligned. Seems that Xnormal is simply in trouble with my mesh. It creates strange shadows here and there. I will have a look if i can find the reason for that.

Post by Tiles // May 26, 2008, 1:05am

Tiles
Total Posts: 1037
pic
Got it. It was a settings thingie in Xnormals. I have unticked Use cage, and now it bakes without the strange artifacts. All is good :)

Thanks again for all the help :)

Post by Jack Edwards // May 26, 2008, 1:29am

Jack Edwards
Total Posts: 4062
pic
Great news! Glad to hear you got it working :banana:
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn