Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [voxels]

VOlumetric piXEL (volumetric picture element). A way to store volume data as a regular grid of values. This tag should be used on questions relating to voxels.

Filter by
Sorted by
Tagged with
0 votes
0 answers
42 views

Discretised Physics in Voxel Space

In most physics-based voxel games (like Teardown), there is usually an object-space voxel grid for each object, but no corresponding world-space grid. This means that a voxelized object can be ...
0 votes
0 answers
46 views

Multithreading Chunkbuilding - Thread.Start() acts as it is on the main thread

I'm building a game from scratch using OpenTK, in C#. It is in its base form a mesh-based voxel engine. I have a decent startup on the chunk building algorithm, multiple blocks, block data, etc, but ...
1 vote
0 answers
26 views

What would be a good way to interface a voxel octree to commit multiple changes at once?

I am creating a voxel game that uses octrees for storage. The implementation details are not super relevant, but the entire octree is ordered and contiguous in memory and each branch can be merged and ...
0 votes
1 answer
42 views

How can I convert .obj files into a 2D array of [x,y,z] coordinates and color values?

I have a cool 3D model I want to use, but for this program I'm working with, I need it in array form, with each point's coordinates and color value. I've already voxelized the model using this tool, ...
3 votes
3 answers
3k views

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 ...
1 vote
1 answer
2k views

Unity block chunk generation pattern

I am trying to do something like Minecraft game in Unity. Currently I am trying to generate a chunk of blocks, given dimensions. I can successfully create a chunk of N x 0 x 0 sized chunk, but due to ...
1 vote
2 answers
1k views

Voxel terrain vs AABB collision detection

I am trying to implement collision detection in a voxel game. Currently I check the side of the collision by finding the closest side and checking whether there isn't a solid block next to that side. ...
0 votes
1 answer
134 views

Minecraft-like simulation optimization

I am working on a voxel game similar to Minecraft. The goal would be to handle more entities but also offer a more immersive experience by the fact that the player does not need to worry about loading ...
0 votes
0 answers
70 views

How to import 3d texture in Unity?

How can I import a 3d texture the easisest way and visualize it somehow ( for example as a voxelized thing but other way can be also good)? I tried to download a 3d texture form different sites like ...
4 votes
1 answer
863 views

Intersection of thick line with a grid

There is a popular paper, and numerous examples, on how to efficiently perform collision detection for a line with a grid. However, I'm drawing up blanks on how to do the same thing but with a line ...
0 votes
1 answer
171 views

How can I handle voxels that require extra data in my octree?

I am using octrees as an efficient way to store voxel data in a voxel game. The details of my octree implementation can be found here, but in a nutshell, each node is 16 bits, and the most significant ...
1 vote
0 answers
97 views

Voxel Point Cloud Transformation (Rotation & Translation)

