Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (3run, Grant, 1 invisible), 3,890 guests, and 16 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Dynamic light [Re: Frits] #85781
08/15/06 14:28
08/15/06 14:28
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
Hi, here's a problem I'm having with dynamic lights as well, involving the unlit flag.

Is there a way to get my.unlit to simply ignore the effects of dynamic lights?

Here's my scene, lit with a bright green dynamic light, and player.unlit = 1. Notice how washed out she is, despite unlit = on. It's clearly being lit by dynamic lights:



Here's the very same scene, lit with a bright green dynamic light, and player.unlit = 0, and looks just like this regardless of albedo:



I really just want to turn or clamp down the effect of the dynamic light on a model... like my character would only take a little bit of the light effect, -or- simply not respond to the dynamic lights at all.

(Does unlit not apply to dynamic lights? Or is it a bug?)

Last edited by Jetpack_Monkey; 08/15/06 19:34.
Re: Dynamic light [Re: JetpackMonkey] #85782
08/15/06 15:06
08/15/06 15:06
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline
Expert
A.Russell  Offline
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
Do you have a shader applied to the player model?

Re: Dynamic light [Re: Frits] #85783
08/15/06 15:57
08/15/06 15:57
Joined: Aug 2005
Posts: 312
Sweden
tindust Offline
Senior Member
tindust  Offline
Senior Member

Joined: Aug 2005
Posts: 312
Sweden
In another thread under "engine" jcl comments on this:


Quote:

This is a misunderstanding of UNLIT: since A6, the effect of dynamic lights on entities is only controlled by materials.

So the UNLIT flag just assigns the predefined mat_unlit material when you set it in WED. From the manual:

"The entity automatically gets the mat_unlit default material assigned when this flag is set on entity creation (ent_create) or in WED. Otherwise, mat_unlit must or can be assigned manually."

Hope this helps. I'll improve the manual description.





So, the unlit flag has limited use in this case. I would try to
1/ turn down the range of the dynamic light if that is practical in your scene or
2/ turn down the intensity of the dynamic light by equally decreaseing the red, green and blue of the light
3/ possibly adjust the d3d_pointlightfalloff vector to get a more gradual decrease in light intensity, but that would change ALL dynamic lights,or
4/ a little of all of the above
5/ also make sure the ambient of the model is turned down or off and albedo to -100

hope this gives you some ideas,
cheers, tindust

edit: oops, forgot, you may also consider a second, white, dynamic light with short range to just lighten the face to give it "normal" colors/features

Last edited by tindust; 08/15/06 16:03.

Lighten Your Load With

DynaLights 1.0

Realtime 3D Lighting. Free Trial Version available.

3DGS 660P
Re: Dynamic light [Re: tindust] #85784
08/15/06 19:55
08/15/06 19:55
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
Hi,

Thanks for your replies and suggestions.

@A.Russell, the model only has a regular 24 bit texture file, no materials..

Quote:


This is a misunderstanding of UNLIT: since A6, the effect of dynamic lights on entities is only controlled by materials. So the UNLIT flag just assigns the predefined mat_unlit material when you set it in WED. From the manual:
"The entity automatically gets the mat_unlit default material assigned when this flag is set on entity creation (ent_create) or in WED. Otherwise, mat_unlit must or can be assigned manually."




Hmm, I'm not quite sure on what he means by 'the effect of dynamic lights... only controlled by materials'. Does that mean unlit will only work on objects with materials? It looks like it adds a material when unlit is set on? I have no idea what he means, I must be missing something.. Any chance you could put it in laymans terms for me, what he means by 'controlled by materials'?

Tindust, good ideas.. I've adjusted the lights to these crazy bright values to get some good lighting effects on my level models (since lightmapping is still kind of tricky), so I'd like to keep them bright.

But it looks like there is a way to turn the mapping off, if I can make sense of JCL's quote up there, if someone would be so kind as to translate it into non-jclese for me

Thanks muchly

Re: Dynamic light [Re: JetpackMonkey] #85785
08/15/06 21:30
08/15/06 21:30
Joined: Aug 2005
Posts: 312
Sweden
tindust Offline
Senior Member
tindust  Offline
Senior Member

Joined: Aug 2005
Posts: 312
Sweden
Well, as I understand it, a model always gets a material assigned to it, but you can opt to decide which material and what its properties are. There seem to be at least two default materials that will be assigned to the model by the engine if you don't override them; Regular default which is a white mtrl with has medium specularity, emissive, ambient, etc., and the unlit_material which has its settings set to much less speculartiy, etc. You probably already know this, but if you open your model in the MED and look under the Skin Editor, you will see a Material option where you can look at and adjust the material settings of your skin(s). There are also options to include effects. All these settings serve the purpose of changing how your model skin responds to dynamic lights (i.e. the effect of dynamic light on the skin).

So, the material can be adjusted in the MED. Alternatively, one could have the material set in the action of the entity, or in a function through ent_mtlset (ENTITY* entity,MATERIAL* material, var skin), that is if you have defined you own materials earlier in the script.

There is some more good info in the manual under "Skin Settings". Sorry that I cannot be more specific on how to change your models specific settings so that it reflects lett light, but maybe the info here can help to figure it out.

tindust


Lighten Your Load With

DynaLights 1.0

Realtime 3D Lighting. Free Trial Version available.

3DGS 660P
Re: Dynamic light [Re: tindust] #85786
08/15/06 22:48
08/15/06 22:48
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
i dont think that dynamic lights distances are affected by walls (response to original question, thats why it affects all of the area outside of it.

Re: Dynamic light [Re: lostclimate] #85787
09/15/06 07:28
09/15/06 07:28
Joined: Jul 2006
Posts: 69
P
piposlav Offline
Junior Member
piposlav  Offline
Junior Member
P

Joined: Jul 2006
Posts: 69
can someone tell me ,how i can use dyn. light on terrain ??? i dont want use lightmap (is so old techniqe and isnt dynamic).

Re: Dynamic light [Re: piposlav] #85788
09/15/06 16:35
09/15/06 16:35
Joined: Aug 2005
Posts: 312
Sweden
tindust Offline
Senior Member
tindust  Offline
Senior Member

Joined: Aug 2005
Posts: 312
Sweden
If you just want to use lights that stay in one place, the easiest is to add a simple model, like a sphere, check invisible and passable in its properties panel, and attach an Action that tells it what kind of dynamic light it is. I beleive there are templates and other scripts have also been posted with example actions. If you like you can use the "action pack" from the DynaLights site, it's found at this download page. Add the script DynaLightActs2.wdl, then attach the action "dynalight_basic", and set its properties in the property panel of the model in WED. It's free. This type of dynamic lights work well with terrain, but you may want to set the terrain property "ambient" to -100 if you do not want it to have its own ambient light.

edit: once you have created the lights (up to eight can be turned on at any one time including the sun), just position them around your level in suitable spots.

cheers,
tindust

Last edited by tindust; 09/15/06 20:45.

Lighten Your Load With

DynaLights 1.0

Realtime 3D Lighting. Free Trial Version available.

3DGS 660P
Page 2 of 2 1 2

Moderated by  HeelX, rvL_eXile 

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