Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, dr_panther), 730 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 8 1 2 3 4 5 6 7 8
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: frazzle] #117990
03/19/07 20:07
03/19/07 20:07
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline OP

Serious User
TWO  Offline OP

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Thanks for your kind words frazzle

The shader is now posted in the wiki. I also changed some other things just4fun

Re: [Supply] Matt's NormalMapping shader with 3 li [Re: frazzle] #117991
03/19/07 20:17
03/19/07 20:17
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
Hey, thanks, it´s much faster than the shader I posted and still looks the same...

I´m just going to upload a simple picture...

Edit:


Thanks to Dexsoft for the nice Christmas gift, the model ist from!

Last edited by Slin; 03/19/07 20:36.
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: TWO] #117992
03/19/07 20:44
03/19/07 20:44
Joined: Oct 2006
Posts: 91
G
Ghost Offline
Junior Member
Ghost  Offline
Junior Member
G

Joined: Oct 2006
Posts: 91
Thanks Bloodline, this is great!!!

Last edited by Ghost; 03/19/07 20:45.
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: Ghost] #117993
03/19/07 22:39
03/19/07 22:39
Joined: Feb 2006
Posts: 616
Netherlands
cartoon_baboon Offline
User
cartoon_baboon  Offline
User

Joined: Feb 2006
Posts: 616
Netherlands
ok, ok, so I'm officially a dumb f... but how do I go about using this shader. I made a wdl file starting with:

material normalmapping{
effect="
then I pasted the code from the wiki
ended with:
";}
saved it as normalmapping.wdl , included it into the main script and made an action with my.material= normalmapping. Made an object with two skins, the second being a normal map and applied the action to it.

On running I get the error:
//---------
/>
normalmapping.wdl 331:-1 () String length effect="

//---------

/

So what did I do wrong?

Re: [Supply] Matt's NormalMapping shader with 3 li [Re: cartoon_baboon] #117994
03/20/07 02:39
03/20/07 02:39
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Copy what you've pasted into a new txt file ( the shader code between the two " 's, save it as .FX file instead into your work folder, now write that name of that .FX between the two " 's in the material in your wdl. I'm not sure, but I think this shader is too big to be copied and pasted inside a material, but this is just a wild guess,

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: PHeMoX] #117995
03/20/07 09:16
03/20/07 09:16
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Thanks for the great contribution. Though I've got a question, how would someone have it so the first light is for sunlight? This was the problem I had with matt's shader, trying to get sunlight and dynamic lights to work together. Basically trying to use it on models for both outdoors and indoors.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: William] #117996
03/20/07 09:25
03/20/07 09:25
Joined: Aug 2005
Posts: 1,012
germany, dresden
ulf Offline
Serious User
ulf  Offline
Serious User

Joined: Aug 2005
Posts: 1,012
germany, dresden
this looks like dark magic to me, but the results are nice - so great job bloodline!

Re: [Supply] Matt's NormalMapping shader with 3 li [Re: ulf] #117997
03/20/07 14:09
03/20/07 14:09
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Adding sunlight is not difficult. Instead of calculating the angle from the light to the world pos, you simply use the vecSunDir vector....


BTW: If you add sunlight, do NOT use attenuation on it, you'll get some crappy effects,


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

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Quote:


//light 1
float3 Light1 = PosWorld - vecSunDir[0] ;
Out.Light1.xyz = mul(worldToTangentSpace, -Light1); // L

Out.Att1 = distance(PosWorld,vecLightPos[0])/vecLightPos[0].w; // Point light





I've tried changing the code, but the sun doesn't seem to affect the model. Which lines were you referring too?

P.S - sorry about my n00b when trying to edit shaders.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: [Supply] Matt's NormalMapping shader with 3 li [Re: William] #117999
03/21/07 14:52
03/21/07 14:52
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Out.Sun = mul(worldToTangentSpace, -vecSunDir);

You may need to remove the (red) - ...

I'm not sure...


xXxGuitar511
- Programmer
Page 2 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