Another raytracing try but it's even faster v3

New maps, and other projects whose primary focus is new maps, belong here.

Note: This forum, and all forums below it, are not for questions or troubleshooting! Threads created here are for active projects only! If you have questions please feel free to use the Editing subforums or General forum.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
Post Reply
User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

Another raytracing try but it's even faster v3

Post by TDRR »

Spoiler: Info about V2 (uses dynamic lights instead)
Once again, a third try, and this time it's even faster. Now, it uses sector colors instead of dynamic lighting, works in Zandronum's software renderer and runs way faster.
The "shadow map" is much more precise compared to the dynamic lights one, but is jaggier.

It still works in Zandronum and ZDoom, and also modern GZDoom.

You can use this in whichever way you need, while there's no need to credit me it would be nice if you did, also tell me when you end up using it because i would love to see the result!

Setting it up is easy, if a bit tedious. I recommend using GZDoom Builder for this. Make a grid of sectors which will be your "shadow map", i'd recommend making it 8x8, 16x16 or 32x32, depending on the size of the area the effect will be used in. The larger the area, the larger you want each sector to be. Tag them any random numbers (Just have them be all different and not conflicting with other tags) and place LightReciever in it, tag the light recievers other random numbers that don't conflict with the sectors. You might need to make a new actor that's a HateTarget, and then use Thing_Hate to make the light recievers target the HateTargets. After this you should be able to place monsters on the area. Sorry for not doing this myself but i just couldn't understand how these Thing_Hate things worked.

DOWNLOAD! V3 (Sector based)

DOWNLOAD! V2 (Dynamic light based)

DOWNLOAD!
Last edited by TDRR on Fri Aug 02, 2019 12:42 pm, edited 1 time in total.
User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

Re: Another raytracing try but it's playable v2

Post by TDRR »

Updated with two types of demos now. raytracingv2.wad is a door sliding open and closing back again, with light progressively lighting up the room as the door opens, and raytracingv2free.wad is the same old zombieman walking around except this time it has a "light" sprite so it doesn't look as dumb. Oh yeah and the lighting resolution has been doubled from 4x4x3 to 8x8x3, i left the wall resolution the exact same and it doesn't look noticeable so that's a good amount of performance saving.

Download link in the OP!
User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

Re: Another raytracing try but it's even faster v3

Post by TDRR »

Updated once again. There's two more types of demos, jail and jail2. Both are the light enclosed on a "cage" of sorts and jail2 has less holes in it so it looks more coherent.
Now v3 works with sector colors, which is far faster and more precise and i average upwards of 70fps in software mode on a Celeron N2805 1.4GHz, single-core rendering.

Download link in the OP!

(mods, sorry for my spam but this is the amount of mods i pile up on a week without internet)
User avatar
Ryumi
Posts: 3
Joined: Mon Sep 03, 2018 1:54 pm
Preferred Pronouns: She/Her

Re: Another raytracing try but it's even faster v3

Post by Ryumi »

This is really interesting! This could give mappers some very interesting tools to make their maps look even more impressive. Great work so far!

Have you been experimenting with other methods of raytracing?
User avatar
MFG38
Posts: 414
Joined: Sun Apr 14, 2019 8:26 am
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland
Contact:

Re: Another raytracing try but it's even faster v3

Post by MFG38 »

Ryumi wrote:This could give mappers some very interesting tools to make their maps look even more impressive.
I'd be inclined to agree if it wasn't for the fact that shadowmaps are a thing in GZDoom now, which sort of makes "raytracing" (using the term extremely loosely) unnecessary. Any attempt at implementing raytracing, regardless of the method, is inefficient at best and ugly at worst.
User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

Re: Another raytracing try but it's even faster v3

Post by TDRR »

Ryumi wrote:This is really interesting! This could give mappers some very interesting tools to make their maps look even more impressive. Great work so far!

Have you been experimenting with other methods of raytracing?
Thanks! I really hope someone puts this to good use, possibly optimizing it more than what i can with my limited knowledge.

Well, it's all the exact same method: A light gets tracked by multiple actors and this actor does something depending on if it can see the light or not.

What the actor does is the only thing that really changed, since in v1 and v2 i did it using dynamic lights, but in v3 i used sector colors which is way, WAY faster and allows me to cut a very big amount of light actors, but it looks blockier unfortunately. At least it's very playable on large scales vs. the dynlight method.

I have also fiddled with the timing of the lights, to reduce strain on the processor even further.
MFG38 wrote:
Ryumi wrote:This could give mappers some very interesting tools to make their maps look even more impressive.
I'd be inclined to agree if it wasn't for the fact that shadowmaps are a thing in GZDoom now, which sort of makes "raytracing" (using the term extremely loosely) unnecessary. Any attempt at implementing raytracing, regardless of the method, is inefficient at best and ugly at worst.
Yeah, i know this technically isn't true raytracing, but it's close to the concept. Except it's not on a per-pixel basis, and there's no light bouncing or the more advanced stuff. Just the basic lighting first pass.

And shadowmaps aren't dynamic at all, so this is suited to moments where dynamic lighting would be better. Such as a chandelier moving left and right or something of the like.
User avatar
phantombeta
Posts: 2084
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Another raytracing try but it's even faster v3

Post by phantombeta »

TDRR wrote:And shadowmaps aren't dynamic at all, so this is suited to moments where dynamic lighting would be better. Such as a chandelier moving left and right or something of the like.
Quite the opposite, GZDoom's shadowmaps are actually entirely dynamic. The only issue with them is being single-dimensional, as they're only affected by one-sided lines and polyobjects, and not sectors' upper and lowers (height differences).
User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

Re: Another raytracing try but it's even faster v3

Post by TDRR »

phantombeta wrote:Quite the opposite, GZDoom's shadowmaps are actually entirely dynamic. The only issue with them is being single-dimensional, as they're only affected by one-sided lines and polyobjects, and not sectors' upper and lowers (height differences).
Ah, forgive my ignorance then, i can't use shadowmaps on this Intel GPU. (Only have GL 4.0 but GL 4.5 is required for shadowmaps i believe)

At least this can be affected by those so it's ever so slightly more accurate. Also, you can have them in software mode and in computers with GL 2.0 support, you will never ever be able to say the same for the shadowmaps.
Post Reply

Return to “Levels”