Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 552 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 1
Page 15 of 19 1 2 13 14 15 16 17 18 19
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
C
camelot22020 Offline
Newbie
camelot22020  Offline
Newbie
C

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 Offline OP
Expert
xXxGuitar511  Offline 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: xXxGuitar511] #120853
09/21/07 20:47
09/21/07 20:47
Joined: Sep 2005
Posts: 29
C
camelot22020 Offline
Newbie
camelot22020  Offline
Newbie
C

Joined: Sep 2005
Posts: 29
Now that you mention it, it sort of looks like the shader is trying to round the edge or something, make it look less flat. would this " shadeMode = flat;" thing get it to stop doing that? where would i put that line of code? thanks for your responses

i'll try to post a screenshot, do you know what a good place to do that is?

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 Offline OP
Expert
xXxGuitar511  Offline 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
G
garv3 Offline
User
garv3  Offline
User
G

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 Offline OP
Expert
xXxGuitar511  Offline 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] #120857
09/26/07 18:41
09/26/07 18:41
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
According to a semi-recent post from jcl, shaders on blocks aren't slow. I'm guessing this has something to do with newer A7 implementation.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: Orange Brat] #120858
09/26/07 22:54
09/26/07 22:54
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline OP
Expert
xXxGuitar511  Offline OP
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I'm not sure about A7, but in A6, they are deffinatly very 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 Offline
Junior Member
botu  Offline
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.jpg

As 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 Offline OP
Expert
xXxGuitar511  Offline 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
Page 15 of 19 1 2 13 14 15 16 17 18 19

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1