Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
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
1 registered members (AndrewAMD), 629 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 3
Page 4 of 24 1 2 3 4 5 6 23 24
Re: Ulitimate lighting shader pack v1.0 [Re: Drew] #36803
11/26/04 00:00
11/26/04 00:00
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline OP
Expert
Matt_Aufderheide  Offline OP
Expert
M

Joined: Oct 2003
Posts: 4,131
Quote:

Evrything I try produces ertors.





Drew.. what kind of errors do you get.. i cant help unless i know what isnt working .. whether its a scripting problem or a shder problem. As said the shader requires ps v3.0 to work right now.

Re: Ulitimate lighting shader pack v1.0 [Re: Drew] #36804
11/26/04 03:47
11/26/04 03:47
Joined: Jun 2004
Posts: 241
muralist Offline
Member
muralist  Offline
Member

Joined: Jun 2004
Posts: 241
Drew,

1. Make the two fx files

2. Save the light script as DynLight.wdl and set the behavior of a ball model with the light action. Set skill 1,2,3, to rgb -- I used 200 50 100 for example
Change player.x to camera.x

//DYNLIGHT.WDL:

var light_dist=2000; //this is how far away form a light it will be visible.
action light_pos_object
{
wait(5);
my.invisible=on;
my.passable=on;

while(1)
{

if vec_dist(my.x,camera.x)<light_dist
{

my.light=on;
my.lightrange=1000; //could be set also to a skill

my.red=my.skill1; //just put in the r,g,b values
my.green=my.skill2;
my.blue=my.skill3;

my.cast=on; //casts a shadow when on
}


else
{
my.lightrange=0; //if too far away turn it off
my.light=off;
my.cast=off;

}

wait(1);
}


}


3. Paste the material code at the end of main script. (didnt even put it inside main function, just tacked it onto the end) -- note my addition of VAR before d3dautomaterial like so:

//TACK ONTO END OF MAIN SCRIPT:

material spec_bump_model //assaign all models this material in script
{
flags = tangent;
}

var d3d_automaterial=1;
bmap your_world_texture_normalmap = <your_world_texture_normalmap.tga>;
material your_world_texture_normalmap_tga
{
skin1 = your_world_texture_normalmap;
flags = tangent;
}

//then call this function in main():

function load_shaders()
{
effect_load(spec_bump_model,"spec_bump_model.fx");

effect_load(your_world_texture_normalmap_tga,"spec_bump_world.fx");

wait(5);
}

Then I put in a couple of normal mapped models (which I used to use with your pointspeclight demo -- thanks for that by the way) and a couple of your crates -- one of which showed up partly transparent in the level... but I think the normal mapping works -- also add an image called yournormalmap.tga

Thats it.


I am only sure that this produces colored lights but it sure looks like the normalmap effect smooths the models ( I made low res versions of hires models, norrmal mapped them per your instructions...) I dont know how to apply textures to level blocks so I only use models.


Can someone tell me how to assign a normalmapped material to a model or object -- I usually use modified terrain multishaders for models -- is the "yournormalmap" texture applied from a WAD? How do I get the textures into the wads?

Re: Ulitimate lighting shader pack v1.0 [Re: muralist] #36805
11/26/04 03:53
11/26/04 03:53
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
I have a Geforce 6800 GT, and while testing this it isn't giving me too much results. Everything is very bright, and I can see the dynamic lights are becoming visible when I move close, but there is no diffuse/specular. (Although I am not actually getting any script errors). Can you be specific on how this should be setup? For skin1, on the level objects, I am assigning a 32bit targa normal map. What about a specular map?

Is it possible that you could post the source to a very simple demo that shows a model and level object being lit?

Thanks!


--Eric
Re: Ulitimate lighting shader pack v1.0 [Re: Nadester] #36806
11/26/04 04:11
11/26/04 04:11
Joined: Jun 2004
Posts: 241
muralist Offline
Member
muralist  Offline
Member

Joined: Jun 2004
Posts: 241
How do you apply 32 bit textures? I think my version of MED only uses 16 or so -- they dont look deep/

Re: Ulitimate lighting shader pack v1.0 [Re: Nadester] #36807
11/26/04 06:42
11/26/04 06:42
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline OP
Expert
Matt_Aufderheide  Offline OP
Expert
M

Joined: Oct 2003
Posts: 4,131
Put the specular map in alpha of the normalmap for world textures, put the specular in the alpha of the colormap for models..

Re: Ulitimate lighting shader pack v1.0 [Re: Matt_Aufderheide] #36808
11/26/04 10:25
11/26/04 10:25
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
I'm still getting the same results as before, I have no idea what I am doing wrong. Everything is just incredibly bright, and my normal maps aren't doing anything. Do you have any plans to post a simple demo?


--Eric
Re: Ulitimate lighting shader pack v1.0 [Re: Nadester] #36809
11/26/04 10:36
11/26/04 10:36
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
This is what I am getting:

On A6 Professional 6.31.4. This entire level is rigged so that everything *should* be normal mapped.


--Eric
Re: Ulitimate lighting shader pack v1.0 [Re: Nadester] #36810
11/26/04 11:58
11/26/04 11:58
Joined: Sep 2004
Posts: 1,214
Austin, Texas
Josh_Arldt Offline
Senior Developer
Josh_Arldt  Offline
Senior Developer

Joined: Sep 2004
Posts: 1,214
Austin, Texas
Wierd, mine doesn't seem to react to any light at all. I placed two light_pos_object in the level. One behind the model and one infront of him.
He is almost completely black.

Last edited by humansandbag; 11/26/04 11:59.
Re: Ulitimate lighting shader pack v1.0 [Re: Josh_Arldt] #36811
11/26/04 13:46
11/26/04 13:46
Joined: Jul 2003
Posts: 893
Melbourne, Australia
Matt_Coles Offline

User
Matt_Coles  Offline

User

Joined: Jul 2003
Posts: 893
Melbourne, Australia
Muralist:

to assign this code to your models paste this at the end of the normal mapping script

action Shader_NormalMap
{
my.material = spec_bump_model;
}

then assign it to an entity in WED.
Also you'll have to have a bump map in skin2 of whatever entity you put in there


Matt

Re: Ulitimate lighting shader pack v1.0 [Re: Matt_Coles] #36812
11/26/04 15:40
11/26/04 15:40
Joined: Jun 2004
Posts: 241
muralist Offline
Member
muralist  Offline
Member

Joined: Jun 2004
Posts: 241
thanks.

Well, now the entities with the action assigned turn black and white.
Back to the drawing board...

Last edited by muralist; 11/26/04 16:04.
Page 4 of 24 1 2 3 4 5 6 23 24

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