Discussion Bump maps / Normal maps

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
Even a very simple one would be enough for testing the code.

Can it be a normal map for stock DeltaGlider / DG-S, like the attached one (tangent space, or partial derivative, as blue = 1.0 for the whole map -- they are BMPs, but I don't think converting to another format, if it's needed, is a problem)?

They aren't perfect, because they were made from edge detection on diffuse textures, but they should be usable for tests (I tested them on a cube outside of Orbiter).
 

Attachments

  • DG_normal_maps.zip
    4.2 MB · Views: 73

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
Can it be a normal map for stock DeltaGlider / DG-S, like the attached one (tangent space, or partial derivative, as blue = 1.0 for the whole map -- they are BMPs, but I don't think converting to another format, if it's needed, is a problem)?

They aren't perfect, because they were made from edge detection on diffuse textures, but they should be usable for tests (I tested them on a cube outside of Orbiter).

Thanks, That is exactly what I was looking for.:thumbup: Shouldn't take long to get them working.
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
688
Points
203
Moved from D3D9Client Development thread

I think both uncompressed and compressed maps should be supported by the client, with 16bit V8U8 / A8L8 for uncompressed (or even 24bit R8G8B8 if z is stored too in the map), and compressed DXT5nm (x in alpha, y in green, with blue & red channels the same for the whole image). If it was D3D10Client, BC5 could be used too, but under D3D9 it would probably work only for ATI cards.


So far I like the normal mapping feature very much. I tested it on vessels and base objects with success. I see that only directional light is taken into account at the moment. Will point lights and spotlights (local light sources) be taken in the future too?
What is the best way to generate normal maps? Would like to try this out with SSU.
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
What is the best way to generate normal maps? Would like to try this out with SSU.
I was using GIMP for that, and ready textures, so far.

At first I used Sobel edge detection for separate horizontal and vertical edges detection, on 2 layers with the same image, then converted the image to grayscale and added 3rd, white layer, and then composed an RGB image from those 3 layers, with vertical edge detection layer used as red channel, horizontal as green channel, and white for blue channel. This way the normal map was ready.

Next, I downloaded gimp-normalmap plug-in, to make them faster, and with additional settable parameters.

Other graphics editors most probably have their own plug-ins for normal mapping, too.


You can probably also create normal maps in most of 3D editing applications from a high-poly mesh, before mesh optimization / polygon reduction.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
I noticed that normal maps will cause some major changes in behaviour of highly reflective surfaces like the ones used with XR2. It looks like in a material defination the alpha channel of specular color is unused by the Orbiter. Should we use it to control a blending between interpolated normals and normal map normals in specular reflection ?
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
Should we use it to control a blending between interpolated normals and normal map normals in specular reflection ?
Good idea, but it will probably require patches for most of the existing meshes, for which normal maps will be now created, which will update the material definition with updated alpha value for the specular color.
 

Eraser

Donator
Donator
Joined
May 19, 2008
Messages
184
Reaction score
0
Points
16
Location
Tyumen
I wonder, whether you can use a similar method for animated textures?
Something like "texture_anim_2_500.dds", where "2" is the frame number, and "500" - the frame duration, in milliseconds. This could be useful for making cool rocket exhaust, or explosions.
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,278
Reaction score
3,247
Points
203
Location
Toulouse
@jarmonik: I'm having this exact problem trying to render multi-layer insulation (like goldfoil) in Orbiter/D3D9. I've set the material "specular power" to 1, and added an almost white specular map, but still I get very limited specular effect, which is an issue because those surfaces are supposed to be highly reflective (see picture below).

See how the chinese flag has a lot of specular light (it has default setting, specular power = 10 and no maps), while the probe body has very little specular light (it has a normal map and an almost all-white specular map, material specular power = 1).

What could I do to boost that specular lighting ?

 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
What could I do to boost that specular lighting ?

I don't know. Probably nothing. I checked the specular lighting with AMSO and I noticed it's much dimmer in D3D9 than in inline, so, it's an obvious error. It's been fine before but not anymore is seems. I have no idea how long the error been there. I'll look into it and try to fix it.

EDIT: Is the add-on yours ? and is it downloadable for testing ?
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,278
Reaction score
3,247
Points
203
Location
Toulouse
EDIT: Is the add-on yours ? and is it downloadable for testing ?

Well in a very alpha stage but I'll pack it for you, give me a night of sleep ;)
 
Top