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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Akow), 1,371 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
lighting issue #424648
06/19/13 20:39
06/19/13 20:39
Joined: Nov 2011
Posts: 21
MO:US and sometimes Ambato Ecu...
L
LewyT Offline OP
Newbie
LewyT  Offline OP
Newbie
L

Joined: Nov 2011
Posts: 21
MO:US and sometimes Ambato Ecu...
Hello, I am trying create an environment where players can hide in the shadows.
Basically I want everything to be black unless a light is shining on it.

I've created a map without any ambient or sunlight
I've also created models without emissive or specular lighting
when I load a model I set it as unlit.

while everything looks darker than normal, I can still see all the model entities as if lit from above by some hidden light.

I found a partial solution: if I turn off diffuse lighting for the models, they show as completely black.
however, they are always black even if a dynamic light is shining close to them.

any ideas?

Re: lighting issue [Re: LewyT] #424649
06/19/13 21:19
06/19/13 21:19
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
simply do not set unlit for your character model, set its ambient to 0, use only diffuse.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: lighting issue [Re: sivan] #424660
06/20/13 03:01
06/20/13 03:01
Joined: Nov 2011
Posts: 21
MO:US and sometimes Ambato Ecu...
L
LewyT Offline OP
Newbie
LewyT  Offline OP
Newbie
L

Joined: Nov 2011
Posts: 21
MO:US and sometimes Ambato Ecu...
Thanks
I tried that but it still shows some lighting.
here is my game play view with no lights at all:


Re: lighting issue [Re: LewyT] #424662
06/20/13 04:01
06/20/13 04:01

M
Malice
Unregistered
Malice
Unregistered
M



Is that specular lighting that needs to be changed the model material not that model creation ? I'm not sure.

ent_mtlset (my, mtl_shaded ,1);

or maybe
Code:
MATERIAL* mtl_sdark ={  ambient_blue = 0;  ambient_green = 0;  ambient_red = 0;  diffuse_blue = 10;  diffuse_green = 10;  diffuse_red = 10;  specular_blue = 0;  specular_green = 0;  specular_red = 0;  power = 0;}

ent_mtlset (my, mtl_sdark ,1);



EDIT Final

Last edited by Malice; 06/20/13 04:11.
Re: lighting issue [Re: ] #424678
06/20/13 09:21
06/20/13 09:21
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
There is no need in any of those materials, or UNLIT flags.
Go throw this steps carefully (TESTED):
Quote:
* in WED, go to: File->Map Properties->Sun
* set all three Sun values to 0 (if you'll need to have some shadows, from the moon let's say, then increase it)
* set all three Ambient values, to something around 10-30 (depends on your needs, tweak this in future)
* set 'sun_light' to 0 (this is the thing, that affects on models, throw the walls, thats why they are shinning a bit)
It's tested and it works. If it doesn't work for you, then you've made something wrong.

Greets


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: lighting issue [Re: 3run] #424684
06/20/13 11:05
06/20/13 11:05
Joined: Nov 2011
Posts: 21
MO:US and sometimes Ambato Ecu...
L
LewyT Offline OP
Newbie
LewyT  Offline OP
Newbie
L

Joined: Nov 2011
Posts: 21
MO:US and sometimes Ambato Ecu...
Malice:
if diffuse is greater than 0 there is a glow without lights
if diffuse is less than 100 the objects don't show up well in light.

3run:
I've already set the sunlight to 0
there are no lights present at all.

Re: lighting issue [Re: LewyT] #424698
06/20/13 14:33
06/20/13 14:33
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
LewyT@ you've made something wrong then. Have you applied a custom shader on those models, or what?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: lighting issue [Re: 3run] #424700
06/20/13 14:59
06/20/13 14:59
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
if you don't need the sun you can try: vec_fill(sun_color, 0);


POTATO-MAN saves the day! - Random
Re: lighting issue [Re: Kartoffel] #424703
06/20/13 15:07
06/20/13 15:07
Joined: Nov 2011
Posts: 21
MO:US and sometimes Ambato Ecu...
L
LewyT Offline OP
Newbie
LewyT  Offline OP
Newbie
L

Joined: Nov 2011
Posts: 21
MO:US and sometimes Ambato Ecu...
Kartoffel: vec_fill(sun_color, 0); worked!!
3run: no shaders, I don't know how to do shaders yet.


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