Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (ozgur, howardR, AndrewAMD, exile, Ayumi), 725 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Bump specular wiht sun ? [Re: Matt_Aufderheide] #61336
01/07/06 19:48
01/07/06 19:48
Joined: Mar 2002
Posts: 221
USA
zefor Offline
Member
zefor  Offline
Member

Joined: Mar 2002
Posts: 221
USA
I have this at the bottom of main


Code:
 
function load_shaders2()
{

effect_load(mat_normalmap,"normalmap.fx");
mat_normalmap.skill1=float(sun_pos.x);
mat_normalmap.skill2=float(sun_pos.z);
mat_normalmap.skill3=float(sun_pos.y);
}



I also have normalmap.fx in my root directory. Are actions not necessary? if not how do you make them not transparent, because the transparency flag is already unchecked? I only know how to do this with an action.

Last edited by zefor; 01/07/06 19:50.
Re: Bump specular wiht sun ? [Re: zefor] #61337
01/07/06 20:26
01/07/06 20:26
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
yes actions are needed, both to assign a material, and to set various flags..

and of course you have to call this function somewhere after you load the level..


Sphere Engine--the premier A6 graphics plugin.
Re: Bump specular wiht sun ? [Re: Matt_Aufderheide] #61338
01/08/06 01:52
01/08/06 01:52
Joined: Mar 2002
Posts: 221
USA
zefor Offline
Member
zefor  Offline
Member

Joined: Mar 2002
Posts: 221
USA
Ok, here is what I have. my models look like the side of the models that are AWAY from the light in other shaders. Dont know if that makes sense??? Its like they are not getting the sun light.

Re: Bump specular wiht sun ? [Re: zefor] #61339
01/09/06 20:25
01/09/06 20:25
Joined: Mar 2002
Posts: 221
USA
zefor Offline
Member
zefor  Offline
Member

Joined: Mar 2002
Posts: 221
USA
Do I need to change anything with the sun in the map properties? Tried this and still no result. I know I am missing something so simple, I'll kick myself later.

Re: Bump specular wiht sun ? [Re: zefor] #61340
01/11/06 14:54
01/11/06 14:54
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
Maybe you could replace this
Code:

function load_shaders2(){
effect_load(mat_normalmap,"normalmap.fx");
mat_normalmap.skill1=float(sun_pos.x);
mat_normalmap.skill2=float(sun_pos.z);
mat_normalmap.skill3=float(sun_pos.y);}



with this:
Code:

function load_shaders2(){
effect_load(mat_normalmap,"normalmap.fx");
while(1){
mat_normalmap.skill1=float(sun_pos.x);
mat_normalmap.skill2=float(sun_pos.z);
mat_normalmap.skill3=float(sun_pos.y);
wait(1);}
}



Just in case the sun_pos is modified during runtime, that'd probably already do the trick

Last edited by The Matrix; 01/11/06 14:56.

Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Re: Bump specular wiht sun ? [Re: Thomas_Nitschke] #61341
01/11/06 21:08
01/11/06 21:08
Joined: Mar 2002
Posts: 221
USA
zefor Offline
Member
zefor  Offline
Member

Joined: Mar 2002
Posts: 221
USA
Here is what I have:
Code:

material mat_normalmap
{
flags=tangent;
}



Is under the "Includes" in the main script.
I have the rest of the code placed at the bottom like so:
Code:

/////////////////////////////////////////////////////////////////
//INCLUDE <debug.wdl>;


function load_shaders2()
{
effect_load(mat_normalmap,"normalmap.fx");
while(1){
mat_normalmap.skill1=float(sun_pos.x);
mat_normalmap.skill2=float(sun_pos.z);
mat_normalmap.skill3=float(sun_pos.y);
wait(1);}
}



I am using a model with colormap (with specular in alpha) in skin1 32bit and normal map in skin2 24 bit. Used this model successfully with ultimate lighting shader. I do have normalmap.fx in my work folder. still no bump or spec, I am hoping I just placed these in the wrong section of script and someone will be able to point out where they "should" go. Thank you.

Last edited by zefor; 01/11/06 21:08.
Re: Bump specular wiht sun ? [Re: zefor] #61342
01/12/06 15:00
01/12/06 15:00
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
Right below the load_shaders2 function, you should place an action that can be assigned to the model, otherwise of course the model won't do anything.
I know this is a rather stupid reminder but just in case you forgot it...

Last edited by The Matrix; 01/12/06 15:00.

Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Re: Bump specular wiht sun ? [Re: Thomas_Nitschke] #61343
01/12/06 15:20
01/12/06 15:20
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Where in your script do you call this function?


Sphere Engine--the premier A6 graphics plugin.
Re: Bump specular wiht sun ? [Re: Matt_Aufderheide] #61344
01/12/06 16:50
01/12/06 16:50
Joined: Mar 2002
Posts: 221
USA
zefor Offline
Member
zefor  Offline
Member

Joined: Mar 2002
Posts: 221
USA
I have read this post a hundred times, and somehow, in my stupidity, I was calling the function ABOVE the level load. Now it is BELOW where it belongs and its working. Thank you again matt, for opening my eyes. I knew it would be something stupid that I missed. I rated you a star.

By the way, Nice looking shader matt. And not a bad framerate too. Best framerate I've had with shaders

Last edited by zefor; 01/12/06 18:52.
Re: Bump specular wiht sun ? [Re: zefor] #61345
01/13/06 22:24
01/13/06 22:24
Joined: Mar 2002
Posts: 221
USA
zefor Offline
Member
zefor  Offline
Member

Joined: Mar 2002
Posts: 221
USA
This shader only seems to work for me with templates, and only if I dont have camera1stperson commented out. I dont have a problem using templates, but I dont want a 1st person veiw. Any suggestions?

Page 2 of 3 1 2 3

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