Translucent Voxels

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Translucent Voxels

Re: Translucent Voxels

by Graf Zahl » Sun Oct 17, 2010 3:37 pm

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.

Re: Translucent Voxels

by NeuralStunner » Sun Oct 17, 2010 2:49 pm

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?

Re: Translucent Voxels

by Graf Zahl » Sun Oct 17, 2010 2:47 pm

Precisely, considering that I treat voxels as models in the GL renderer.

Re: Translucent Voxels

by NeuralStunner » Sun Oct 17, 2010 2:20 pm

I imagine it will fall prey to similar issues as translucent models...

Re: Translucent Voxels

by Graf Zahl » Sun Oct 17, 2010 2:17 pm

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...

Re: Translucent Voxels

by Spleen » Sun Oct 17, 2010 2:15 pm

Awesome, thanks!!

Re: Translucent Voxels

by randi » Sun Oct 17, 2010 12:11 pm

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.

Translucent Voxels

by Spleen » Sat Oct 09, 2010 5:42 pm

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.

Top