Gamestudio Links
Zorro Links
Newest Posts
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 (Ayumi, 1 invisible), 584 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Need help with mtl_specBump (model is too dark) #402255
06/01/12 09:40
06/01/12 09:40
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Hey there,

I have not much experience with shaders so I hope that someone can help me.

I added the specular bump mapping shader to our character models.
The models have a specular map in the alpha channel of skin1 and a normal map as skin2.

I set the material like this:

Code:
MATERIAL* mtl_specBump =
{
	effect = "specBump.fx";
	specular_blue = 200;	// bright specular component
	specular_green = 200;
	specular_red = 200;
	ambient_blue = 255;
	ambient_green = 255;
	ambient_red = 255;
	diffuse_blue = 255;
	diffuse_green = 255;
	diffuse_red = 255;
	power = 10;
	flags = PASS_SOLID;
}



The problem is that the character is displayed too dark since the shader is applied. I thought that I could solve the problem by setting ambient_xxx to a high value, but that doesn't seem to have an effekt at all.

Note: In our levels we don't use any static lights and no sun light, only dynamic lights.

Can someone give me a hint what to do so that the character models with spec bump are displayed as bright as without the shader?

Thanks in advance for your help.

Regards,
Pegamode.

Re: Need help with mtl_specBump (model is too dark) [Re: pegamode] #402257
06/01/12 09:57
06/01/12 09:57
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
try using emissive_blue, emissive_green and emissive_red


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: Need help with mtl_specBump (model is too dark) [Re: painkiller] #402258
06/01/12 10:14
06/01/12 10:14
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
I just gave it a try ... no change at all.

Any other suggestion?

Re: Need help with mtl_specBump (model is too dark) [Re: pegamode] #402259
06/01/12 11:06
06/01/12 11:06
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Ok, I just found out that if I directly add a static value to any occurrence of "In.Ambient" directly in the shader, I can get the model as bright as I like.

But that doesn't seem to be a good way to solve the problem, doesn't it?

Re: Need help with mtl_specBump (model is too dark) [Re: pegamode] #402301
06/02/12 11:09
06/02/12 11:09
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
I just switched over to the spec bump shader from the wiki. The support of 6 lights helps a lot.


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