Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 945 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: sun and dynamic light? [Re: MasterQ32] #446779
10/30/14 19:40
10/30/14 19:40
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
in the manual under "engine" sub section "lighting engine" is a lot of information .

one states that you can read the PRV values of
the current watched (debug) entity but according
to what I understand PRV being pre calculated
light values ,come from static lighting ,so that won't
help you .

However ,also according with my understanding
dynamic lighting calculates from the diffuse specular and emissive values of entities ,
therefore you could
create an entity which you could read it's material
values from and apply the calculation to it ,then apply that to your view entity ?,but
I do not know how good a transition would look like.

if you need an entity to only be affected by dynamic
lights the manual states , set it's UNLIT flag but do not assign mat_unlit .

for affecting it only with PRV , assign mat_unlit
but do not set UNLIT flag ..

I guess you could also read a single vertex (totally unsure) for calculating the light ...

but for PVR the hit.blue/green/red represent
the lightmap ,so that won't help for dynamic lights..

i think the closest i got is ,have a look at , vecLight and vecLightColor

jb

Last edited by Wjbender; 10/30/14 20:46.

Compulsive compiler
Re: sun and dynamic light? [Re: Wjbender] #446787
10/31/14 08:22
10/31/14 08:22
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: MasterQ32
Why not use a PANEL with the animated weapon sprite and color it dynamically with LIGHT flag and use this instead of a view model?
Should look pretty cool if the NOFILTER flag is set
Still, this doesn't help me to get dynamic lights affect on PANELs you suggest. tired


Originally Posted By: Wjbender
in the manual under "engine" sub section "lighting engine" is a lot of information .

one states that you can read the PRV values of
the current watched (debug) entity but according
to what I understand PRV being pre calculated
light values ,come from static lighting ,so that won't
help you .
Yes, I've already got static light on the view entity (as I've described in my first post).
Originally Posted By: Wjbender
However ,also according with my understanding
dynamic lighting calculates from the diffuse specular and emissive values of entities ,
therefore you could
create an entity which you could read it's material
values from and apply the calculation to it ,then apply that to your view entity ?,but
I do not know how good a transition would look like.
If only I knew, how to return this values of the specific entity frown
Originally Posted By: Wjbender
if you need an entity to only be affected by dynamic
lights the manual states , set it's UNLIT flag but do not assign mat_unlit .

for affecting it only with PRV , assign mat_unlit
but do not set UNLIT flag ..
UNLIT flag doesn't help in this situation.. smirk
I can't say it doesn't affect view entities, cause after setting it, I'm not able to change view entities colors.
Originally Posted By: Wjbender
I guess you could also read a single vertex (totally unsure) for calculating the light ...

but for PVR the hit.blue/green/red represent
the lightmap ,so that won't help for dynamic lights..

i think the closest i got is ,have a look at , vecLight and vecLightColor

jb
I'm not familiar with shaders unfortunately, otherways maybe I could use vecLightPos and vecLightColor frown

Thank you all for ideas so far, but yet question is still unanswered.
I could cycle throw all entities to check if they have lightrange > 0, or only specific type of entities (fire, enemies), but this is not an option for me, cause it will be too slow and tricky.. I want to recreate solution which was made by that jd_frost dude, so I could only use a single trace for this. So please, this in this direction, so all together we'll be able (hopefully) to recreate this solution (let this be some kind of a challenge for your knowledge tongue ).

Greets


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: sun and dynamic light? [Re: 3run] #446794
10/31/14 12:38
10/31/14 12:38
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
okay ... shadow_range sets a limit for the range which
dynamic shadows are displayed ..

set this value so that the shadow wil not
be displayed when it is out of range of a dynamic
light , the engine would determine the distance
calculations for you .

use a trace and if you find the shadow in there ,it
would mean to apply brightness to your view entity,
else set it dark .
I do not know if it would work for only decal shadows
or what .

view_to_light is another option to access ,the
variables of the closest to furthest 8 lights .

not a problem I would like to make my own , good luck


Last edited by Wjbender; 10/31/14 13:00.

Compulsive compiler
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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