Author Topic: General normal map&modelling thread  (Read 19236 times)

0 Members and 1 Guest are viewing this topic.

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
General normal map&modelling thread
Heya, an other question.
After several attempts at making a texture myself (all failed horribly) I just yoinked something off the internet and slapped it on my model with decent results. Now i'm working in 3ds max 6 and pretty much applied the same texture as a bumpmap as well as the diffuse color.
(Top = result in pcs2, bottom = render in 3dsmax)

When I export it like that though, PCS2 will only show the diffuse.

So how does one get a bump mapped model in freespace2?
« Last Edit: April 03, 2009, 04:00:04 pm by Spoon »
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Cant get bump map into PCS2
pcs2 doesn't support bump mapping.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Cant get bump map into PCS2
Aright, then how are all those HTL ships looking so nice and bumpy? Normal maps? (I dont t think 3dsmax 6 supports that though...)
Or was some other program used to import those models into freespace?
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Cant get bump map into PCS2
well you just have to use the proper naming conventions for the engine texturename-normal.whatever or texturename-height.whatever. pcs2 simply does not yet have the rendering capabilities of the fs engine.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Cant get bump map into PCS2
Could you perhaps describe that in a bit more detail...?
I have a texture, I have a normal map made of that texture (nvidia plugin in photoshop). And now i'm missing the steps to get it working in fs. I've already spend hours looking at wiki entries telling me that stuff is possible (but not on how to actually do it) and searched the forums over and over. 
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 
Re: Cant get bump map into PCS2
This is a good start. It's where I started when I first got here. :)

http://www.hard-light.net/forums/index.php/topic,43189.0.html


Plus my thread when I did the Ezechiel:

http://www.hard-light.net/forums/index.php/topic,56741.0.html
Got Shivans? The SOC Ezechiel is the schnitzel! Don't leave base without it.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Cant get bump map into PCS2
I wonder why those threads never showed up in any of my searches of this forum... stuff like that should be stickied!
Thanks Jadehawk that certainly is useful stuff! I'm still in the dark on the normal/bump mapping thing though
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Water

  • 210
Re: Cant get bump map into PCS2
Aright, then how are all those HTL ships looking so nice and bumpy? Normal maps? (I dont t think 3dsmax 6 supports that though...)
Or was some other program used to import those models into freespace?
In the mainhall, press F3 for the lab viewer

Normal map info http://www.hard-light.net/forums/index.php/topic,55854.0.html

 
Re: Cant get bump map into PCS2
The first link IS stickied  :nod:

My thread is like 12 to 15 pages back and was able to find it by typing in Ezechiel in the search function.  :D
The first thread link gives you a run down on how to make normals.
but in a very basic way to make normals, you need a Neutral Gray background with Black and White details. Black will show up as recessed details and White will show up as raised details. Once you have something like that ready, save it as a .tga file. Get a program such as Crazybump, open the saved .tga file and let the program run. Once you see the normal in a viewer, you can adjust the image to show the relief as you want it. Once satisfied, save it as a normal file. Then run a nvDXT program to create the final normal FreeSpace2 can use. Save it and rename it "yourfilename"-normal.dds without the "".

Finally, make sure your video card can support normals and your Freespace2 program has the latest mediavps located on this site to use the normals.
Got Shivans? The SOC Ezechiel is the schnitzel! Don't leave base without it.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Cant get bump map into PCS2
The first link IS stickied  :nod:
Buh.. eh... gah
HOW COME I MISSED THAT ALL THIS TIME?  :hopping:
Ugh, at times I curse my own stupidity/blindness.

My thread is like 12 to 15 pages back and was able to find it by typing in Ezechiel in the search function.  :D
The first thread link gives you a run down on how to make normals.
but in a very basic way to make normals, you need a Neutral Gray background with Black and White details. Black will show up as recessed details and White will show up as raised details. Once you have something like that ready, save it as a .tga file. Get a program such as Crazybump, open the saved .tga file and let the program run. Once you see the normal in a viewer, you can adjust the image to show the relief as you want it. Once satisfied, save it as a normal file. Then run a nvDXT program to create the final normal FreeSpace2 can use. Save it and rename it "yourfilename"-normal.dds without the "".

