Author Topic: About normal maps  (Read 18046 times)

0 Members and 1 Guest are viewing this topic.

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
I've been meaning to ask this.

I grabbed CrazyBump and decided to make normal maps for some of my fighters. Luckily, i have Photoshops files for hte maps, so I could easily remove all the warning signs, paint jobs, stripes and insignias, leaving just the hull. I used that image to generate a normal map and I put it in.
Tested with one of the latest FSO builds....but nothing happens.


I noticed that my normal map seems to be in bluish-purplish colors while the ones used by other ships are green. Am I doing something wrong here?
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
I've been meaning to ask this.

I grabbed CrazyBump and decided to make normal maps for some of my fighters. Luckily, i have Photoshops files for hte maps, so I could easily remove all the warning signs, paint jobs, stripes and insignias, leaving just the hull. I used that image to generate a normal map and I put it in.
Tested with one of the latest FSO builds....but nothing happens.


I noticed that my normal map seems to be in bluish-purplish colors while the ones used by other ships are green. Am I doing something wrong here?

Yes. FS2_Open normal maps require a normal map style DDS file to work, which means that the game reads alpha channel and green channel for the x/y slope information. There are two ways of doing this:

1. Convert the purplish TGA file into DXT5nm format. This will work if your Photoshop DDS plugin has this option, or if you use nvDXT like I do (gives you command line utility to convert files to different kinds of DDS files with a lot more options than most plugins).

With nvDXT, the appropriate command would be

>nvdxt -file normalmap.tga -dxt5nm -quality_highest -cubic

Basically, -file specifies the file to be converted, -dxt5nm sets the file to be converted to dxt5nm format, -quality_highest supposedly minimizes quality loss, and -cubic sets the mip mapping filtering to use cubic resize filter, which to my experience gives perhaps the best results for keeping the normal map strength in the mipmaps as well, which basically affects how close the normals will become noticeable in the game. You can also manually edit the mip maps if your DDS management software (photoshop plugin most likely) can save custom mipmaps - basically you would want to increase the contrast of your normal maps' mipmaps slightly for them to be observable from distance, but don't go overboard with that... :nervous:


2. Manually managing the colour/alpha channels into correct order, then saving as normal DDS file (I prefer this, because it lets me able to use uncompressed DDS format if I want or need to...) To accomplish this, you need to move the red channel to alpha channel and copy green channel to red and blue channels - stricktly speaking I'm not sure if copying green to red and blue is necessary, but I prefer gray to green in my normal maps and AFAIK it doesn't change anything as far as memory usage or file sizes are concerned.

Then you need to save the channel-managed file as TGA and then convert it to a DDS file with full 8-bit alpha channel, which leaves you two options - DXT5 or uncompressed u8888 format. Basically, with u8888 you get rid of any and all compression artefacts, but with DXT5 compression you get a lot better memory efficiency, and usually the high quality compression flag in nvDXT produces a sufficient quality normal map.


As far as making the normal maps goes - a few tips that I noticed beneficial to my work. First, I avoid CrazyBump like a plague and make my normal maps from hand-crafted height maps in GIMP with the Normalmap plugin (gives unlimited control as opposed to CrazyBump's arbitrarily set sliders that supposedly adjust the strength of the normal map generated...), so these might not apply to you... but anyway.

If you can, make the original normal map in 4096^2 resolution, and scale it down to 1024^2. This makes it a lot easier to make thin diagonal lines between panels (and other detail as well) accurate but strong and minimally aliased at the same time. With lower resolutions, you are forced to use a thin drawing tool which either makes the line rather faint, or visibly aliases the diagonal lines. Also when you convert to normal map, small errors will often surface from the height map not being quite correctly made, but resizing to quarter size tends to smoothen all rough edges to what you would actually want them to be.

Also, when you have made the normal map out of height map, the depth of the detail in normal map is easily adjusted by changing the contrast. Lines require a pretty sharp contrast, surface detail not so much, so you might want tomake the lines and surface detail in separate layers, then make #7f7fff into alpha for the surface detail and place it over the lines of the lower layer.
« Last Edit: August 17, 2008, 06:58:31 am by Herra Tohtori »
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
WOHOOO!

Thanks, that did  it!
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
WOHOOO!

Thanks, that did  it!



Great. :)

Now you just need to get the strength of the normal map balanced to a level where the depth of the seam lines is sufficient to notice. The profile of the map looks good (though judging that is difficult with just one screenshot to look at - hint hint :P), but I think it would benefit from increased contrast to increase the depth of the lines on the hull.
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline Hellstryker

  • waffles
  • 210
    • Skype
I hate image shack, it always gives me a bunch of popups when I click on a link :\
*seconds what herra said*

 

Offline colecampbell666

  • I See Dead Pictures
  • 212
  • Evolution and ascension.
