Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, VoroneTZ), 831 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 1
Page 16 of 19 1 2 14 15 16 17 18 19
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: xXxGuitar511] #120861
03/19/08 00:22
03/19/08 00:22
Joined: Dec 2003
Posts: 1,220
Just down the road from Raven
BlueBeast Offline
Serious User
BlueBeast  Offline
Serious User

Joined: Dec 2003
Posts: 1,220
Just down the road from Raven
Big bump here...

Wanted to start testing normal maps...

Tried to load the shader and I get an error for line 54

<flags = tangent | enable_render;>
NM.wdl 54:3 error(0) Flag unknown |

I see this character in 3 locations throughout the script... Is this a proper character to use? I'm suprised noone else got or mentioned) this error

I'm using GS v6.31.4 which may be the problem, as it didn't recognize "time_step" either, which I just changed to "time"


Gamestudio Pro 6.4
Pentium 4 3.0 GHz 800MHz BUS
AtiRadeon 9800 pro 256Mb 21" Monitor
1 Gig DDR RAM
36 Gig RAPTOR SATA+ 120 Gig SATA
SB Audigy 2 w/ 450 watt Logitech Z680 5.1

www.nordicepitaph.com
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: BlueBeast] #120862
03/19/08 04:00
03/19/08 04:00
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 don't think shader worked in A6.31; Try upgrading....

...the errors were from updated syntax, but you already figured that out


xXxGuitar511
- Programmer
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: xXxGuitar511] #120863
03/19/08 04:31
03/19/08 04:31
Joined: Dec 2003
Posts: 1,220
Just down the road from Raven
BlueBeast Offline
Serious User
BlueBeast  Offline
Serious User

Joined: Dec 2003
Posts: 1,220
Just down the road from Raven
Yea, I have the updates up to 6.6 Pro, but I had my reasons to stick to this version. But I can certainly test higher versions. I'll give it a shot


Gamestudio Pro 6.4
Pentium 4 3.0 GHz 800MHz BUS
AtiRadeon 9800 pro 256Mb 21" Monitor
1 Gig DDR RAM
36 Gig RAPTOR SATA+ 120 Gig SATA
SB Audigy 2 w/ 450 watt Logitech Z680 5.1

www.nordicepitaph.com
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: BlueBeast] #120864
03/19/08 08:08
03/19/08 08:08
Joined: Dec 2003
Posts: 1,220
Just down the road from Raven
BlueBeast Offline
Serious User
BlueBeast  Offline
Serious User

Joined: Dec 2003
Posts: 1,220
Just down the road from Raven
Ok, with 6.4 it works . Mostly...

How do you keep the sun from affecting the models? I tried everything i could think of... even set the model to 'unlit'.

As it is, I have 2 models inside of a hollow block 'room'

One model has a second skin and the normal mapping applied... the second model is 'plain' and is dark like the NM model should be.

The sun set to '0,0,0,'

Outside the 'room' is a static light so the level will be completely unlit.

No matter what, the NM model is affected by the sun. Meaning it's always lit from the direction of the sun's settings.

Worse yet, if i turn the ambient DOWN, even to -2 the model lights up very bright! But from 0.0 to 100.0 the ambient works like normal.

I have no alpha channels on the diffuse or the normal map skins.

How do I turn off the sun on normal mapping models?

- Jason


Gamestudio Pro 6.4
Pentium 4 3.0 GHz 800MHz BUS
AtiRadeon 9800 pro 256Mb 21" Monitor
1 Gig DDR RAM
36 Gig RAPTOR SATA+ 120 Gig SATA
SB Audigy 2 w/ 450 watt Logitech Z680 5.1

www.nordicepitaph.com
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: BlueBeast] #120865
03/19/08 14:14
03/19/08 14:14
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
Right click on the "NM.fx" script from WED, and go to "customize". I setup a panel for adjusting properties. If you don't have this, I used the specular channel for sun lighting.


xXxGuitar511
- Programmer
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: xXxGuitar511] #120866
03/19/08 23:05
03/19/08 23:05
Joined: Dec 2003
Posts: 1,220
Just down the road from Raven
BlueBeast Offline
Serious User
BlueBeast  Offline
Serious User

Joined: Dec 2003
Posts: 1,220
Just down the road from Raven
Well... I only have the 'customize' option for the NM.wdl but not the NM.fx, and this is what I get, though I don't know if it's the proper panel you mention..




Here I tried to turn the ambient to '0,0,0' (not in the picture)

Now, if this is the wrong customize panel, where in the WDL do I adjust the specular so the sun doesnt effect the model?

