Static entities never move. You can save a certain amount of BSP tree tracing at runtime by running them through R_LightPoint and saving out the surface and point they hit. Then just run the per-surface part of R_LightPoint again when it comes time to light the model (ent->efrag can be used to test if an entity is static in GLQuake as only static entities have efrags; in software Quake you'll need to add a flag or something). Don't forget to also add dynamic lights.
Depending on how many static entities you have in a scene the performance boost can be significant.
Neat trick with static entities and lighting
Neat trick with static entities and lighting
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
Re: Neat trick with static entities and lighting
Good information. I messed with makestatic (self) in QC a few times, but mistaked it for more or less a remove self.
mh wrote:Static entities never move. You can save a certain amount of BSP tree tracing at runtime by running them through R_LightPoint and saving out the surface and point they hit. Then just run the per-surface part of R_LightPoint again when it comes time to light the model (ent->efrag can be used to test if an entity is static in GLQuake as only static entities have efrags; in software Quake you'll need to add a flag or something). Don't forget to also add dynamic lights.
Depending on how many static entities you have in a scene the performance boost can be significant.
Re: Neat trick with static entities and lighting
heh, aye, many QW clients hide static ents to gain a tiny bit of fps, can easily see how makestatic might be equivelent to remove.
Re: Neat trick with static entities and lighting
I messed with the code opee made for nails [ er spike? ] sticking in the walls today....kind of clever. Its got a think that removes the nail after a time, but I thought, why not just make it static, that way its not going to be included in the packet and wil reduce chances of overflow, but when I tested the code, the nail was nt visible, much less stuck in the wall. Then I remembered LH telling me makestatic
wont show the entity up to any client currently conected, but any client connecting after its made static will see it. So I reconnected and could see them stuck all over. Some of my code performs ricochets if its not gonna stick, and they still are live when dropped to the floor, so if you walk on them (ouch!). If you have armor on they disarm after the first touch. Kinda neat for teamplay if you want to protect a certain item, like a flag...heh. Lots of ppl complain that the nailgun is a useless weapon compared to the others.
wont show the entity up to any client currently conected, but any client connecting after its made static will see it. So I reconnected and could see them stuck all over. Some of my code performs ricochets if its not gonna stick, and they still are live when dropped to the floor, so if you walk on them (ouch!). If you have armor on they disarm after the first touch. Kinda neat for teamplay if you want to protect a certain item, like a flag...heh. Lots of ppl complain that the nailgun is a useless weapon compared to the others.
Spike wrote:heh, aye, many QW clients hide static ents to gain a tiny bit of fps, can easily see how makestatic might be equivelent to remove.
Re: Neat trick with static entities and lighting
you can make it to where they dont hurt you when you touch them, i forget how i did it back when i was messing with them.Cobalt wrote:I messed with the code opee made for nails [ er spike? ] sticking in the walls today....kind of clever. Its got a think that removes the nail after a time, but I thought, why not just make it static, that way its not going to be included in the packet and wil reduce chances of overflow, but when I tested the code, the nail was nt visible, much less stuck in the wall. Then I remembered LH telling me makestatic
wont show the entity up to any client currently conected, but any client connecting after its made static will see it. So I reconnected and could see them stuck all over. Some of my code performs ricochets if its not gonna stick, and they still are live when dropped to the floor, so if you walk on them (ouch!). If you have armor on they disarm after the first touch. Kinda neat for teamplay if you want to protect a certain item, like a flag...heh. Lots of ppl complain that the nailgun is a useless weapon compared to the others.
Spike wrote:heh, aye, many QW clients hide static ents to gain a tiny bit of fps, can easily see how makestatic might be equivelent to remove.