Get FF and AdBlock Plus.
Gettin' back to dodgin' lasers.

 

Offline Jeff Vader

  • The Back of the Hero!
  • 212
  • Bwahaha
For AdBlock Plus, create a *.js* rule. Then, make exceptions when needed. -> no friggin' popups anywhere ever again.
23:40 < achillion > EveningTea: ass
23:40 < achillion > wait no
23:40 < achillion > evilbagel: ass
23:40 < EveningTea > ?
23:40 < achillion > 2-letter tab complete failure

14:08 < achillion > there's too much talk of butts and dongs in here
14:08 < achillion > the level of discourse has really plummeted
14:08 < achillion > Let's talk about politics instead
14:08 <@The_E > butts and dongs are part of #hard-light's brand now
14:08 <@The_E > well
14:08 <@The_E > EvilBagel's brand, at least

01:06 < T-Rog > welp
01:07 < T-Rog > I've got to take some very strong antibiotics
01:07 < achillion > penis infection?
01:08 < T-Rog > Chlamydia
01:08 < achillion > O.o
01:09 < achillion > well
01:09 < achillion > I guess that happens
01:09 < T-Rog > at least it's curable
01:09 < achillion > yeah
01:10 < T-Rog > I take it you weren't actually expecting it to be a penis infection
01:10 < achillion > I was not

14:04 < achillion > Sometimes the way to simplify is to just have a habit and not think about it too much
14:05 < achillion > until stuff explodes
14:05 < achillion > then you start thinking about it

22:16 < T-Rog > I don't know how my gf would feel about Jewish conspiracy porn