Finally, make sure your video card can support normals and your Freespace2 program has the latest mediavps located on this site to use the normals.
Alright well, I can't exactly blame myself for not searching with 'Ezechiel '  :lol:
Thanks for the info though! Same for you Water! I think i'm starting to understand how it's done now.

It's a bit troublesome that a lot of this info has to be gathered from several different threads&wiki articles and internet tutorials. It's a big puzzle for someone new to this stuff.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Cant get bump map into PCS2
Forgive me for the double post.

Hurrah, some kind of result! I'm now just doing a lot of trail and error on several settings though. Saving it in photoshop as dxt5 seems to get the best result so far. But there are a lot of save options that don't really mean anything to me. Whereas im seeing a lot of recommendations for dxt5nm but that just gives me a wierd effect.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Water

  • 210
Re: Cant get bump map into PCS2
dxt5nm is what you need. The resulting map will look a weird greenish colour.
If the photoshop filter can't do dxt5nm then save as tga. Then convert the purple normal map to dxt5nm using either Nvidia or AMD normal map tools. (nvdxt or Compressonator)

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Cant get bump map into PCS2
Well color me confused (again)
I'm using the nvidia .dds&normal map plugin. But all my normal maps either look blueish/purple. And if I save them as a dxt5nm .dds and open them again they are grey. I never get a greenish version of anything.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Aardwolf

  • 211
  • Posts: 16,384
    • Minecraft
Re: Cant get bump map into PCS2
If you used the right mode, it should look sort of like the ones in the mediavps, right?

 
Re: Cant get bump map into PCS2
Well color me confused (again)
I'm using the nvidia .dds&normal map plugin. But all my normal maps either look blueish/purple. And if I save them as a dxt5nm .dds and open them again they are grey. I never get a greenish version of anything.


All mine are Gray, so your good to go.  :yes:
Got Shivans? The SOC Ezechiel is the schnitzel! Don't leave base without it.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: Cant get bump map into PCS2
The ones in the mediavp's are not strictly saved with the DXT5_NM option, Just DXT5. And they only have data in the Green and Alpha Channels, hence the color. DXT5_NM populates Red and Blue with un-needed data and I think does nothing in the alpha channel.

Take the file saved as DXT5_NM. Select the Red Channel. Select All and Copy. Create Alpha Channel. Paste. Now turn Red and Blue solid black. Save as DXT5 (or u8888 if you are still making adjustments).

c_bump generation via the shaders only evaluates on the Green and Alpha channels, hence this method.

You can still get results just using a DXT5_NM, but we in the FSU have found the above process generates better results.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Water

  • 210
Re: Cant get bump map into PCS2
The ones in the mediavp's are not strictly saved with the DXT5_NM option, Just DXT5. And they only have data in the Green and Alpha Channels, hence the color. DXT5_NM populates Red and Blue with un-needed data and I think does nothing in the alpha channel.

Take the file saved as DXT5_NM. Select the Red Channel. Select All and Copy. Create Alpha Channel. Paste. Now turn Red and Blue solid black. Save as DXT5 (or u8888 if you are still making adjustments).

c_bump generation via the shaders only evaluates on the Green and Alpha channels, hence this method.

You can still get results just using a DXT5_NM, but we in the FSU have found the above process generates better results.
Umm.. you are getting the format completely mixed up...
Dxt5nm is the format used. Green + Alpha.   Green is green - Red is in Alpha and blue is derived from those two channels.
The grey ones have extra un needed data in the red and blue channels. Aparrently the extra red and blue can cause extra artifacts in compressed normal maps.

