Translucent Voxels

Moderator: GZDoom Developers

Post Reply
User avatar
Spleen
Posts: 497
Joined: Fri Nov 28, 2008 7:07 pm

Translucent Voxels

Post by Spleen »

I think it would be really useful if actors using voxel models could be translucent. This would allow Heretic and Hexen graphics to be voxelized in the manner of the current Doom voxelization project.

The simplest method I could think of would be "whole-model" translucency, as suggested by DavidPH: the voxel model would first be rendered onto a blank canvas, then translucency would be applied to that rendered graphic based on the actor's alpha, and that graphic would simply be rendered as a regular sprite.

Another way of rendering translucent actors would be to render each individual voxel as translucent depending on the actor's alpha property and the size of the actor. Larger actors which are not hollow would have lower alpha for each individual voxel than smaller actors which are not hollow, due to having more voxels in the middle.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: Translucent Voxels

Post by randi »

You don't really need to make a suggestion for an incomplete feature. Blending was already planned for voxels.
Spleen wrote:Larger actors which are not hollow would have lower alpha for each individual voxel than smaller actors which are not hollow, due to having more voxels in the middle.
KVX throws out completely occluded voxels from the middle of the object, so all voxels are hollow.
User avatar
Spleen
Posts: 497
Joined: Fri Nov 28, 2008 7:07 pm

Re: Translucent Voxels

Post by Spleen »

Awesome, thanks!!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Translucent Voxels

Post by Graf Zahl »

Hm...

This will definitely be something I won't be able to get working in GZDoom unless doing it in a very, very, very hacky fashion...
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Translucent Voxels

Post by NeuralStunner »

I imagine it will fall prey to similar issues as translucent models...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Translucent Voxels

Post by Graf Zahl »

Precisely, considering that I treat voxels as models in the GL renderer.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Translucent Voxels

Post by NeuralStunner »

From the changelog, it sounds like ZDoom assembles voxels as sprites before drawing them. Can a similar method not be used in GL? Is that the sort of "hacky" you were thinking of?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Translucent Voxels

Post by Graf Zahl »

Yes. There's just 2 small problems with it:

1. In GL it's a lot more costly than with a software buffer. Such context switches as needed here can really bring down performance, especially if you have to do them multiple times in the middle of a render pass.
2. I need to find a way to get the 2D boundaries of the object. so that copying it to the screenbuffer won't get too costly.

Considering that even opaque voxel models take far too much time to set up I doubt it's a feasible approach.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”