15:41 <-INFO > EveningTea [[email protected]] has joined #hard-light
15:47 < EvilBagel> butt
15:51 < Achillion> yes
15:53 <-INFO > EveningTea [[email protected]] has quit [Quit: http://www.mibbit.com ajax IRC Client]

18:53 < Achillion> Dicks are fun

21:41 < MatthTheGeek> you can't spell assassin without two asses

20:05 < sigtau> i'm mining titcoins from now on

00:31 < oldlaptop> Drunken antisocial educated freezing hicks with good Internet == Finland stereotype

11:46 <-INFO > Kobrar [[email protected]] has joined #hard-light
11:50 < achtung> Surely you've heard of DVDA
11:50 < achtung> Double Vaginal Double ANal
11:51 < Kobrar> ...
11:51 <-INFO > Kobrar [[email protected]] has left #hard-light []

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
Finally found some time to fiddle with normal maps again. I also added a shine map. I think I'm getting better at this, no?
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 
Yes you are Trashman, yes you are. Now can you start Hi-polyfying and upgradng the textures on older fighters and bombers that we have icking around? (like the Icarus, Donar, Banshee, Shu, Hamano's HercMK3, the Banshee, the Icarus, the Donar... wait a second...)
Sig nuked! New one coming soon!

 

Offline colecampbell666

  • I See Dead Pictures
  • 212
  • Evolution and ascension.
Might try helping DaB, VA, Herra and Co. NM the rest of the HTL ships.
Gettin' back to dodgin' lasers.

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
HTL DEMON!

urrr...or yeah you could help normal map the HTL fighters that look good already :P
(´・ω・`)
=============================================================

 
drawing panels -> normal maps?
I've got photoshop cs2 up and running with the nvidia normal map plugin... if i wanna make a simple panel and do the normal mapping thing, how exactly do i accomplish it? i can't seem to find any literature that explains this very well. I've got the UV map for the object i wanna panel all sorted and ready for texturing

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
Yeah, the Demon

It's backside is a BIG problem to map, since it uses one honking big not-so-good looking texture for it that looks absolutely terrible when put on a high-poly model.

Unless someone else maps it or at least makes a better set of textures (at least the rear one) for the Demon, I fear it will stay in the state that it is currenlty.
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
Re: drawing panels -> normal maps?
You can either make a heightmap that follows the lines of the panel and then use Crazybump to make a normal map out of it OR you cna try to make a normal map out of the texture.

I suggest the first. It's easy. Make a new layer (should be grey-ish) and then follow the lines of the plating (backish). Surfaces that you want to be a intruded a tad should be darker (or brighter - doesn't matter what you choose, Crazybump can invert the values anyway).
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Re: drawing panels -> normal maps?
I like using a normal map plugin a lot more than using Crazybump, but either works.

Basically, you will want to make an elevation map based on the detail seen in the texture, following the panel lines. And you will likely want to work in relatively high resolution for this phase, because when you eventually resize the normal map down to final size it will eliminate a lot of aliasing problems and other things that will arise if you work on too small a resolution when drawing the panel lines.

If the original is 1024^2, I usually work in 4096^2. I start by placing the original texture on the bottom layer, and create a transparent layer on top of that. On this layer I will draw panel lines and other indentations with pure red colour. If required, I make another layer and trace the elevated parts with blue colour. Eventually I convert the red lines into black or dark grey, blue parts into white or bright grey, and create a mid-level gray layer (#7f7f7f or #808080, either work just fine) and overlay the black and white parts on top of it. Then I copy the resulting visible elevation map into a new image and apply normal mapping on it, trying different settings to get a good end result.

Panel lining is cake to make. Machinery and other complex shapes are a pain in the backside, but they are definitely worth the effort it takes to make them properly. With some practice, you'll learn what kind of gradients in the elevation map will produce what shapes in a normal map. Basically, a linear gradient will look like a steady-angle elevation with sharp edges. A spherical (usually blurred) gradient will cause a more rounded profile for the indentation or extrusion, and so on.
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline Getter Robo G

  • 211
  • Elite Super Robot Pilot
Heya Trash,

Could I bug you for a favor...

Seems someone wanted me to re-release my conversion of GY's Yukkikaze.
Thing is I was not happy the way it came out originally after I did release it and asked a texture question that NOT ONE SINGLE PERSON took the time to answer even if was to bea negative one, like "no way!"

So I'll ask it to you directly then make a request.

Can a model that has a low resolution texture, be made better by working on that texture (liek making a 256 a 512?) so when you get closer there is less pixalization?

Now for my request/new question: Would you be willing to make a normal map for Yukkikaze?

I will repost a pic if you do not know the anime plane I am talking about. I haven't made a shine map for it yet but plan to soon as I did nothign else for it after the raw conversion.

"Don't think of it as being out-numbered, think of it as having a WIDE target selection!"

"I am the one and ONLY Star Dragon..."
Proof for the noobs:  Member Search

[I'm Just an idea guy, NOT: a modeler, texturer, or coder... Word of advice, "Watch out for the ducks!"]

Robotech II - Continuing...
FS2 Trek - Snails move faster than me...
Star Blazers: Journey to Iscandar...
FS GUNDAM - The Myth lives on... :)

 
Re: drawing panels -> normal maps?
so blue is for elevation and red is for depression? and should i be doing this on the black and white UV map or on the "textured" (just 1 solid color, no paneling yet)

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Re: drawing panels -> normal maps?
so blue is for elevation and red is for depression? and should i be doing this on the black and white UV map or on the "textured" (just 1 solid color, no paneling yet)


You can use any colours you want while drawing the lines and details and stuff. I choose to use bright red, bright blue and (sometimes other colours if I need multiple layers) because they usually stand out well from the base texture and I cansee what the hell I'm doing. ;7

The elevation map itself must be in shades of gray for the normal map plugin to work correctly as far as I know. So you will need to, at some point, de-saturate the colours in their own layers and then brighten or darken them according to their elevation (deeper = darker, higher = brighter).


Example might be in order before I confuse people more... :nervous: This is of the workflow of the GTB Rhea normal mapping I did a few times ago... Of course, these are resized versions - the original work was done in 4096^2 resolution and the final normal map was 1024^2, but for everyone's sanity I'm using resized versions - they work just as well for showing what's going on.

Base diffuse map:


Stuff I want to have in the normal map. Blue is to mark seamlines, recesses and stuff like that, red is to mark stuff that extrudes upwards from the surroundings. The details are drawn on about five different layers instead of a single layer for ease of seeing what I'm doing (same reason as using bright colours that stand out from the base).


Same with a neutral gray background.


Greyscale version of the elevation map - red has become bright (elevated areas) and blue dark (recessed areas)


Finally, a normal map generated from the elevation map.


EDIT: The end result looks like this (click for full size):



To get the final normal map to actually work in FS2_Open shader system, read this thread here.


Also remember that this is just my preferred method of working with normal maps. Other most likely have their own methods of making them...
« Last Edit: August 29, 2008, 01:11:10 pm by Herra Tohtori »
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 
Re: drawing panels -> normal maps?
ok i get it... makes sense... lemme show ya what im working on...





Here's the original UV map of the area i'm working on so you can better see what it is. There's really nothing to this particular object, i just want a few raised panels on it... anyways I should tell you i have about... 6 hours experience with photoshop =D I've got a few open references on how to do a few things but one of the things i can't find is how to make my blue line white or bright gray... I guess i could just make it bright gray to begin with but i would love to know how to do it anyway for reference in the future, that and my base color is a bright gray anyway >.>

really I'm trying to map the panels before i get into the finer details


 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
Short answer - yes, a more detailed texture map can work wonders.

Erm, I'm a bit busy right now to make textures for you, but you can do it yourself even with only rudimentary Photoshop knowledge. Make a heightmap for the fighter - CrazyBump will make a normal map for you. Does a pretty decent job if the heightmap is good.
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!