Few theorethical questions about voxels
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Few theorethical questions about voxels
Hi there, mates, it's been quite a while since i've been here last time. Let's get to the topic. First - what is the actual size of a voxel placed on map? It's fixed or scalable? Second - is there any collision detection with voxels? Thall be kinda fun to make an arch and put in the doorway. Or create a bunch of nice-looking crates to jump on.
edit: first question is off, i've foubd the answer in the manuals. Yay!
edit: first question is off, i've foubd the answer in the manuals. Yay!
Last edited by Post on Thu Jan 16, 2014 1:04 am, edited 1 time in total.
Re: Few theorethical questions about voxels
Nope. Idtech1 is still Idtech1.Post wrote:Second - is there any collision detection with voxels? Thall be kinda fun to make an arch and put in the doorway. Or create a bunch of nice-looking crates to jump on.
- The Zombie Killer
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: Few theorethical questions about voxels
Personally I'd like the option to use cube-based collision rather than sphere-based. (it is sphere based, isn't it? Hence "radius"?)
Re: Few theorethical questions about voxels
Also nope. It's always been square based + height.
Re: Few theorethical questions about voxels
Did i understand you correctly, there is a collision for voxel models and it's square + height?edward850 wrote:Also nope. It's always been square based + height.
Re: Few theorethical questions about voxels
Nope the Third. As I stated before, Doom's physics haven't changed at all, and collisions are still actor based. Voxels are purely a visual effect replacement for sprites.
Re: Few theorethical questions about voxels
Oh, yeah, i get it. Thanks a lot good sir!edward850 wrote:Nope the Third. As I stated before, Doom's physics haven't changed at all, and collisions are still actor based. Voxels are purely a visual effect replacement for sprites.
Re: Few theorethical questions about voxels
The term "radius" is improper since Doom uses Lazy Geometry. Lazy Geometry is geometry where trigonometry doesn't exist.
For example, the distance between points A and points B are the same, according to Doom, in both these cases:
It compares X-axis distances and Y-axis distances separately, and go with the greater of the two; instead of combining them together. (Also, it generally completely ignores the existence of Z-axis distance, though ZDoom changed that in many cases.)
So a mobj's radius is really just half the size of the side of its square collision box. But laziness goes beyond making circles into squares:
Here are a few mobjs rotated with different angles:
As you can see, the mobj's angle has absolutely no effect on its collision box. If you create a voxel crate, you can have its physical shape match its collision box perfectly... But only as long as it is angled along the grid. If you rotate it 45°or any other value that isn't a multiple of 90°, then the collision box will no longer fit the apparent volume.
For example, the distance between points A and points B are the same, according to Doom, in both these cases:
Code: Select all
A B
________
A
BSo a mobj's radius is really just half the size of the side of its square collision box. But laziness goes beyond making circles into squares:
Here are a few mobjs rotated with different angles:
Code: Select all
0° 10° 20° 30° 40° 50° 60° 70° 80° 90°
┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐
└─┘ └─┘ └─┘ └─┘ └─┘ └─┘ └─┘ └─┘ └─┘ └─┘
- The Zombie Killer
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: Few theorethical questions about voxels
Interesting read. You should make a page/thread with all of your miscellaneous ZDoom info 
How easy would correcting Doom's use of lazy geometry be? Would it work by changing the calculations in the source so that they use trigonometry?
How easy would correcting Doom's use of lazy geometry be? Would it work by changing the calculations in the source so that they use trigonometry?
Re: Few theorethical questions about voxels
Problem is that it would risk breaking things. Doom has a twenty-year history of people making maps that work according to how it works. Changing something as fundamental as collision detection and distance checks is going to break countless maps.
- The Zombie Killer
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: Few theorethical questions about voxels
Makes sense. I am planning to have a custom version of GZDoom for a personal project so it shouldn't cause any issues for me.
Are there any serious problems that can only be fixed by editing the source that lazy geometry causes?
Are there any serious problems that can only be fixed by editing the source that lazy geometry causes?
Re: Few theorethical questions about voxels
Nah it's just limited by the age that it was made, there was some cool updates that came by the time, like before you couldn't jump over a monster/object xD
hmm you could make a fake geometry putting some bridges on it and the voxel with no heigh...
hmm you could make a fake geometry putting some bridges on it and the voxel with no heigh...
Re: Few theorethical questions about voxels
A voxel's maximum size is 256 x 256 x 256 so that's basically the largest object you can make. To make small voxel objects have a higher resolution, you can create large voxels and scale them down. Be careful about this however, if you're going to create high res voxels that will end up being spawned a lot in the same screen, you might experience slow downs.

