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 here are for active projects only! Please use the Editing subforums or General for questions.
Forum rules
The Projects forums are ONLY for YOUR 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.

Another raytracing try but it's even faster v3

Postby TDRR » Sun Jun 09, 2019 10:33 am

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 1:42 pm, edited 1 time in total.
User avatar
TDRR
iDeas from the deep (pit of hacks)
 
Joined: 11 Mar 2018
Location: Venezuela
Operating System: Windows Vista/7 64-bit
Graphics Processor: Intel (Modern GZDoom)

Re: Another raytracing try but it's playable v2

Postby TDRR » Tue Jun 11, 2019 7:47 pm

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
iDeas from the deep (pit of hacks)
 
Joined: 11 Mar 2018
Location: Venezuela
Operating System: Windows Vista/7 64-bit
Graphics Processor: Intel (Modern GZDoom)

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

Postby TDRR » Fri Aug 02, 2019 1:45 pm

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
TDRR
iDeas from the deep (pit of hacks)
 
Joined: 11 Mar 2018
Location: Venezuela
Operating System: Windows Vista/7 64-bit
Graphics Processor: Intel (Modern GZDoom)

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

Postby Ryumi » Thu Aug 22, 2019 4:03 pm

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
Ryumi
 
Joined: 03 Sep 2018
Discord: Ryumi#1153

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

Postby MFG38 » Fri Aug 23, 2019 1:30 pm

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
MFG38
 
Joined: 14 Apr 2019
Location: Finland
Operating System: Windows 10/8.1/8 64-bit

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

Postby TDRR » Sat Aug 24, 2019 12:16 am

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
TDRR
iDeas from the deep (pit of hacks)
 
Joined: 11 Mar 2018
Location: Venezuela
Operating System: Windows Vista/7 64-bit
Graphics Processor: Intel (Modern GZDoom)

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

Postby phantombeta » Sat Aug 24, 2019 1:09 am

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
phantombeta
In the meadow of sinful thoughts, every flower's a perfect one
 
Joined: 02 May 2013
Location: The United Soviet Socialist Dictatorship of Hueland
Discord: phantombeta#2461
Twitch ID: phantombeta_
Github ID: Doom2fan
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

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

Postby TDRR » Sat Aug 24, 2019 1:35 am

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.
User avatar
TDRR
iDeas from the deep (pit of hacks)
 
Joined: 11 Mar 2018
Location: Venezuela
Operating System: Windows Vista/7 64-bit
Graphics Processor: Intel (Modern GZDoom)


Return to Levels

Who is online

Users browsing this forum: No registered users and 3 guests