Coder Social home page Coder Social logo

cybersys / voxelized3d Goto Github PK

View Code? Open in Web Editor NEW

This project forked from russoul/voxelized3d

0.0 0.0 0.0 2.88 MB

experimental 3D voxel engine, uses different derivatives of dual contouring algorithm

License: MIT License

GLSL 0.21% C 27.15% D 23.57% CMake 0.13% C++ 44.82% Cuda 4.11%

voxelized3d's Introduction

voxelized3d

experimental 3D voxel engine

REQUIRES NVIDIA VIDEO CARD(will be optional)


INSTALLATION (LINUX + NVIDIA video card)

1)minimum OpenGL version 3.3 is required + libGL.so should be available in your PATH

2)install GLFW3

      on ubuntu/debian it should be as simple as:

      sudo apt-get install libglfw3-dev

      or compile glfw3 from sources

3)CUDA is required (probably will be optional later), PATH also must be properly set

4)lapacke:

      on ubuntu/debian:

      sudo apt-get install liblapacke-dev

      or compile from sources

5)install cmake(probably with GUI for simplicity)

      on ubuntu/debian:

      sudo apt-get install cmake-gui

6)compile cmake project in bindings directory of this project. After that copy outputted libvoxelizedBindings.a to the root of the project

7)install LDC https://dlang.org/download.html, DUB tool should be in your path after installation

8)run export LD_LIBRARY_PATH=. && dub run --build=release


INSTALLATION (Windows + NVIDIA video card)

Not yet tested(won't compile out of the box, needs some changes)

Will add Windows as target platform later


Screenshots

adaptive dual contouring (non manifold yet, produces self-intersecting triangles yet)

adaptive DC with octree simplification, cube in the middle is overly simplified (topology is a bit broken + non manifoldness uncovers itself in extra incorrect triangles below the cube): 1

problem with overly simplified cube can be easy solved by

storing extra information in voxels: can it(voxel) be simplified or not

or better: a distance at which simplification is prefered


same scene but with debug info

green nodes of the octree are voxels that do not contain the surface those are called homogeneous nodes

red nodes contain the surface and are called heterogeneous

both types of nodes mentioned are leaves of the tree

One more type is interior or internal node.

Those are not rendered, they can contain all 3 types of nodes as their child nodes (exactly 8)

2


little yellow boxes represent points in space that form the geometry, only those are present in the output triangulated surface

exactly one point is generated in non manifold DC per heterogeneous voxel

3


a bit more simplification showing

in uniform variant of DC all nodes would be of the same minimal size

that would require more processing power and memory but also the output would more topologically correct

4


UMDC + sphere + noise (radius displacement)

sharp features are finally preserved !

difference

some noise

noise terrain

height map

another height map

sampled on GPU(CUDA), extracted on CPU(uniform DC) cuda1

voxelized3d's People

Contributors

russoul avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.