Home Artists Posts Import Register
Join the new SimpleX Chat Group!

Content

I've fixed the support for standard dynamic lights on rotated BSP entities (it was buggy in vanilla Quake's renderer), and added proper support for raytraced light sampling on rotated BSP entities too. This means that the dynamic lights that are cast on rotated BSP entities can properly collide against the world BSP. This means that all instances of dynamic lights colliding against world surfaces are properly implemented now.

However, to complete the effect, the dynamic lights must collide not only against the world, but also against all BSP entities in the way, including the entity that owns the surface being lit (i.e. self-shadowing).

As seen in this video, I've already got it to work with non-rotated entities, including moving ones. Moving platforms can finally cast shadows.

However, dynamic lights still can't collide properly against rotating BSP entities, which means that a rotating fan can't cast rotating shadows properly yet. After getting it to work, I'm going to optimize the raytracing code some more.

And finally, this month has been extremely busy in my real life, but in a good way; I've been able to take care of some huge problems, and I'm still solving other big problems. Financially, I'm still in a delicate situation, but the debts aren't snowballing anymore. At this pace, if I don't lose more patrons, I will be able to get my real life fixed by the end of 2024. If everything goes as expected in 2024, I'll make Retroquad more open to the public and focus heavily on making a game using it, because there will be no time-consuming real life problems distracting me anymore. Fingers crossed.

Files

Dynamic light sampling raytraced against BSP entities

Running in the Retroquad game engine, wip version 0.21.1: https://www.patreon.com/mankrip Hardware: CPU AMD Ryzen 5 PRO 3350G 3.6Ghz 4MB Cache AM4 Motherboard Biostar A320MH DDR4 RAM 16GB 2666MHz DDR4 SSD 256GB Sata 6GB/s

Comments

Pieter Verhoeven

I hacked a bit on the lightmap generation code for Jay Dolan's Quetoo, so I'm just mentioning this since I have some experience with self occlusion artifacts I see in the video -- Though Jay did most of the work there. Anyway, *if* they bother you... (Doesn't look that bad here, but still). I think you can fix some of the self-occlusion by tracing from the luxel point towards the light *but ignore backfaces*. This probably needs a modified trace function to do a dot product with the face normal. Alternatively you can nudge the sample positions, this article details a bunch of those: https://ndotl.wordpress.com/2018/08/29/baking-artifact-free-lightmaps/ -- we did the latter, but iirc I've seen the backface idea mentioned in a Frostbite lightmapping talk since, so it should work. Also shrinking the face polygon so the luxel points cover the edges will fix some of the blackness creeping in. Alternatives to that are just sampling one point of padding outward (more expensive), do thing in conservative rasterization (more expensive) style, or use a dilation filter (probably fast, since you only need one texel worth of dilation). Dilation is also mentioned in the above article. Cheers!

mankrip

Self-occlusion has been fixed already. For the edges, I'm planning to do something similar to what Quake's light compiler does, which is to nudge the affected coords towards the center of the polygon. I've tried implementing it already, but it gave hard edges to the lightmaps, so I'm still trying to tweak it further.