I see 3 places where specular is listed in the fx file...

Line 17: float4 vecSpecular;

Line 128: float4 sunOut = (inColor*sunDiff + sunSpec*gloss) * sunShadow * vecSpecular;

Line 252: technique SpecularNormalMapping_20

... and in the NM.wdl in the
"function effect_startup()"
Line 75: vec_set(mat_NM.specular_blue, sun_color);

So I guess the question is, where and what do I adjust for the sun not to affect the model?

Thanks for this awesome shader!

- Jason

EDIT: The reason I think the sun shouldnt always effect a model is using Doom3 as an example. the indoor areas have no sun influence, and is all lit by dynamic lights.

The sun has no place indoors. As for 'some' lighting, you have the fantastic 'fake dynamic' lighting implemented, which is great for indoors.

It would be neat to have a feature implemented to choose between sun influence and no sun influence so if you have both indoor and outdoor portions in a level, you can use the same script.

Just my 2 cents


Gamestudio Pro 6.4
Pentium 4 3.0 GHz 800MHz BUS
AtiRadeon 9800 pro 256Mb 21" Monitor
1 Gig DDR RAM
36 Gig RAPTOR SATA+ 120 Gig SATA
SB Audigy 2 w/ 450 watt Logitech Z680 5.1

www.nordicepitaph.com
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: BlueBeast] #120867
03/20/08 00:44
03/20/08 00:44
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
Yes, this is the panel.

The models "specular" property controls its influence from the suns light.

Adjusting specularity via the panel/material will control sun lighting for all models. Setting it from the models material manager will only control the model (model material settings are dominant over script material settings).


xXxGuitar511
- Programmer
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: xXxGuitar511] #120868
03/20/08 02:48
03/20/08 02:48
Joined: Dec 2003
Posts: 1,220
Just down the road from Raven
BlueBeast Offline
Serious User
BlueBeast  Offline
Serious User

Joined: Dec 2003
Posts: 1,220
Just down the road from Raven
Ok, I'm stupid... I don't see the word specular anywhere on this panel?

I guess i'd rather control each model individually indeed anyway.

I found the material editor in MED.... theres 2 skins (of course) the diffuse and the normal map. I looked at both the normal map and the diffuse skin, but the specular level is at 0 already. By default, everything is set at 0 except alpha which is 100%

How do I make specular less than 0 ? or do I need to raise it to lower the sun's influence?

Oh and which skin do I set the influence?


Gamestudio Pro 6.4
Pentium 4 3.0 GHz 800MHz BUS
AtiRadeon 9800 pro 256Mb 21" Monitor
1 Gig DDR RAM
36 Gig RAPTOR SATA+ 120 Gig SATA
SB Audigy 2 w/ 450 watt Logitech Z680 5.1

www.nordicepitaph.com
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: BlueBeast] #120869
03/20/08 03:10
03/20/08 03:10
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 guess I left sun light (specular) out of the panel, my mistake. Sorry for the confusion...

When you open the models skin dialog, select the first skin (diffuse) and check it's material flag/checkbox. Then set specular to 0...

I'f you'd like, I can add the sunlight option to the panel (as it should be) and just give you that...


xXxGuitar511
- Programmer
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: xXxGuitar511] #120870
03/20/08 04:25
03/20/08 04:25
Joined: Dec 2003
Posts: 1,220
Just down the road from Raven
BlueBeast Offline
Serious User
BlueBeast  Offline
Serious User

Joined: Dec 2003
Posts: 1,220
Just down the road from Raven
That would be awesome...

I am going to test again in a new room... from scratch
All this testing has confused me lol

This is a great shader, all who contributed, you all should be proud!

I DO ahve a question though...

I havn't yet done any speed tests, and i know so little about shaders, but can the performance be increased in some way?

Is there a 'minimum' number of passes that can be performed for normal mapping?
Does the use of specular decrease the performance as well?

As always, I'm shooting for low end systems, and want normal mapping, but it seems SOME specular is necessary for a great normal map effect...

Or is this shader pretty optimized, and likely to run on lower end machines without much problem?

Sorry for all the newbie questions, and i'll ahve more all the time, i'm dure

Thanks for any input!


Gamestudio Pro 6.4
Pentium 4 3.0 GHz 800MHz BUS
AtiRadeon 9800 pro 256Mb 21" Monitor
1 Gig DDR RAM
36 Gig RAPTOR SATA+ 120 Gig SATA
SB Audigy 2 w/ 450 watt Logitech Z680 5.1

www.nordicepitaph.com
Page 16 of 19 1 2 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