Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lighting & Custom Content
Tesseract Offline
Senior Member

Posts: 498
Threads: 7
Joined: Mar 2011
Reputation: 18
#1
Lighting & Custom Content

Greetings all!

I've been running into a rather annoying issue - at least I think it's an issue. I've added a floor texture that I have made, it has the usual normal, specular and diffuse maps, when I put it into the level editor and place a point light above the texture one half of the light illuminates the primitive and the other half is in darkness.

I have two lights here but they're both doing the same thing.

Here is a reference image:
[Image: ULjlHBx.png]

Now either there is something wrong with my texture, there's something buggy going on in the engine or there are more specialized settings for the pointlight, though the last suspicion is the most unlikely, as the game textures don't seem to encounter this problem. I have a strong inkling that it might have something to do with my normal map or something.

If anyone has any suggestions or input, that would be great!

(This post was last modified: 09-25-2015, 12:13 PM by Tesseract.)
09-24-2015, 04:36 AM
Find
Aaron Offline
Frictional Games

Posts: 20
Threads: 0
Joined: Aug 2013
Reputation: 6
#2
RE: Lighting & Custom Content

Make sure you apply a normal map to your material, I have provided a small blank normal map in textures>technical I believe called blank.nrm. This should fix the problem.

Artist.
Twitter: @aaronjclifford
09-25-2015, 09:14 AM
Find
Tesseract Offline
Senior Member

Posts: 498
Threads: 7
Joined: Mar 2011
Reputation: 18
#3
RE: Lighting & Custom Content

(09-25-2015, 09:14 AM)Aaron Wrote: Make sure you apply a normal map to your material, I have provided a small blank normal map in textures>technical I believe called blank.nrm. This should fix the problem.

Thank you for getting back to me, Aaron!

My texture does have a normal map applied along with a specular one too. Though when I apply your blank.nrm lighting does behave correctly over the primitive. Though because your blank.nrm has no texture, my texture appears shiny and flat.

Would you say there is something wrong with my normals? It's a .dds file that I created with a free program called SSbump: [Image: 3FSF1Jp.png]
09-25-2015, 12:12 PM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#4
RE: Lighting & Custom Content

Try inverting it! I think HPL2 and HPL3 have changed when it comes to normal maps so you have to change your workflow.
09-25-2015, 12:14 PM
Website Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#5
RE: Lighting & Custom Content

Or from wiki
The normal map for the material and uses the standard format rgb = xyz and is in tangent space. Note that this needs to be converted to a format of XY only though (3dc)!

Not an artist so what it means? no clue Smile
09-25-2015, 12:16 PM
Website Find
Tesseract Offline
Senior Member

Posts: 498
Threads: 7
Joined: Mar 2011
Reputation: 18
#6
RE: Lighting & Custom Content

(09-25-2015, 12:14 PM)jens Wrote: Try inverting it! I think HPL2 and HPL3 have changed when it comes to normal maps so you have to change your workflow.

(09-25-2015, 12:16 PM)jens Wrote: Or from wiki
The normal map for the material and uses the standard format rgb = xyz and is in tangent space. Note that this needs to be converted to a format of XY only though (3dc)!

Not an artist so what it means? no clue Smile

Hello Jens!

I just tried a few things, inverting it didn't provide any change unfortunately. Though, the quote from the wiki - that I did happen to find some days ago - doesn't make much sense to me either. Assuming R = x, G = y and B = z I might have to play around with the RGB channels in Photoshop so that I end up with XY or RG channels.

Thank you for your help thus far!

Edit:
Unfortunately the problem still exists despite removing the blue channel.
(This post was last modified: 09-25-2015, 12:44 PM by Tesseract.)
09-25-2015, 12:39 PM
Find
Aaron Offline
Frictional Games

Posts: 20
Threads: 0
Joined: Aug 2013
Reputation: 6
#7
RE: Lighting & Custom Content

Yeah make sure it is saved through 3dc, we use the nvidia dds plugin for Photoshop for this. It is a setting where you choose which compression you want to use. Right now your normal map is sRGB so it's not correct!

Artist.
Twitter: @aaronjclifford
09-25-2015, 12:44 PM
Find
TheGreatCthulhu Offline
Member

Posts: 213
Threads: 10
Joined: Oct 2010
Reputation: 32
#8
RE: Lighting & Custom Content

(09-25-2015, 12:16 PM)jens Wrote: Or from wiki
The normal map for the material and uses the standard format rgb = xyz and is in tangent space. Note that this needs to be converted to a format of XY only though (3dc)!

Not an artist so what it means? no clue Smile

I think it means that the game uses compressed normal maps.
Since normal vectors are all unit length, and taken to be in tangent space, you can throw out one component (z).

I think it needs to be compressed/exported in 3Dc format, also known as BC5.
For example, NVIDIA texture tools include a command line tool that does this, using:
nvcompress -bc5 inputFileName outputFileName

Can be found here: https://developer.nvidia.com/gpu-acceler...ompression

There could be some GUI tools out there as well.
09-25-2015, 12:46 PM
Find
Patrik Offline
Frictional Games

Posts: 127
Threads: 3
Joined: Jun 2013
Reputation: 25
#9
RE: Lighting & Custom Content

Also, the green channel probably has to be inverted before conversion to 3Dc for HPL2 normal maps to work properly.
09-25-2015, 01:01 PM
Find
Tesseract Offline
Senior Member

Posts: 498
Threads: 7
Joined: Mar 2011
Reputation: 18
#10
RE: Lighting & Custom Content

(09-25-2015, 12:44 PM)Aaron Wrote: Yeah make sure it is saved through 3dc, we use the nvidia dds plugin for Photoshop for this. It is a setting where you choose which compression you want to use. Right now your normal map is sRGB so it's not correct!

Aaron, that has seem to have solved the problem! I'm so pleased I could explode! I'll have to buy you a drink one day, or perhaps marry you. Though for now thank you for your time, much appreciated!
(This post was last modified: 09-25-2015, 01:08 PM by Tesseract.)
09-25-2015, 01:03 PM
Find




Users browsing this thread: 1 Guest(s)