Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (dr_panther, Ayumi, 7th_zorro), 877 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 6 of 8 1 2 3 4 5 6 7 8
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: TWO] #118030
03/29/07 13:49
03/29/07 13:49
Joined: Feb 2006
Posts: 616
Netherlands
cartoon_baboon Offline
User
cartoon_baboon  Offline
User

Joined: Feb 2006
Posts: 616
Netherlands
Well I finally got the normal mapping to work, using bstudio's files. Thing is, when applied the model becomes super glossy how do you go about making the model less glossy? Must I do it in the normalmap itself or must I set the glossiness somewhere else?

Thanks,
cartoon_baboon

Re: [Supply] Matt's NormalMapping shader with 3 li [Re: cartoon_baboon] #118031
03/29/07 14:05
03/29/07 14:05
Joined: Aug 2006
Posts: 652
Netherlands
bstudio Offline
User
bstudio  Offline
User

Joined: Aug 2006
Posts: 652
Netherlands
maybe lower the specular values?


BASIC programmers never die, they GOSUB and don't RETURN.
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: bstudio] #118032
03/29/07 14:12
03/29/07 14:12
Joined: Feb 2006
Posts: 616
Netherlands
cartoon_baboon Offline
User
cartoon_baboon  Offline
User

Joined: Feb 2006
Posts: 616
Netherlands
and where do I find these specular values? I've looked in the fx file but am not sure what I'm looking for.

Re: [Supply] Matt's NormalMapping shader with 3 li [Re: cartoon_baboon] #118033
03/29/07 14:18
03/29/07 14:18
Joined: Aug 2006
Posts: 652
Netherlands
bstudio Offline
User
bstudio  Offline
User

Joined: Aug 2006
Posts: 652
Netherlands
float4 spec1 = pow(saturate(dot(Reflect1, ViewDir1)), 15);

here you can change the specular values of the lights, they will be passed through to the model, so i quess you can adjust them here


BASIC programmers never die, they GOSUB and don't RETURN.
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: bstudio] #118034
03/30/07 00:46
03/30/07 00:46
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
The "glossiness" is controlled by the alpha channel of your normal map. This glossiness is simply specular lighting based on reflections.

*Use the alpha channel of your NormalMap...


xXxGuitar511
- Programmer
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: xXxGuitar511] #118035
03/30/07 00:47
03/30/07 00:47
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
And to Mondivirtuali, Your normal maps don't look right. Try using a model that already has normal maps.


xXxGuitar511
- Programmer
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: xXxGuitar511] #118036
03/30/07 07:11
03/30/07 07:11
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Wow, this shader is great, it does everything I needed and runs fast. Here are a couple of quick changes for further usability.

Currently, the ambient set thru your material doesn't work properly. Here is the change in your shader code:

Code:
 /*
return (
(color * 0.05f) + outSun +
((shadow1 * (color * diff1 + (spec1*gloss.w)) * (1 -Attenuation1))*vecLightColor[0])
);*/


return (
(color *vecAmbient) + outSun +
((shadow1 * (color * diff1 + (spec1*gloss.w)) * (1 -Attenuation1))*vecLightColor[0])
);



I hope that's changed right? But it works...

Also, fog doesn't work, if it's enabled your model will be all white. Change the technique in the shader code:

Code:
 
technique SpecularNormalMapping_20
{
pass P0
{
alphaBlendEnable = false;
srcBlend = zero;
//FogEnable=false;
//
VertexShader = compile vs_2_0 VS_PASS0();
PixelShader = compile ps_2_0 PS_PASS0();
}
//
pass P1
{
alphaBlendEnable = true;
srcBlend = One;
destBlend = One;
FogEnable=false;
VertexShader = compile vs_2_0 VS_PASS1();
PixelShader = compile ps_2_0 PS_PASS1();
}
}



Make sure the "fogenable = false" line isn't in your first pass or fog wont work at all. This is a common problem with A6 and fog.

Thanks alot for your work on this shader!

Re: [Supply] Matt's NormalMapping shader with 3 li [Re: William] #118037
03/30/07 11:03
03/30/07 11:03
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline
User
Mondivirtuali  Offline
User
M

Joined: Oct 2005
Posts: 528
Italy
The question is: how to obtain right NM from H poly models..

Re: [Supply] Matt's NormalMapping shader with 3 li [Re: Mondivirtuali] #118038
03/30/07 12:10
03/30/07 12:10
Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Machinery_Frank Offline
Senior Expert
Machinery_Frank  Offline
Senior Expert

Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Mondivirtuali:
There are plug-ins for all the big modelling-tools to create normal-maps from highpoly-models. Most of those plug-ins are based on the ATI sdk.
Besides that there is a tool called Melody from NVidia and another ORB (Open Render Bump) from an university.

To the others:
Could someone please add the improved version to the WIKI? With that we have the old shader 2.0 version and the new one supporting shader 3.0.


Models, Textures and Games from Dexsoft
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: Machinery_Frank] #118039
03/30/07 19:58
03/30/07 19:58

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Hi how i use the shader?

Page 6 of 8 1 2 3 4 5 6 7 8

Moderated by  Blink, Hummel, Superku 

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