Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3   Go Down

Author Topic: Normal / Bump mapping  (Read 13385 times)

0 Members and 1 Guest are viewing this topic.

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Normal / Bump mapping
« on: February 21, 2015, 02:10:30 AM »

I want to support normal mapping for the meshes.

For those of you who haven't come across this before, it's a technique to cheaply add detail to a mesh.

In the pixel shader you sample another texture which contains the surface normals for object. You then use this to change the lighting giving the impression of extra detail.

This is an example of what you can do with a normal map.




The trouble is, I don't have any normal maps for any aircraft.   ???

I need at least one so I can test the code.

Anyone willing to help?

Logged

vpmedia

  • Modder
  • member
  • Offline Offline
  • Posts: 6652
  • www.vpmedia.hu/il2
    • VPMEDIA SKINS
Re: Normal / Bump mapping
« Reply #1 on: February 21, 2015, 03:11:11 AM »

You can probably generate this from a finished texture (I think theres a standard PS filter for this). What format do you require? Greyscale tga?
Imho we should use JapanCat's new Bf-109G 3d model and for that type I got a really good psd template with all the bumps and weathering stuff ready to go.

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Normal / Bump mapping
« Reply #2 on: February 21, 2015, 04:01:14 AM »

I can work with any format, because I haven't written the code yet  8)

If you know of a good tool chain, we can use whatever that tool chain outputs.

The main issue is making it easy for modders to create the textures, rather than making it easy for me.
Logged

vpmedia

  • Modder
  • member
  • Offline Offline
  • Posts: 6652
  • www.vpmedia.hu/il2
    • VPMEDIA SKINS
Re: Normal / Bump mapping
« Reply #3 on: February 21, 2015, 04:22:30 AM »

Ok, I started to do the Bf-109K.
Now at least I can show how much work goes into weathering a skin.

First image is the skin/source psd, second is the version without camo on a 50% grey base, third pic is what I think would work as a normal map (produced by Filter/Other/High pass, 10px setting in PS). Five minutes for the first attempt.

--

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Normal / Bump mapping
« Reply #4 on: February 22, 2015, 05:21:51 AM »

feeding that heightmap through xNormal gives me these textures

Normal map




Radiosity and normal map


Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Normal / Bump mapping
« Reply #5 on: February 23, 2015, 03:15:44 PM »

Well it kind of works, but the effect is very subtle.

Without bump mapping.




With bump mapping




I think we need to look at how the height map is generated


Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Normal / Bump mapping
« Reply #6 on: February 24, 2015, 04:26:59 AM »

Removing the texture shows the code is working, so I think it's just the normal map generation that is wrong.

We will have to find another way to generate them.



Logged

Ghost129er

  • EX F.A.C. #65
  • member
  • Offline Offline
  • Posts: 1317
  • Ghost of the skies.
Re: Normal / Bump mapping
« Reply #7 on: February 24, 2015, 04:37:23 AM »

Can I provide a model and few textures to try this? After all, models do inherit their materials/maps from the 3d programming compiling AFAIK... I've got a Low wing aircraft that you can try Bump/Spec on..
Logged
But whenever they talked about him, they always had a slight smile on their faces.. And that, perhaps, maybe your answer.

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Normal / Bump mapping
« Reply #8 on: February 25, 2015, 01:09:12 PM »

What format is the mesh?
Logged

Ghost129er

  • EX F.A.C. #65
  • member
  • Offline Offline
  • Posts: 1317
  • Ghost of the skies.
Re: Normal / Bump mapping
« Reply #9 on: March 06, 2015, 04:02:50 AM »

Sorry about the delayed reply, and it can be ANYTHING. Just give me a format, preferably, not MSH.
Logged
But whenever they talked about him, they always had a slight smile on their faces.. And that, perhaps, maybe your answer.

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Normal / Bump mapping
« Reply #10 on: March 06, 2015, 05:18:51 AM »

hmm..

Any text based format that is documented and supports normal maps

Wavefront obj I already have code for ...
Logged

Ghost129er

  • EX F.A.C. #65
  • member
  • Offline Offline
  • Posts: 1317
  • Ghost of the skies.
Re: Normal / Bump mapping
« Reply #11 on: March 06, 2015, 06:02:43 AM »

Wavefront obj I already have code for ...

Done. Obj it is.
Logged
But whenever they talked about him, they always had a slight smile on their faces.. And that, perhaps, maybe your answer.
Pages: [1] 2 3   Go Up
 

Page created in 0.036 seconds with 24 queries.