Code Monkey home page Code Monkey logo

vengi-voxel / vengi Goto Github PK

View Code? Open in Web Editor NEW
1.0K 36.0 85.0 192.69 MB

free and open source voxel art tools - editor, thumbnailer and format converter

Home Page: http://vengi-voxel.github.io/vengi/

License: Other

CMake 0.97% GLSL 0.03% Lua 0.08% Python 0.16% C++ 46.73% Objective-C 1.86% C 49.72% Makefile 0.09% M4 0.06% Shell 0.03% Perl 0.07% JavaScript 0.06% Metal 0.01% Roff 0.04% Assembly 0.08% HTML 0.01%
voxel procedural-algorithms voxel-editor magicavoxel minecraft qubicle ace-of-spades

vengi's Introduction

Total downloads Discord server Mastodon License: MIT Youtube

The mission: Create a free, open-source and multi-platform voxel editor and command line tools with animation support to support artists and developers.

Join our discord server and get help or support the development with feature request or bug reports.

Download your copy here from github and find documentation about how to use it here.

There is an online version of voxedit available to test the editor without having to install it. But this is not the most recent version.

image showing minecraft greenfield

image showing oasis

Support

If you encounter a bug or have a feature request, please let me know (via discord or ticket on github).

Please consider donating to help to continue the work on this project. See the sponsor button.

Supporters and sponsors

  • KUVARS LLC & ARIVA DIGITAL PTE. LTD

SAST Tools

PVS-Studio - static analyzer for C, C++, C#, and Java code.

vengi's People

Contributors

anthraxx avatar artemis918 avatar huetterma avatar mailaender avatar mgerhardy avatar misode avatar trsh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vengi's Issues

VOXFORMAT: layers and objects are not handled properly

i created 8 objects and put each 2 of them into 1 layer but the convertor does not count the layers. it counts the objects. and if my objects go pass the 8 layers (or technically 7 because it starts from 0) it wont work.

layers-objects

VOXELFORMAT: add Land of Sand support (*.lsv)

//    First line is format identifier
Land of Sand voxel model
//    Second line describes the model
(model width) (model length) (model height) (number of voxels in model) (number of filled cells on plain) (number of columns in model)

//    Next follows a block of columns data. Each line describes one column. Only non-empty voxels are described.
col (col X coordinate)  (col Y coordinate) (col lowest voxel height) (number of voxels in col) data (voxel height)  (voxel colour) (voxel horizontal normal)  (voxel vertical normal)

//    Next follows description of singular voxels, not belonging to any column. Each line describes one voxel
vox (X coordinate) (Y coordinate) (Z coordinate) (voxel colour)  (voxel horizontal normal)  (voxel vertical normal)

//    col, data and vox are service words 
//    Colour is Graphics::TColor object
In lines every value/service word is separated with one space symbol
___
This is my hastily invented voxel model format.
It's most important distinction from Qubicle text format is that model is presented and sorted on a per column basis.
In my rendering engine models are rendered in columns and it's important to know column height to reserve enough storage for it.

Voxel model is presented as a plain and a one long column, dynamically divided into subcolumns.
The cells of the plain contain either a singular voxel, or a link to column of voxels, stored as part of long column.

Code of function saving model to format:

//        Title string used to identify format
    out << "Land of Sand voxel model" << endl;
    out << modelWidth << " " << modelLength << " " << modelHeight << " " << voxelCount << " " << basePointsCount << " " << colCount << endl;

//                                    Writing model columns 

    for (i = 0; i < colCount; i++)
    {
        height = columns[i].height;
        firstVoxel = columns[i].firstVoxel;
        out << "col " << columns[i].x << " " << columns[i].y << " " << columns[i].height << " " << columns[i].voxelNumber << " " << "data ";
        
        for (j = firstVoxel; j < firstVoxel+height; j++)
        if (modelColumn[j].horNormal >= 0)        //    if not empty
        {
            out << j-firstVoxel << " " << modelColumn[j].сolour << " " << modelColumn[j].horNormal << " " << modelColumn[j].vertNormal << " ";
        };
        out << endl;
    };    
//                                        Writing singular voxels, not belonging to any column

    for (i = 0; i < modelWidth; i++)
    for (j = 0; j < modelLength; j++)
    if (modelBase[i][j].height >= 0)        //    if not empty
        if (modelBase[i][j].colIndex < 0)        // if singular voxel
        {
            out << "vox " << i << " " << j << " " << modelBase[i][j].height << " " << modelBase[i][j].voxColour;
            out << " " << modelBase[i][j].horNormal << " " << modelBase[i][j].vertNormal << endl;
        };

