Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 7th_zorro), 892 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Dynamic light limit [Re: Matt_Aufderheide] #49105
07/17/05 03:18
07/17/05 03:18
Joined: Jul 2003
Posts: 592
SLC, UT
prophet Offline
User
prophet  Offline
User

Joined: Jul 2003
Posts: 592
SLC, UT
Go with Orange Brat's script, it works quite nicely.


The attempt at a one man show. http://www.mutsoftware.com
Re: Dynamic light limit [Re: Matt_Aufderheide] #49106
07/17/05 08:27
07/17/05 08:27
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
Quote:

Quote:

8 lights to be processed in one frame, the next 8 lights processed in the next frame, then the final 8 in the third frame.



this is a very bad idea.. this will make all of your light flicker..ugly. Bascially you cant get around the 8 light limit yet, so dont try, just design around it..instead of using 2 lights for each car headlights, just use one for each car. of course, only activate lights that are near to the camera, and can easlity fade them in and out..when you think about it, 8 lights at once is an awful lot of lights, more than you should reasonably need.




In case you're wondering, I'm thinking that this'll still have the lights being shown, but have a delay not getting updated after some time. That is, when light 8 is processed and the wait instruction is encountered, when light 9 starts up, light 1 remains in the same position it was in earlier and light 9 is processed. Because of the frame advance, lights 1 through 8 would have their old positions kept without being changed. Then, when the whole cycle went through and back to 1 again, light 1, being behind some, will get updated to it's new position. It's a weird concept, but it works best with high frame rates. At low frame rates, it's more easily noticed.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Dynamic light limit [Re: ulillillia] #49107
07/17/05 09:28
07/17/05 09:28
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
It's not a wierd concept at all. it's pretty straightforward.. but the thing is wont work really..unless you have really high framerates like 100fps or so.. even then it will still produce flickering. And since no 3d game has a consistent framerate at all times, it will also stutter..the results would generally be unacceptable.

Re: Dynamic light limit [Re: Matt_Aufderheide] #49108
07/17/05 09:46
07/17/05 09:46
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
Quote:


Code:
function check_visibility()
{
var screenpos[3];

while(1)
{
vec_set(screenpos.x,my.x);

if (vec_to_screen(screenpos,camera)!=0)
{
my.lightrange=0;

}
else{my.lightrange=light_range;}


wait(1);
}

}







That's a pretty nice way to turn off a light and not mess with vec_dist like in my script. I might find some way to integrate it into my Ultimate light script one day...as an option. This method would be good for lights in a multi-floor level and that are on a floor above or below the player but are still within a range that would keep them turned on. That's a pretty big flaw in my current version, but it only occurs when the multi-floor scenario is in play.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Dynamic light limit [Re: Orange Brat] #49109
07/17/05 11:02
07/17/05 11:02
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Actually this wont work for the multi floor situation..as there is no occlusion testing.. the only wy to do occlusion testing would be to cast a ray from the light to the eye.. however, if you have multiple floors, you should have BSP or some kind visibility in play, so the object that produces the light ought to be culled by the engine automatically..eliminating the problem altogether.

Re: Dynamic light limit [Re: ] #49110
07/26/05 10:50
07/26/05 10:50
Joined: Jul 2005
Posts: 109
Cyrpus
Aram Offline
Member
Aram  Offline
Member

Joined: Jul 2005
Posts: 109
Cyrpus
So this dynamic light limit, is it a 3DGS limit or is it something related to DirectX ?


GeForce 7800 GT (256 MB DDR3) 3DGS A6 Commercial. DJ Aram
Re: Dynamic light limit [Re: Aram] #49111
07/26/05 10:55
07/26/05 10:55
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
Neither. It's a hardware limit as far as I know. DirectX makes use of the hardware so it may have some effect to it.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Dynamic light limit [Re: Aram] #49112
07/26/05 10:56
07/26/05 10:56
Joined: Mar 2002
Posts: 7,726
old_bill Offline
Senior Expert
old_bill  Offline
Senior Expert

Joined: Mar 2002
Posts: 7,726
The dynamic lights are hardware based, and there DirectX gives the limit of 8.
But Conitec is working on a fast software solution, which will eliminate the limit of 8
active dynamic lights.

old_bill


Success is walking from failure to failure with no loss of enthusiasm.
Re: Dynamic light limit [Re: old_bill] #49113
07/26/05 10:58
07/26/05 10:58
Joined: Jul 2005
Posts: 109
Cyrpus
Aram Offline
Member
Aram  Offline
Member

Joined: Jul 2005
Posts: 109
Cyrpus
Thanks for the info guys.

Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

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