|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: xXxGuitar511]
#120851
09/20/07 20:40
09/20/07 20:40
|
Joined: Sep 2005
Posts: 29
camelot22020
Newbie
|
Newbie
Joined: Sep 2005
Posts: 29
|
I went into MED and changed the origin so it was more centered, i think part of the problem before was that the origin was inside level geometry. So now the models that I applied the shader to are picking up the dynamic lights, however it seems that the light is getting applied to the entire model evenly, as opposed to per polygon. If that made sense? I lined up 6 of the models and each one gets darker if it's farther from the light, but it's not gradual across the model, it's like each model is assigned a uniform brightness and all the polygons on the model get that brightness. So even though the models are right next to each other, there are visible seams because one is darker than the one before.
EDIT: Actually on closer inspection, the light seems to be applied to the models evenly, it's just that at one of the edges for some reason it suddenly gets gradually darker. It's just the edge that's the problem. I have a couple of normal-mapped boxes lined up as walls and just a little bit before the edge of each box, it gets darker. any ideas?
Last edited by camelot22020; 09/20/07 23:28.
|
|
|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: camelot22020]
#120852
09/21/07 16:54
09/21/07 16:54
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
It would be much easier to diagnose the problem if I could see it. Can you post some screenshots?
Well, it's per vertex, and each vertex is lit by it's position; so the origin of the model only applies to static lighting. make sure that you are actually using a dynamic light, and not static lights (WED lights). Dynamic lights use an action (included in the file) for dynamic lights.
Also, shaders interpolate the normals of the vertices (unless specified by shadeMode = flat;), so using block objects might return bad lighting.
xXxGuitar511 - Programmer
|
|
|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: camelot22020]
#120854
09/22/07 16:28
09/22/07 16:28
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
Well, I hope you can follow this, as it's just a basic explanation:
Open the effect script (*.fx); At the bottom, you'll find the technique; after that, goto the first & second passes. In each one, at the first line of each pass, add that line...
Let me know how it works. If it doesn't, then I'll just add it for you...
xXxGuitar511 - Programmer
|
|
|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: xXxGuitar511]
#120855
09/25/07 23:23
09/25/07 23:23
|
Joined: Jan 2005
Posts: 605 Deutschland, NRW
garv3
User
|
User
Joined: Jan 2005
Posts: 605
Deutschland, NRW
|
Is it somehow possible to apply this mapper to level blocks?
GameStudio Version: A7 Pro v7.86
|
|
|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: garv3]
#120856
09/26/07 17:08
09/26/07 17:08
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
You'd have to modify it a little bit, but shaders on blocks are dead-slow...
xXxGuitar511 - Programmer
|
|
|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: xXxGuitar511]
#120859
10/25/07 13:49
10/25/07 13:49
|
Joined: Aug 2007
Posts: 78
botu
Junior Member
|
Junior Member
Joined: Aug 2007
Posts: 78
|
hi! First thanx for this shader! I have just two questions about transparency. Here a screenshot of my game: http://users.skynet.be/fa085808/spec.jpgAs you can see, the specularity is visible even the transparency is on. Do you have a solution in this case? My second question is : With your shader, is it possible to modify the Ambient, diffuse ans specular during the game? My idea is to load an image in memory witch represent shadows and lighting level of the ground, and use this image to change the levels of spec,amb,diff of object positioned for example in the shadow of a mountain or under trees.
Last edited by botu; 10/25/07 13:58.
|
|
|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: botu]
#120860
10/27/07 07:12
10/27/07 07:12
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
Try reducing the specularity on the edges of the leaves. I'm not sure why this problem is occuring, but I'll look into it if I find time...
As for the changing of properties, simply change the material settings (mat_NM)
xXxGuitar511 - Programmer
|
|
|
|