@Spoon If they are saved as DXT5nm and they are grey don't worry about it. nm stands as you guessed for normal map, but the channels get switched around and only two are used. DXT5 won't do the job, it has to be DXT5nm.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Cant get bump map into PCS2
Thanks for the replies guys! I finally got it figured out now. Though one thing I had to discover myself the hard way, to get any result 'convert to tangent space normal map' should be checked off.
The way i'm doing it now: 1. Make height map based off diffuse texture.
2. Throw heightmap into crazybump (and crazy it is, telling me i'm but a puny human), though I guess this phase could also be done with the nvidia plugin for photoshop.
3. Switch some sliders around (intensity should be kept pretty low)
4. Copy normals onto clipboard, paste it in a photoshop layer
5. save as DXT5_NM .dds (xxxxx-normal.dds)
6. throw file in maps folder
7. ???
8. profit.


What photoshop looks like.

lo and behold, the illusion of raised surfaces.
(Disclaimer, yes it looks like sh!t. No I don't claim I put any effort into this to make it look good. Yes this is just the result of testing  :p )
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: Cant get bump map into PCS2 (more or less solved, I now know how to normal map)
Umm.. you are getting the format completely mixed up...
Dxt5nm is the format used. Green + Alpha.   Green is green - Red is in Alpha and blue is derived from those two channels.
The grey ones have extra un needed data in the red and blue channels. Aparrently the extra red and blue can cause extra artifacts in compressed normal maps.

@Spoon If they are saved as DXT5nm and they are grey don't worry about it. nm stands as you guessed for normal map, but the channels get switched around and only two are used. DXT5 won't do the job, it has to be DXT5nm.

I think you just reiterated what I just said. But they do not need to be saved specifically as DXT5_NM if the previously mentioned steps are taken.
Green channel data and Alpha channel data are used. We both have that. Red and Blue are irrelevant, we both have that.
So long as both cases are true, it does not need to be saved as NM, _for the purposes of use within the Freespace Open engine_.
As can be exampled by the existence of the normal maps in the mediavp's.

The Advanced VP contains normal maps that are actually saved in the u8888 DDS format to reduce AA compression artifacts along angled lines.

DXT5 and DXT5_NM contain the same compression scheme. Incidentally, as long as the channel management is done, DX1 (with alpha) can be used for a normal map.
Why in the name of Kobol you would want to is beyond me.

It may be called _NM because it does the conversion for you (sometimes well, some times not), but that does not make it the only viable option for creating a $ship$-normal.dds.

Shaders can use different techniques to render tangent-space normal maps, but the normal map directions are usually consistent within a game. Usually the red channel of a tangent-space normal map stores the X axis (pointing the normals predominantly leftwards or rightwards), the green channel stores the Y axis (pointing the normals predominantly upwards or downwards), and the blue channel stores the Z axis (pointing the normals outwards away from the surface).

If you see lighting coming from the wrong angle when you're looking at your normal-mapped model, and the model is using tangent-space normal maps, the normal map shader might be expecting the red or green channel (or both) to point in the opposite direction. To fix this either change the shader, or simply invert the appropriate color channels in an image editor, so that the black pixels become white and the white pixels become black.

Some shaders expect the color channels to be swapped or re-arranged to work with a particular compression format. For example the DXT5_nm format usually expects the X axis to be in the alpha channel, the Y axis to be in the green channel, and the red and blue channels to be empty.

Our shaders are written to only utilize the data in Green and Alpha. It may change at some point for proper tangent space normal mapping, and may even prove a benefit with the -height option, but that will be a bit before that happens. I think getting us a multi-pass capability in the rendering system for dynamic lighting (which can lead to a slew of other things) will make the option of reading the blue channel in the future more viable or simplifying the normal map to reading an RGB with the Alpha serving an entirely different purpose.

On an unrelated note: Layer support will be coming to DDS soon.
« Last Edit: March 25, 2009, 01:54:48 am by Zacam »
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Water

  • 210
Re: Cant get bump map into PCS2 (more or less solved, I now know how to normal map)

I think you just reiterated what I just said. But they do not need to be saved specifically as DXT5_NM if the previously mentioned steps are taken.
It sounds like our starting points are in different places. Maybe just different software. When I use the compressionator it spits out a green texture (DXT5 xGxR) using just green and alpha.
Sounds like you end up with blue+red also using dxt5nm.

For someone new to this, dxt5nm has a better chance of success than channel swaping  ;)

@Spoon
Sometimes a small amount of guassian blur can give a smooth bump using a lower intensity.