Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,618 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
No lightning on models #112394
02/17/07 01:42
02/17/07 01:42
Joined: Feb 2007
Posts: 25
São Paulo - Brasil
Vini Offline OP
Newbie
Vini  Offline OP
Newbie

Joined: Feb 2007
Posts: 25
São Paulo - Brasil
Hi, this is my first post here!

I have some problem with lightning on models... they don´t be affected by any lights I put on my level, model origin isn´t on the walls or something else, there´s no action assigned too...

there´s a picture of a test level I made

http://img114.imageshack.us/img114/6720/semsombraom6.jpg


anyone can help???


A6.60 Comercial A7.07 Comercial
Re: No lightning on models [Re: Vini] #112395
02/17/07 02:09
02/17/07 02: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
assign a material to the model

my.material = mtl_entity;


xXxGuitar511
- Programmer
Re: No lightning on models [Re: xXxGuitar511] #112396
02/17/07 18:43
02/17/07 18:43
Joined: Feb 2007
Posts: 25
São Paulo - Brasil
Vini Offline OP
Newbie
Vini  Offline OP
Newbie

Joined: Feb 2007
Posts: 25
São Paulo - Brasil
can you post an example? I make an action with the code, but I get an error "parameter unknown mtl_entity"


thanks in advice!!!!


A6.60 Comercial A7.07 Comercial
Re: No lightning on models [Re: Vini] #112397
02/17/07 19:40
02/17/07 19:40
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
sorry - i gave you the wrong material name

my.material = mat_model;


xXxGuitar511
- Programmer
Re: No lightning on models [Re: xXxGuitar511] #112398
02/17/07 21:28
02/17/07 21:28
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
Well better forget this about the material, I dont see how it can help you when you assign the same material that model has anyway?

Static Lights that you place in WED can throw shadows on the textures of your level walls but not on model textures. Models are external files and get their texture in the model editor and this texture is not going to be changed by whatever is in your level, so they are only uniformly lit by your static lights.

What you need for models is a Dynamic Light, that is another entity nearby with its lightrange parameter set to the range that the light should have, like 500 or so.

action dynamiclight() { my.lightrange = 500; }

Re: No lightning on models [Re: Spirit] #112399
02/18/07 05:29
02/18/07 05:29
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
@Spirit: Wrong dumbass...

Sorry, didn't really mean to be an [censored], but that was just purely incorrect. Static lights create a lightmap/shadowmap (whatever you decide to call it) on level blocks, and then entities automatically do a trace downwards (limited by floor_range) to recieve the textures brightness, and then apply it to the model. Therefore, models are automatically lit by static (and dynamic) lights, unless you apply a shader, then it's only dynamic lights.

Quote:


var floor_range

Controls the range within which the entities' light depends on the brightness and shadows of the floor area below (default 1000 quants). If the entities' height above the floor exceeds that range, the entity won't receive light, albedo and fog values from the floor texture. This way it can be prevented that aircraft models in a flight simulator suddenly change their brightness dependent on shadows on the ground.





also, mat_model is apparently set by default. However, I'd recommend that you create your own material.


xXxGuitar511
- Programmer
Re: No lightning on models [Re: xXxGuitar511] #112400
02/19/07 02:36
02/19/07 02:36
Joined: Feb 2007
Posts: 25
São Paulo - Brasil
Vini Offline OP
Newbie
Vini  Offline OP
Newbie

Joined: Feb 2007
Posts: 25
São Paulo - Brasil
thanks to all!! I solved the problem in both ways, with static and dynamic lights... I have the same problem with outdoor levels that contain a terrain, but if I put a level block under the terrain, like a floor everything works!!

thanks again!!


A6.60 Comercial A7.07 Comercial
Re: No lightning on models [Re: Vini] #112401
02/23/07 04:15
02/23/07 04:15
Joined: Sep 2005
Posts: 508
Texas
not_me Offline
User
not_me  Offline
User

Joined: Sep 2005
Posts: 508
Texas
thank you ...you solved my problem as well now my game looks mediocre
lol thankyou...


-Initiate Games
-Level designer

http://www.sckratchmagazine.com

Gamestudio download | 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