Hello Everyone
I’m working together with two friends on a game-project for our university-project.
My friends are programming the data structures and I have the pleasure to create textures and 3d-models.
I thought it would be nice to have parallax mapping in our game, so I created all the necessary stuff for that. But now I have a big problem.
At first something about the lighting: Everything gets lighten up by an ambient light, just to make sure that not the whole scene is black. For the player we wanted a flashlight effect, so I’m using a spotlight as flashlight.
To brighten up the scene around the player, like the flashlight reflects light from the walls, there also is a pointlight in the player.
Now to the problem: It looks like the textures just receive light from an angle of about 180 degrees. If the players stands in the right direction there is no problem with lightning.
So I decided to test a simple light material with the texture as the diffuse-map. As you can see, the problem still apears.
To the screenshots:
First screenshot: The player just have the pointlight attached to himself.
Second screenshot: Only the ‘flash-light’ and the ambient-light is activatet. The player looks into the tunnel. The first materials are positioned in the right direction to the player so they dont show any problems. The dark spots are the textures which are positioned wrong to the player, so you can see that they dont receive the light.
Third screenshot: As above, the ‘flash-light’ and the ambient-light is active. The player is a angle to the texture, no problems.
Fourth screenshot: Same light as above. You can barely the shape of the flashlight. The texture absorbs nearly all the light.
Fifth screenshot: Thats the Material i used for all these screenshots. As you can see, nothing is activatet, just the texture is set as the DiffuseMap.
Second Screenshot
Third screenshot
Fourth screenshot
Material
DiffuseMap
Material Source Code
[java]Material StoneWallTest : Common/MatDefs/Light/Lighting.j3md {
MaterialParameters {
DiffuseMap : Materials/StoneWall/MediumRes/StoneWall_m.jpg
}
}
[/java]
I have no idea what I’m doing wrong, can anyone help me? Please tell me if you nee more information!
I allready did all the tutorials and searched for a solution for more than 4 hours!
PS: I’m from germany, so I’m sorry if my english isn’t the best