I have a method that transforms a point cloud and aligns it with its gameObject.transform. My method works well, but i have to rotate the cloud, and then I have to use an approach (taking from 2d ...
0 votes
0 answers
84 views

Group voxels into object?

I'm working on Voxel editing software, and I need to have the ability to group voxels into objects. As for simple editing, I'm using the following data structure: Chunk - represents a fixed 3d grid ...
25 votes
6 answers
18k views

Cast ray to select block in voxel game

I am developing a game with a Minecraft-like terrain made out of blocks. Since basic rendering and chunk loading is done now, I want to implement block selecting. Therefore I need to find out what ...
0 votes
0 answers
1k views

How to make voxel terrain mesh

I've been trying to make a procedurally generated "pixelated" (semi voxel) terrain (using Unity), as seen in Sebastian Lague's video on simulating ecosystems. (Image attached) I've tried ...
0 votes
3 answers
3k views

How to make a Minecraft like world round?

I'm interested in making a Minecraft-like voxel world that's spherical. Idea is that there is a sphere which consists of cubes like in Minecraft but they are on the surface of it. The player can go ...
0 votes
0 answers
63 views

Why does this voxel engine crash after a few seconds?

I'm trying this voxel engine in Python. It runs ok, but it crashes after a few seconds. Does anyone know what is happening? ...
2 votes
1 answer
573 views

How can I implement semi-transparent/semi-opaque voxels in a voxel game?

I am creating a voxel game with OpenGL, and I would like to implement water. My voxel world is divided into chunks of 16x256x16 cubes (or voxels). Each chunk has its own VAO with two VBOs, the first ...
10 votes
2 answers
1k views

How to determine if a 3D voxel-based room is sealed, efficiently

I've been having some issues with efficiently determining if large rooms are sealed in a voxel-based 3D rooms. I'm at a point where I have tried my hardest to solve the problem without asking for help,...
0 votes
1 answer
341 views

How to pass voxel data to shader?

I am working on a voxel game, and I approached the point where I need to add day/night in my world. Apparently, I should just be able to pass the torch and sunlight values into my shader and multiply ...
0 votes
0 answers
86 views

Can voxel engines use functional programming efficiently?

My voxel engine will do a lot of threading. If I used locks, There would be too much contention, Because they all need to access the chunks. I decided to implement my threaded section using Functional ...
0 votes
0 answers
147 views

LWJGL removing voxel faces that are not visible

I am simply trying to achieve removing voxel faces that are not visible.What I have coded simply renders a chunk of 16x16x16. I already have back face culling enabled, which it does work. so as I'm ...
4 votes
1 answer
4k views

How does this example make efficient voxel engines using "chunks"?

I'm currently looking in to how voxel engines works, with a view to possibly making one, myself. I see a lot of material, like "Let's Make a Voxel Engine", which talks about how to go about reducing ...
3 votes
1 answer
394 views

Isometric ordering issue with moving entities taller than one block

I'm having a lot of trouble sorting it in such a way that it works with a moving entity that is "taller" than a "block" size in this map. I've recorded my problem here: https://www....
-1 votes
1 answer
294 views

Using perlin noise as a procedural voxel heightmap without a texture atlas in Unity

I was creating a heightmap for my procedural voxel world in Unity using 2D perlin noise. I don't want to use anything from a texture atlas, a brown Unity material is good enough for me. The issue is ...
1 vote
1 answer
459 views

Updating chunk borders when generating new chunks

I am making an infinite voxel terrain that generates around the player. The blue boxes are the chunks that are currently loaded and the white ones are unloaded. When building the mesh for a chunk I ...
0 votes
0 answers
319 views

Pathfinding on the surface with Marching cubes

I'm making a game where the world is made of 3D density field of Voxels. And I use Marching Cubes to create a mesh using the Voxels. It needs to be fast because You can modify terrain a lot.
2 votes
1 answer
537 views

Transformed Pretransformed coordinates?

I am creating a minecraft like terrain engine thing in XNA and C#, and I am trying to create a item/block selector tool. The thing is I would like to have 3D objects on the tool. So I thought for the ...
0 votes
1 answer
273 views

Seams between tiled cube unity

Hello i'm generating voxel map but seams are appearing between tile ONLY in camera mode, in the editor everything work fine. Here in the editor camera: Here the player camera: So i guess it has ...
0 votes
1 answer
175 views

How to send SDF equation to GPU shader?

I am working on a sandbox app that model stuff using SDF and its operators. I want to do the actual rendering on GPU. So once the SDF is defined (ex. box union with sphere, etc.) how do I push it to ...
0 votes
0 answers
132 views

How to Pass Multiple VBOs to OpenGL for a voxel game

I'm trying to make a voxel engine (NOT based on an octree model). Currently I have a setup with a Chunk class, which stores the following: ...
0 votes
1 answer
157 views

What if 3D model voxels/polygons where limited like pixels?

First, let me clarify that I don't understand much about programming, neither about 3D modelling. And I couldn't think or find a better place to ask this, but I hope I don't make too many mistaken ...
1 vote
1 answer
1k views

Setting vertex colors for a marching cubes mesh

I am making a voxel based terrain system (Yes, I know, very original...), anyway... Each voxel should have it's own color so the player can distinguish which type of material it is. For example: dirt ...
1 vote
1 answer
379 views

How do I "voxelize" an OBJ mesh that was created in a voxel editor?

I've been trying to find the right workflow to solve my problem for over a month now. Any tip/insight would be greatly appreciated. Scenario: I create a voxel mesh in MagicaVoxel and then, instead of ...
1 vote
0 answers
232 views

How to use transvoxel cell cache with octree structure?

I have been implementing Transvoxel in to my Marching Cubes project in c++. The Transvoxel documentation and available code examples feature cell vertex reuse (caching) via indices. The main benefits ...
1 vote
0 answers
598 views

What voxel rendering technique is used in Build engine games and how can I replicate that in another engine such as Unity or Godot?

Most information on voxel rendering is focused on heightmaps, but with my current understanding I dont see how one could achieve details like holes using a heightmap. In the below photo: details such ...
0 votes
0 answers
108 views

Changing block shape to blend with adjacent blocks

I am in the process of programming a Minecraft like game in Unity. I am currently implementing the block mechanics. My goal is that when a block is placed, it has an effect on its neighboring blocks ...
5 votes
3 answers
4k views

How do I find voxels along a ray?

I am making a voxel engine, and I want to make it possible to create and destroy voxels with the mouse. I use C++ and OpenGL, so C++ examples would be best. So far, I have the camera position and ...
9 votes
2 answers
6k views

Can someone explain dual contouring?

I've been trying to understand voxel rendering and have been looking at dual contouring (DC). So far I understand this much: Run a density function for a set of grid points (i.e noise function) Find ...
2 votes
2 answers
453 views

what is the fastest way to choose new positions for chunks

I'm having trouble speeding up where I initialise positions for reused / pooled chunks. I found that where I calculate the positions of neighbor chunks, it's even slower than the algorithm I was using,...
41 votes
5 answers
26k views

What are some good resources for building a voxel engine? [closed]

What are some good resources (tutorials, code, papers, etc.) for learning about voxel rendering?
0 votes
0 answers
666 views

How to calculate ray unit grid intersections?

P is ray origin, D direction. How do I calculate tx, ty(s)? This is for octree raycast. The primary goal is to get 1st intersection voxel (v) then second (v") and so on.
55 votes
3 answers
55k views

How are voxel terrain engines made?

A few days ago I found something called voxel terrains and I think that they're pretty cool. But I don't know anything generating them. Do you model it in your modeling software or use something like ...
0 votes
0 answers
93 views

Get direction vector of camera in voxel game

I am currently working on a Minecraft clone (a voxel game). The feature I'm working on is the ability to break blocks. I have a ray-casting/ray tracing algorithm for traversing the voxels, but the ...
0 votes
2 answers
567 views

Cubic Voxel Game, Calculate What Chunks are in the Player's View, using 3D chunks?

I need to calculate what chunks are in the player's view, meaning I need the 3D positions (the bottom, back, left corner in world space) of each chunk that is in the player's view. I'm not worried ...
0 votes
2 answers
695 views

How to get normals from volume density grid?

I am meshing my volume density data with marching cubes. The density data is a flat array and it's elements contain a) distance from surface, b) a normal (xyz). However this normal is for the density ...
1 vote
1 answer
731 views

Rendering voxel data efficiently

With Metal, I need to pass in an array of primitives to the GPU to be rendered. I'm making a terrain-based voxel game like Minecraft, but I have a problem. foring ...
0 votes
3 answers
548 views

Voxel raycasting algorithm not working correctly

I am using Unity with a compute shader to render to a texture. So far I have been checking points along the rays in units of 1 just for testing, so I know it works. Now I am simply trying to write a ...
0 votes
0 answers
263 views

Octree LOD without traversing the entire tree

I am working on a voxel engine that uses a huge Hashed Linear Octree that reconfigures when you move. Each octree leaf is a voxel. The world is procedurally generated using 2D Perlin noise. The octree ...
0 votes
0 answers
430 views

Benefit of storing chunks as Octree leafs vs single block as Octree leaf

I saw many voxel game developers opt for a strategy that involves using an octree whose leaf nodes include a 16x16x16 (or 32^3 or 64^3) chunk instead of having leafs represent a single voxel. What is ...

1
2 3 4 5
7