Aller au contenu

Photo

Creating Nomal Maps


  • Veuillez vous connecter pour répondre
9 réponses à ce sujet

#1
TimelordDC

TimelordDC
  • Members
  • 923 messages
I am not very experienced with Photoshop/Gimp - the max I've done is copy/paste/combine layers so bear with me if this is trivial. This is also the first time I am attempting something like this so I am not familiar with creating normal maps but I'm willing to learn!

I am trying to create some custom vista objects - similar to the treeline in the toolset. The process is fairly simple but I'm stuck on how to create the Normal maps DA uses. I've been reading up stuff but all that I've come across so far is how to create the non-DA standard normal maps.

To illustrate,
here is the diffuse treeline texture - Diffuse
here is the default normal texture - Default Normal
here is the normal texture generated via CrazyBump - Crazybump Normal

DarthParametric mentions here that the Red channel has to be copied to
the Alpha channel and Green channel copied to Red and Blue channels. I have 2 questions -
1. How do I do what DP has mentioned above? I can't find any option in Gimp to copy channels
2. The normal texture is 512 x 512 whereas the diffuse is 512 x 256. Is there a standard that the x/y dimensions of the normal image be the same?

Thanks!
TL

#2
-Semper-

-Semper-
  • Members
  • 2 259 messages
dunno about the channel work in gimp but the normal map has to be the same size as the diffuse map, else the mapping will be wrong. just resize the normal map within gimp.

#3
TimelordDC

TimelordDC
  • Members
  • 923 messages
Semper, the default textures used in the game for that prop - extracted via DATool - shows diffuse as 512 x 256 and normal as 512 x 512. Hence, the question.

Creating normal maps from the diffuse does result in the same dimensions but I was wondering why the ones shipped with the game for this prop are different.


#4
-Semper-

-Semper-
  • Members
  • 2 259 messages
hm, if i open the model with max and load the default textures the uv mapping changes according to the texture which is strange. i've never seen this before and i thought the mapping have to be identical throughout the different textures.

#5
tmp7704

tmp7704
  • Members
  • 11 156 messages
Regarding size of textures, graphics engine uses UV coordinates which are detached from dimensions of individual textures. The exact size would mostly depend on how much detail is there in the texture and how prominent the prop is in the scene -- large textures on items which rarely come into view and tendo to occupy little part of screen are quite a waste of memory.

#6
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
Using non-1:1 resolutions in games is not uncommon, especially when dealing with odd shapes that don't lend themselves well to being mapped in a square layout. As long as the texture size is a factor of 8 it doesn't matter. The game doesn't care because, as tmp7704 said, it relies on UV co-ords that are independent of the texture size or shape. What is happening with the normal map is that the map is longitudinally compressed by half to fit the square shape. The game will essentially stretch it back out when it applies it to the mesh. All 3D apps should do exactly the same thing, so what you saw -Semper- is nothing unusual. The easiest way to deal with this is to create the textures at whatever aspect ratio they have been mapped in, then afterwards compress them in one direction as appropriate in your image editor.



Concerning the channel swap for normal maps, I'm not familiar with Gimp's workings, so I can't provide specifics. The general procedure in PS is to select the channel, then select everything in it with the marquee tool (or via menu/shortcut command), change to the appropriate channel and paste.

#7
-Semper-

-Semper-
  • Members
  • 2 259 messages
yeah, i am aware of that but i thought the aspect ratio stays the same throughout the textures used for the mesh, so to speak the size can differ (e.g.: 1024x1024 for diffuse and 512x512 for normal) but the ratio is identical. guess i learned something :D

#8
TimelordDC

TimelordDC
  • Members
  • 923 messages
I didn't understand a lot of the discussion :unsure: but this I understood....

DarthParametric wrote...

Concerning the channel swap for normal maps, I'm not familiar with Gimp's workings, so I can't provide specifics. The general procedure in PS is to select the channel, then select everything in it with the marquee tool (or via menu/shortcut command), change to the appropriate channel and paste.


Thanks, DP. I'll see what I can do with that information.

#9
nezroy

nezroy
  • Members
  • 99 messages
Regarding channel manipulation in the GIMP, the best method is the Colours -> Components -> De/Re/Compose options.

Take a standard RGB image with or without alpha. Select the Colours -> Components -> Decompose option. It should pick the correct colour model but generally you want RGB if you have no alpha information, and RGBA if you do have alpha information. Leave "Decompose to Layers" checked.

This will create a new temporary grasycale image (Image -> Mode -> Grayscale) that has 3 (or 4) layers containing the grayscale data for each channel from the original. You can now modify each individual channel as a standard grayscale layer.

Select Colours -> Components -> Recompose to update the original image with the new channel data you've been modifying in the temporary image. Alternately, Colours -> Components -> Compose creates a new image combined out of the channel data.

Striclty speaking, you don't have to Decompose first. You can run Colours -> Components -> Compose on ANY image in grayscale mode and pick and choose which layers should be used for channel data. The Decompose/Recompose thing just links the temporary image where you edit the grayscale channels with the original image so you can quickly make a few edits to the channels in the temporary image, hit Recompose to update the original and see how it looks, make a few more edits, hit Recompose again, etc.

(Note that, as part of the link when using Decompose/Recompose, you don't want to delete any of the original channel layers in the temporary image that were created as part of the decompose. The 3 or 4 original layers that are created are always used for the recompose operation. If you delete one of these, it will no longer recompose properly, even if you rename a different layer to the same name. You can add new layers of course and copy any data INTO the original layers, completely replacing their content, etc., just don't actually remove those layers).

Modifié par nezroy, 09 septembre 2010 - 11:21 .


#10
TimelordDC

TimelordDC
  • Members
  • 923 messages
Thanks, nezroy. That helps a lot.