voxel

3D voxel Display in matlab

纵然是瞬间 提交于 2019-12-19 07:35:13
问题 I have a grid, it is 3D and it stores a number. Here is an example of my grid if it is 2*2*2: (:, :, 1) -> [0, 0; 0, 0] (:, :, 2) -> [0, 0; 0, 0] The number 0 would usually be a number that I would like to represent with colour or nan if no voxel exists there. What i would like to do is display a voxel grid with matlab like in the following picture: Except that the vocels should be coloured with the number in the cell. Does anyone know how to do this, if there is a library or some way to

Basic Dual Contouring Theory

扶醉桌前 提交于 2019-12-17 17:36:07
问题 I've been searching on google, but cannot find anything basic. In it's most basic form, how is dual contouring (for a voxel terrain) implememted? I know what it does, and why, but cannot understand how to do it. JS or C# (preferably) is good.Has anyone used Dual contouring before and can explain it briefly? 回答1: Ok. So I got bored tonight and decided to give implementing dual contouring myself a shot. Like I said in the comments, all the relevant material is in section 2 of the following

Repeat UV for multiple cubes in one vertex buffer object (VBO)?

柔情痞子 提交于 2019-12-11 23:24:33
问题 I am making a little voxel engine using a chunk system (like in Minecraft). I decided to make 1 VBO per chunk, so the VBO contain multiple cubes that will use different textures. I actually have the UV of a cube and i would like to use it on all cubes in a VBO so the texture will wrap all cubes the same way if the cubes were in separated VBOs. Here is what I'm actually getting: How to tell OpenGL to do the same thing as the first cube on all cubes? EDIT: here are my shaders: vertex shader

Under which conditions can I leave out the perspective division?

↘锁芯ラ 提交于 2019-12-11 09:37:51
问题 I want to revert a homogeneous transformation after performing a perspective division. To be more specific, I’m implementing a GPU-based voxelization algorithm using conservative rasterization. For an overview, these are the steps I’ve implemented so far (VS=vertex shader, GS=geometry shader): Apply the model transform to the vertices (VS). Apply an orthographic projection transform to a copy of each vertex (GS). Apply a view transform to the copies (GS). Perform a perspective division on the

SVO Rendering: OpenGL or Custom renderer?

北城以北 提交于 2019-12-11 05:26:11
问题 I am planning on creating a Sparce Voxel Octree (SVO) Engine and am caught between using openGL to render each little cube or write my own renderer in assembly and c. If I was going to do the latter, I am unsure on how to draw pixels to the screen (I'm on a Mac, 10.8). What graphics context/windowing system would be the preferred method for this (not X, I have my shares of issues with X on my Mac). P.S. the engine will need to be able to draw a minimum of 50.000 cubes (I will use opencl/cuda

Binarize image data

北慕城南 提交于 2019-12-11 01:47:36
问题 I have 10 greyscale brain MRI scans from BrainWeb. They are stored as a 4d numpy array, brains , with shape (10, 181, 217, 181) . Each of the 10 brains is made up of 181 slices along the z-plane (going through the top of the head to the neck) where each slice is 181 pixels by 217 pixels in the x (ear to ear) and y (eyes to back of head) planes respectively. All of the brains are type dtype('float64') . The maximum pixel intensity across all brains is ~1328 and the minimum is ~0 . For example,

How to efficiently cluster voxel space into the fewest number of similar, contiguous blocks possible?

安稳与你 提交于 2019-12-07 08:44:42
问题 I am doing some research into how feasible it is to use voxels to represent largish (256x256x256 voxels) battlegrounds with destructible terrain for server-hosted multiplayer games. Only one battleground will exist for any game at a time. However, to be able to broadcast rooms and changes to their terrain, I am trying to find an algorithm that can group the voxels into the fewest rectangular blocks as possible. As a simplistic example, if the bottom half of the level was completely filled

How to smooth the blocks of a 3D voxel world?

痞子三分冷 提交于 2019-12-06 21:18:27
问题 In my (Minecraft-like) 3D voxel world, I want to smooth the shapes for more natural visuals. Let's look at this example in 2D first. Left is how the world looks without any smoothing. The terrain data is binary and each voxel is rendered as a unit size cube. In the center you can see a naive circular smoothing. It only takes the four directly adjacent blocks into account. It is still not very natural looking. Moreover, I'd like to have flat 45-degree slopes emerge. On the right you can see a

How to efficiently cluster voxel space into the fewest number of similar, contiguous blocks possible?

送分小仙女□ 提交于 2019-12-05 17:49:11
I am doing some research into how feasible it is to use voxels to represent largish (256x256x256 voxels) battlegrounds with destructible terrain for server-hosted multiplayer games. Only one battleground will exist for any game at a time. However, to be able to broadcast rooms and changes to their terrain, I am trying to find an algorithm that can group the voxels into the fewest rectangular blocks as possible. As a simplistic example, if the bottom half of the level was completely filled with voxels of one type and the top half with voxels of another type, the level should be divided into two

Best way to save data for re-use off an voxel editor

北城余情 提交于 2019-12-05 03:38:56
问题 i'm planning on building a voxel editor (c++ and opengl) for personal use and i want to re-use the objects i build in later projects. The problem i came along is, i'm not sure whats the best way to save voxel data to files. I googled many sites and came across 'save as octree' and 'save as BSP tree' which one is better in your opinion and why? Thanks in advance. 回答1: I would use Field3D, it's used by the biggest and best in the CG industry to store voxel data for fluidics simulations. All