NETWORK: fix noise differences on client/server

The plan was to somehow compute the noise on the server and the client to prevent sending the chunks over the wire (to reduce traffic) - but it turns out, that the noise generation should/must be float based and thus we can't ensure that the same results would get generated on each client. Therefore we should send the (at least RLE encoded) chunks to all the clients. Regarding their viewdistance + threshold the client should receive and cache all the chunks. The client should send a chunk request message (that should later get a limit of allowed calls per client per timespan) to the server and the server should send the compressed chunks - this could theoretically also get implemented via http GET for the given seed in order to reduce computation and traffic on the server.

VOXELFORMAT: obj export misses a few faces

Bildschirmfoto von 2020-09-16 23-03-51

This is the rgb.vox converted to obj and imported into blender. The screenshots shows the volume edge voxel at 31, 0, 31. You can see that there are at least 4 faces missing here.

RCON: convert to imgui

Currently the RCON is based on QT - it should be converted to imgui and use the default application system as all other tools, too.

ALL: automated UI test

Event based

Needed

a) ability to record and save the events (WindowedApp::onRunning())
b) ability to play back recorded events
c) custom event to handle screenshots (just to automatically validate the proper ui state or to present screenshots in case of an error)

Criterias

  • The system should be guarded with a preprocessor define
  • The events must be stored compressed
  • The applications have two new command line arguments - one for save events to file, and one for play back events from file.

imgui test framework

VOXCONVERT: warnings in console about object/layers

idk if this is a bug or not.. but in the console i guess you can just ignore sending this message or just send 1. because when it reaches the amount of layers in the object i dont think it needs to check other layers too.
warnings-mv

Standalone shadertool

Hello @mgerhardy,

I'm interested in the shadertool you wrote about in your blog post. It looks really useful as way to have the compiler help with the work of maintaining shaders. I notice there are some dependencies to internal code; are there too many dependencies to make it worthwhile splitting this into a standalone tool?

Greets,

Ben

NOISETOOL: convert to imgui

Getting rid of turbobadger dependency would be nice - this is also a quite easy ui and should be easily convertible.

Let's talk about rendering a massive set of cubes efficiently...

Thread from https://twitter.com/SebAaltonen/status/1315982782439591938

EkNPKfyXcAAxL0T
[quote]
Geometry shaders and instanced draw are unoptimal choices. Geometry shader outputs strips (unoptimal topology) and it needs GPU storage and load balancing. Instanced draw is suboptimal on many older GPUs for small 8 vertex / 12 triangle instances.
The most efficient way to render a big amount of procedural cubes on most GPUs is the following: At startup you fill an index buffer with max amount of cubes. 326 = 36 indices each (index data = 0..7 + i8). Never modify this index buffer at runtime.
No vertex buffer. You use SV_VertexId in the shader. Divide it by 8 (bit shift) to get cube index (to fetch cube position from an array). The low 3 bits are XYZ bits (see OP image). LocalVertexPos = float3(X
2-1, Y2-1, Z2-1). This is just a few ALU in the vertex shader.
Use indirect draw call to control the drawn cube count from GPU side. Write the (visible) cube data (position or transform matrix, or whatever you need) to an array (UAV). This is indexed in the vertex shader (SRV).
There's an additional optimization: Only 3 faces of a cube can be visible at once. Instead generate only 323=18 indices per cube (positive corner). Calculate vec from cube center to camera. Extract XYZ signs. Flip XYZ of the output vertices accordingly...
If you flip odd number of vertex coordinates, the triangle winding will get flipped. Thus you need to fix it (read triangle lookup using "2-i") if you have 1 or 3 flips. This is just a few extra ALU too. Result = you are rendering 6 faces per cube, thus saving 50% triangle count.
The index buffer is still fully static even with this optimization. It's best to keep the index numbering 0..7 (8) per cube even with this optimization to be able to use bit shift instead of integer divide (which is slow). GPU's do index dedup. Extra "slot" doesn't cost anything,
[/quote]

UI: support directory bookmarks in the file dialogs

The file dialogs should get the ability to store bookmarks and maybe even to show the default folders of the OS (like Downloads, Pictures, ...)

The custom bookmarks should just be stored as a Cvar (see core/Var.h, or in-game-console command cvarlist) that is separated with ;

VOXELRENDER: view_distance increase crashes

module voxelrender
in WorldRenderer.cpp

WorldRenderer::WorldRenderer(const voxelworld::WorldMgrPtr& world) :
                _octree(math::AABB<int>(), 5), _world(world) {
        setViewDistance(240.0f);
}

if increase setViewDistance to 500 or above / engine crashed

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.