Giter Club home page Giter Club logo

universal_voxel_model's Introduction

Universal_Voxel_Model

English| 简体中文

Anisotropic general algorithms design cover storage and generation schemes for arbitrary voxel models.

The voxel model definition here refers to two things, one is the literal Voxel Model, and the other is the world layout data structure of Unreal World.

A unit voxel object is not necessarily cubes, but can also be a traditional model which composed of triangular faces.

🎯Target

The current main development tasks are in terms of traditional voxel models:

  1. Committed to realizing the promotion as a Universal Voxel Model File Format, compatible with any modeling software and game development, such as 3dmax, Blender, Unreal Engine, Minecraft Structure and so on.

  2. Different algorithm models can be transformed into each other or used at the same time.

🎨Design

Below I use specific examples to show the working logic of algorithms which have been designed.

six_vector_model

Matrix Structure Model

graph TB
A["Header declares unit voxel objects corresponding to different values in matrix"] --> B["Set up a reference system of structure"] --> C["The voxel layout of the planar section is analyzed layer by layer along the vertical axis of the 3D as a matrix"] 
Loading
  1. Header declares unit voxel objects corresponding to different values in matrix

    0 = NULL \\NULL is occupied and cannot be declared, which means that there is no voxel in the corresponding position of the matrix.
    1 = red
    2 = purple
    3 = bule
    4 = cyan
    5 = green
    
  2. Set up a reference system of structure

    x - z - y \\Take the x-axis as the horizontal axis of the plane, the y-axis as the vertical axis of the plane, and the z-axis as the vertical axis of the 3D.
    
  3. The voxel layout of the planar section is analyzed layer by layer along the vertical axis of the 3D as a matrix

    1 = [0 0 0;
         0 2 0;
         0 0 0]
    2 = [0 1 0;
    	 1 3 3;
    	 0 4 0]
    3 = [0 0 0;
    	 0 5 0;
    	 0 0 0]
    

The advantage is that it is easy to perform 3D transformation of the voxel model.

Object Coordinate Model

graph TB
A["Header declares voxel objects"] --> B["Set up a coordinate reference system"] --> C["Parse its coordinate position gather set one by one in the order of unit voxel object which have been declared before"] 
Loading
{
    "objects":{
        "red":red, //Just express the data structure in json format, but not json, where red without quotes is an object instead of a string.
		"purple":purple,
        "bule":bule,
        "cyan":cyan,
        "green":green
    },
    "":["x", "z", "y"], //Set up a coordinate reference system, located at the polar corners. Take the x-axis as the horizontal axis of the plane, the y-axis as the vertical axis of the plane, and the z-axis as the vertical axis of the 3D, and the coordinates of the origin are (1, 1, 1). 0 is occupied, used to abolish the coordinate point.
    "models":{ //More complex algorithm date structure design can be used to pursue faster parsing and storage of coordinates gather.
        "red":[[1,2,1],[2,2,3]],
        "purple":[[2,1,2]],
        "bule":[[2,2,2],[3,2,2]],
        "cyan":[[2,2,1]],
        "green":[2,3,2]
    }
}

The advantage is the intuitive query of very huge structures coordinate gather.

Origin Growth Model

graph TB
A["Header declared unit voxel objects corresponding to different values in tree veins"] --> B["Set up a vector reference system"] --> C["Simultaneously branch and grow in all directions from the initial tree origin"]
Loading
  1. Header declared unit voxel objects corresponding to different values in tree veins

    0 = NULL \\NULL is occupied, cannot be declared, and represents the branch of a unitless voxel object.
    1 = red
    2 = purple
    3 = bule
    4 = cyan
    5 = green
    
  2. Set up a vector reference system

     x - z - y \\Take the x-axis as the front and rear positive direction, the y-axis as the left-right positive direction, and the z-axis as the up-down positive direction.
    
  3. Simultaneously branch and grow in all directions from the initial tree origin

    Symbol Mean
    F Forward
    B Backward
    L Left
    R Right
    A Above
    U Under

    Growth condition one

    tree_growth_model_timing_diagram_1

    {
        5:{
            F:3
            B:1
            L:1
            R:4
            A:5
            U:2
        }
    }
    

    Growth condition two

    tree_growth_model_timing_diagram_2

    {
    	1:{
    		F:5:{
    			 F:3
            	 L:1
            	 R:4
            	 A:5
            	 U:2
    		}
    	}
    }
    

    The advantage is that multi-threaded branches are performed concurrently during generation.

universal_voxel_model's People

Contributors

leoweyr avatar

Stargazers

 avatar

Watchers

 avatar  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.