FreshRSS

Normální zobrazení

Jsou dostupné nové články, klikněte pro obnovení stránky.
PředevčíremHlavní kanál

Could John Carmack implement voxels in Doom engine?

There are examples of voxel engines of that era - ones that draw columns of pixels according to height and color data.
Could a similar approach of software rendering of voxels be implemented in original Doom or Doom 2 engine? I mean rendering sets of columns instead of sprites. If it couldn't why then?

How do I convert a voxel model to a low-poly mesh with texture mapping that accurately mimics the coloured voxels?

I've created a model in MagicaVoxel (A) and I want to use it in Godot. I imported the model into Blender, but then realized that it's using a very high polygon count for such a simple model. I found that using MagicaVoxel's OBJ export yields interesting results in that voxels of the same colour share polygons (B), but when many different coloured voxels are next to each other, it still creates a high polygon count.

voxel polygon count

Ideally, I'd like to have a model that is the lowest polygon count possible (C) with an accurate texture map to mimic the voxel colours. Is there an existing tool to achieve this? I really like how MagicaVoxel works and I'm not interested in using Blender to model or manually texture the mesh, but maybe there's a plugin for Blender? I'm open to suggestions.

As a side note, it's possible that I could just use the OBJ file as is, but I wonder about performance. Mesh B has 216 polygons, while mesh C uses 140. This is just one asset in a medieval adventure game and I'd like to have a very cluttered world. ;-)

Edit For clarification: MagicaVoxel exports an OBJ file with accurate texture mapping, but isolates different colours of voxels to their own polygons, creating more polygons than are required. Mesh B is the result (I imagine this removes the need for any anisotropic filtering). Mesh C was also exported from MagicaVoxel, but with the colour information removed. Thus, without the desired material information. I just wanted to avoid any confusion with what MagicaVoxel can do on it's own. Maybe there's a solution within MagicaVoxel that I'm not aware of?


Update: I believe Blender can do what I need, but it's going to require a lot more research to get it right. I was able to get a texture map to bake by diffusing colour with some success (some faces got the wrong colour, see the yellow near the bottom of the blade), but I couldn't quite figure out how to do it with vertex colour emissions to see if the result would be better. Then (as you can see in the sword handle) I need to setup up a pixel perfect UV and texture map, prior to baking. I'm kind of leaning away from doing it manually in Blender, to be honest. I may have to do this for a thousand or more models, and every time a model is edited.

blender baking attempt

I'm going to let this question sit for now in the hope that there's an easier solution. Maybe a script exists to do this? Maybe I should learn how to write my own? In the meantime, I can still proceed with the higher polygon counts in the OBJ exports from MagicaVoxel. The neat thing about the native MagicaVoxel OBJ exports is that the texture map is a simple 1px tall by 256px wide palette PNG file (every colour is a single square pixel) that all meshes can share. Everything can use the same texture file. Maybe that offsets the higher polygon count performance hit? Anyway, I'm taking a break from Blender. ;-)

Collision avoidance and perching behaviour for Boids in a Voxel game

I am currently trying to figure out how to efficiently detect collisions in combination with a boid simulation in a 3D Minecraft clone written in java.

For single entities i already implemented a box collider implementation which checks against nearby voxels, but for hundreds to thousands of boids this seems like a huge overhead. As boids tend to stick together i believe there might be a better approach than checking every single boid in the flock if it collides.

I was thinking about precomputing a signed distance field for each voxel. This could then be used by the boids to sample if they need to steer away from any obstacles. (Resulting in more of a collision avoidance).

The issue i am trying to solve is how to implement perching for boids. I would like my boids to land on the ground from time to time. I am not sure if this is even possible using only an SDF.

❌
❌