Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Modding Tutorials => Topic started by: TrashMan on August 17, 2008, 06:21:24 am
-
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?
-
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.
-
WOHOOO!
Thanks, that did it!
(http://img204.imageshack.us/img204/1089/phoenixnormal1bu8.th.jpg) (http://img204.imageshack.us/my.php?image=phoenixnormal1bu8.jpg)
-
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.
-
I hate image shack, it always gives me a bunch of popups when I click on a link :\
*seconds what herra said*
-
Get FF and AdBlock Plus.
-
For AdBlock Plus, create a *.js* rule. Then, make exceptions when needed. -> no friggin' popups anywhere ever again.
-
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?
(http://img376.imageshack.us/img376/590/gtffalcon2pb1.th.jpg) (http://img376.imageshack.us/my.php?image=gtffalcon2pb1.jpg)
-
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...)
-
Might try helping DaB, VA, Herra and Co. NM the rest of the HTL ships.
-
HTL DEMON!
urrr...or yeah you could help normal map the HTL fighters that look good already :P
-
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
-
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.
-
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).
-
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.
-
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.
-
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)
-
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:
(http://i38.tinypic.com/5mdawh.png)
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).
(http://i34.tinypic.com/34fxkk7.png)
Same with a neutral gray background.
(http://i37.tinypic.com/2v16agg.png)
Greyscale version of the elevation map - red has become bright (elevated areas) and blue dark (recessed areas)
(http://i35.tinypic.com/bhftk3.png)
Finally, a normal map generated from the elevation map.
(http://i35.tinypic.com/2zzuesn.png)
EDIT: The end result looks like this (click for full size):
(http://i31.tinypic.com/9tn3ix.png)
To get the final normal map to actually work in FS2_Open shader system, read this thread here (http://www.hard-light.net/forums/index.php/topic,55854.0.html).
Also remember that this is just my preferred method of working with normal maps. Other most likely have their own methods of making them...
-
ok i get it... makes sense... lemme show ya what im working on...
(http://img409.imageshack.us/img409/7300/panel1ym1.th.jpg) (http://img409.imageshack.us/my.php?image=panel1ym1.jpg)
(http://img361.imageshack.us/img361/3/uv1zn7.th.jpg) (http://img361.imageshack.us/my.php?image=uv1zn7.jpg)
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
-
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.
-
Draw the blue (or whatever) stuff on a layer, find Hue-Saturation-Lightness (or something equivalent to that in Photoshop), adjust saturation to zero and lightness to either dim or bright, depending on which one you want the colour to be on the elevation map.
However, an edge will only give you a raised (or recessed) edge of a panel, with the middle being at the same level as the surrounding area. If you want a full, raised panel, you'll have to make a solid bright area on a darker surrounding.
-
so then for sake of argument, the panel edges need to be light gray and the panel face needs to be white?
-
Making flat, raised panels, eh? Here's what I would do, in your situation.
First make a layer in solid medium gray, then put it underneath your UV map layer that outlines the model. Make a new layer for the raised panels. Grab your polygonal lasso tool and make a selection the size you want. Then fill it white, at about 20% opacity. If you want it to be higher, increase the opacity so it's a lighter shade of gray. Do this for all your panels. If you want more panels on top of the original ones (for a ziggurat effect) lasso again and fill again in 20% white.
Now, invert the colors on the UV map (so it's now white instead of black.) Make a new layer for the seams and details. Grab your paintbrush tool in black at about 20% opacity again, and trace the lines you want to be engraved into the panel. Again, the greater the opacity, the deeper the grooves. When it's all done turn off the UV map layer, leaving your shading on a gray background.
You can also invert these to make inset panels, or raised ridges, on your model, by darkening or lightening panels or lines. Think of your heightmap as a topographic map, where medium gray is the base level, white is the highest area and black is the lowest. If you were to make a height map for the planet Earth, it would look like this. See how the mountains are white, the plains are gray, and the oceans are black?
(http://paginas.terra.com.br/educacao/alessandroborges/bump/thun_earth_bump.gif)
The height map's all you really need, as Photoshop's plugin will generate a normal map from it for you.
-
This works just as well (and probably better).
(http://i34.tinypic.com/2a6s1mo.png)
...Galemp was faster. Curses and foil.
-
That's OK, you've illustrated. :)
hmm, someone ought to sticky this and merge in other threads related to normal mapping, including the one in the SWTC forum. In particular this StarWing is a great example of how to use normal maps effectively.
-
ok just so i understand this, what i'm doing is creating white panels on top of the UV map, then invert the UV map colors and edge the panels in black... then get rid of the UV map layer and use the normal plugin, correct?
-
Right. The UV map layer is only there to guide you. I suggested inverting the colors so you can see what you're doing, and not drawing black lines on a black background. You could recolor the UV map fluorescent pink and chartreuse if you wanted.
You probably don't want to edge the panels in black unless you want a 'moat' around the panels. Remember, it's like a topo map. Whenever you lighten it you're adding height, and whenever you darken you're dropping the height.
-
right ok, but doing it in black @20% opec isn't black, correct?
-
i must be doing something wrong... here's what i came up with
(http://img137.imageshack.us/img137/4774/normalattemptdq7.th.jpg) (http://img137.imageshack.us/my.php?image=normalattemptdq7.jpg)
now when i inverted the UV map layer 2 (my pannels i drew) vanished, so i inverted layer 2 so i could do layer 3... then i inverted it back before i turned off the UV map.
In the 3d preview i see nothing but a big gray square on all of the layers except layer *3... there i see white outlines of the panels but thats it.
-
another one:
(http://img187.imageshack.us/img187/7728/thunderboltnll7.th.jpg) (http://img187.imageshack.us/my.php?image=thunderboltnll7.jpg)
-
what file format do i need to be saving these normal maps as? the nvidia plugin gives me a bajillion options
-
what file format do i need to be saving these normal maps as? the nvidia plugin gives me a bajillion options
DTX5_nm
-
my brain is turning to mush at this point... once i create a normal map i can go back to the UV map and start the process all over again to give texture details to the model, such as color and such, right?
for FS's way of doing things, i need to use like port-wing.dds for the base texture, and port-wing_normal.dds for the normal map name?
-
my brain is turning to mush at this point... once i create a normal map i can go back to the UV map and start the process all over again to give texture details to the model, such as color and such, right?
for FS's way of doing things, i need to use like port-wing.dds for the base texture, and port-wing_normal.dds for the normal map name?
Usually I add the details first, then do the bump map (for normal map creation).
Texturing details (like colors, warning stickers...etc) would go in the texture file (in this case port-wing.dds)
Glowing stuff (glowmaps) would go in port-wing-glow.dds
shine in port-wing-shine.dds
and
normal map would go in port-wing-normal.dds
Although I've never used the minus key as part of the "base" filename. It should still work, if they coded it correctly.
-
what file format do i need to be saving these normal maps as? the nvidia plugin gives me a bajillion options
DTX5_nm
Actually it's not that simple... DXT5nm file is simply a DXT5 file where the red channel of the normal map is moved to alpha channel, and green channel is copied to red and blue channels.
It's possible to manually move the channels to their appropriate place and save the file as regular DXT5 (which will in fact be identical to a DXT5nm file due to channel management) - OR, and this is where it gets interesting, you can save the file as uncompressed u8888 DDS file, which can sometimes be advantageous if you want to prevent any compression artefacts (especially if your normal map has a lot of diagonal panel lines and other stuff that suffers from aliasing effects easily). Handy for taking screenshots at very close distance to surface... in some cases anyways.
-
Actually it's not that simple...
Umm dude... Sometimes too much info can be as bad as too little for a beginner. *Overload*
-
That Thunderbolt is lookin sexeh.
Care to post those normal maps for download?
-
Normally I'd agree, but this guy's been like a sponge with everything everyone has thrown at him so far. And I just wanted to thank everyone who has made detailed, informative posts in this thread, there's a lot of gold in here now. It should definitely be copied somewhere and stickied or something.
-
Hmm. I'm surprised I'm the first one to say anything, but those normal maps seems a little too heavy for me, the panel lines seem incredibly deep and cut into the hull. But it looks like you definitely got the hang of making normal maps down.
-
yeah i'm not trying to sound too self righteous or what not but chief is right. I'm trying to learn this mess asap to make this starwing look good... Lucasarts aint gonna have nothin on me =p I think i decided the best course of action is to just do the panels in varying shades of color for now on a defuse map and once im done with that go back and do the normal from there. Does anyone have a recommendation for a rendering program that can pull all of the maps in at once... like fs2 does =p?
-
If you are using a greyscale height map, then most renderers will support that, oddly enough, the hard part is the glow-map since Freespace 2 looks at them differently to how the average rendering program does.
-
well i mean something that can pull all of the texture maps in... All i have is truespace, LU and PCS right now... i dont think PCS supports normal maps, im not sure.... from what i did last night it didn't seem to, all it did was the coloration. I know LU doesn't support using more than 1 map but it did seem to beable to use the normal. I just wanna beable to see what this looks like with normal and defuse and any other maps i pull in later
-
Yup, there aren't many raytracing programs that will support a normal map, it's really designed for scanline rendering, since it's a 'simple' way to achieve a similar effect to height-maps but is a lot less heavy on the processors. Ray Tracing programs don't consider time as premium.
Truespace can render the object with seperate colour/bump, once you've worked out how to edit the material, but I'm not really versed well enough to tell you how :(
-
Yup, I may have to reduce the contrast in photoshop for the Thunderbolt. Or were you reffering to the Falcon too?
no worries, I'm putting these ships at sectorgame (with the normal and shinemaps).
-
Random question about normal maps: I tried to get them running on a Windows XP box using a Radeon 9800 video card (2003-era.) I have the 3.6.10 beta Assets VP, -normal and -height were enabled, and I'm using a shader pack placed in the MediaVP folder. MVP is selected as a mod. No luck, however!
Is this card simply too old for normal maps?
-
This is great! I can finally make normal maps!
Thank you, Herra!
/me runs off to make normal maps for all the INFR1 and INFA ships*
BTW, I find CrazyBump to be very useful for making normals; but only if you make them with height maps. It doesn't make very good normals if you just drop a regular texture in it and use it.
Oh and also, the GIMP .dds plugin can conver the purplish normal maps into the SCP-compatible maps too, if you can't afford Photoshoop.
-
Battuta, the 9800 is indeed too old.
-
ok question time again. does a normal map affect coloring of a diffuse map? like if im doing large raised panels on a normal map thats a lighter shade than the textured panel, will that screw with the combined look?
*edit
i'm asking because i have no way of testing how both maps look together with out pof'n and tabeling to throw in game
-
Battuta, the 9800 is indeed too old.
Thank you!
-
Hmm. I'm surprised I'm the first one to say anything, but those normal maps seems a little too heavy for me, the panel lines seem incredibly deep and cut into the hull. But it looks like you definitely got the hang of making normal maps down.
They seem really wide, the angle of the sides (correspondences to contrast) of seams doesn't look that bad, but because of the seam lines being so wide they seem to go deeper down (naturally). Besides that, the maximum angle of normal that the normal map can change seems to be about 70-75 degrees at the most (taylor probably knows because he made the shaders), and that in itself isn't too much for a seam line profile, but if you then make that seam too wide and continuous it'll look like it cuts down a lot.
My advice would be to use about similar contrast, but thinner lines on the height map. Working on high resolution can help that, as it is much easier to make those thin lines (relative to the base map) in higher resolutions. Reducing contrast in this case would probably make the lines wide and mild-angled...
-
Merged the topic about drawing panels to this one due to popular demand and common sense.
-
Part of the problem with the Thunderbolt was the underlying texture..I fixed the normal maps a bit...
Here' - normals and shinemaps for the Falcon and Thunderbolt
http://www.mediafire.com/?sharekey=2c937bcb38ef65c1d2db6fb9a8902bda
EDIT: forgot to put in the fixed diffuse map for the Thunderbolt..here, I'll attach it.
[attachment deleted by ninja]