Jiwon Kim

Voxelygon - Polyhedron Voxel

Recommended Posts

Jiwon Kim    0

Hello, I`m ji-won, Kim in Korea. ;)

I`m developing polyhedron voxel middleware for Unity.


What`s mean polyhedron vexel? See below.


This middleware based on block combination. And, these blocks have various shape. So the combination of these blocks make terrain like low-poly.

Below video is result of these combination.



Like other voxel engines, CAN destroy rrain and generate terrain. Of course, can apply to Unity based physics effects like anti gravition and explosion.


These video recorded on i3-4160 CPU with GTX 650 system. FPS range is 45~60 over while destroying and refresh.

Support multi-threading for refreshing chunks.


future works

- pathfinding based on various size units.

- huge units and partial destroying.

- crafting system and support json.



If you're interested, send me a mail. lagnas2000@gmail.com or lagnas2000@naver.com

Edited by Jiwon Kim

Share this post

Link to post
Share on other sites
Scouting Ninja    3972
On 8/30/2017 at 5:47 PM, Jiwon Kim said:

Support multi-threading for refreshing chunks.

Is this your own multi-threading or using Unity's Coroutines?

I ask because I notice Unity has problems running simultaneous routines, chances are that with a destructive terrain I would also like destructive objects and that would need the coroutines to do smoothly.

Share this post

Link to post
Share on other sites
Jiwon Kim    0


10 hours ago, swiftcoder said:

That looks pretty nice, the beveled edges break up the block structure nicely. Can it handle caves?

Of couse can handle caves. Voxelygon have block based BD structure.

To make caves, insert VACANT block as your wish. Below show like that.



Below blocks like pile shape consits of 4 blocks, and 3 vacant block, and 3 cubic blocks.


Share this post

Link to post
Share on other sites
Jiwon Kim    0
3 hours ago, Scouting Ninja said:

Is this your own multi-threading or using Unity's Coroutines?

I ask because I notice Unity has problems running simultaneous routines, chances are that with a destructive terrain I would also like destructive objects and that would need the coroutines to do smoothly.

Yes, my own multi-threading method.

Unity support only 2 thread process, (main thread and rendering thread). Then Unity API is processed on main thread.


Voxelygon support multi-threading partially. Based on Unity, so using Unity API codes does NOT multi-threading. But my own codes support multi-threading(ex : refreshing chunk, pathfinding).


But, Unity Collider does NOT support multi-threading, so update mesh collider applied to chunks does NOT support multi-threading.


On test, refreshing 32x32 sized chunks spent 10~12 ms. To update mesh spents 7ms(NOT multi-threading), to update inner data 1ms (multi-threading), to update rendering process 2 ms(multi-threading).

Edited by Jiwon Kim

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By noodleBowl
      I've gotten to part in my DirectX 11 project where I need to pass the MVP matrices to my vertex shader. And I'm a little lost when it comes to the use of the constant buffer with the vertex shader
      I understand I need to set up the constant buffer just like any other buffer:
      1. Create a buffer description with the D3D11_BIND_CONSTANT_BUFFER flag 2. Map my matrix data into the constant buffer 3. Use VSSetConstantBuffers to actually use the buffer But I get lost at the VertexShader part, how does my vertex shader know to use this constant buffer when we get to the shader side of things
      In the example I'm following I see they have this as their vertex shader, but I don't understand how the shader knows to use the MatrixBuffer cbuffer. They just use the members directly. What if there was multiple cbuffer declarations like the Microsoft documentation says you could have?
      //Inside vertex shader cbuffer MatrixBuffer { matrix worldMatrix; matrix viewMatrix; matrix projectionMatrix; }; struct VertexInputType { float4 position : POSITION; float4 color : COLOR; }; struct PixelInputType { float4 position : SV_POSITION; float4 color : COLOR; }; PixelInputType ColorVertexShader(VertexInputType input) { PixelInputType output; // Change the position vector to be 4 units for proper matrix calculations. input.position.w = 1.0f; // Calculate the position of the vertex against the world, view, and projection matrices. output.position = mul(input.position, worldMatrix); output.position = mul(output.position, viewMatrix); output.position = mul(output.position, projectionMatrix); // Store the input color for the pixel shader to use. output.color = input.color; return output; }  
    • By MarcusAseth
      I start by saying that I am aware that what I am trying to do can easily be achieved trough the <functional> part of the library or trough a Functor or a Lambda, but I wanted to see this in template form.(Code below)
      So the first function works, the find_if algorithm find the first value in a vector greater than the specified parameter, but there is no template argument deduction for that function call because the algorithm require a pointer to a function but at that time it is not know I will pass an int into it, and so I need to specify like this:
      LargerThan_NoDeduction<30,int> But this seems ugly because now I have to take care of match the two, like <31.2, double>, and the worst part is that if I now decide to pass something else, like a <'d',char> or a <-10,float> , the function expects a size_t as first template parameter, so this won't do.
      So what I wanted to achieve was to pass a predicate to an algorithm in the form of
      LargerThan(30) where the template part of it takes care both of storing the data value (in this case 30, but could be a 'c') and deducing the type we compare from out of it, so in this case int.
      So I have a function LargerThan(Type) that returns a function pointer and passes down the value to an helper function which takes both the value and the deduced type, so I don't have to type them myself.
      Problem is, this helper function still has an auto in the first template parameter, and the compiler doesn't like this
      How would you make this work trough template magics?
      #include <iostream> #include <vector> #include <algorithm> using namespace std; //// template<size_t TestCase,typename Type> bool LargerThan_NoDeduction(Type value) { return value > TestCase; } //// template<typename Type> auto LargerThan(Type TestCase)-> bool(*)(Type) { return LargerThan_helper<TestCase, Type>; } template<auto TestCase, typename Type> //auto here is not liked!!! bool LargerThan_helper(Type value) { return value > TestCase; } //// int main() { vector<int> vec{ 0,11,21,35,67,102 }; //Must specify size and type. auto p = find_if(vec.begin(), vec.end(), LargerThan_NoDeduction<30,int>);//WORKS if (p != vec.end()) { cout << *p << endl; }//WORKS //Deduces type from the value passed. p = find_if(vec.begin(), vec.end(), LargerThan(30));//ERROR if (p != vec.end()) { cout << *p << endl; }//ERROR return 0; }  
    • By markshaw001
      hi i am new to opengl can someone here tell me how to render this 2d shape i want to make curve or arc in 2d in between two lines its a rough sketch i made i tried the internet but could not find much help beacuse their were no specific tutorials of making arcs or curves

    • By GAFO
      Hello Community,
      I wanted to seperate drawings - different "IDirect3DDevice9Ex"  Devices for different purposes.
      The problem I have is that Device A is drawing the background and if I add Device B for drawing simple geometricts or even a simple line.. the background turns black but the line is drawn. So I dont really know how to configure device B that it only overwrite the pixels at e.g. destination of the line and not all pixels of device A.
      So what are the correct settings to archive the mentioned goal ?  (D3DPRESENT_PARAMETERS, Present/Clear)
    • By MarcusAseth
      I think I am having the problem mentioned in the title, but I can't be sure of it as well...
      Got 3 classes, GameMode, Entity, Paddle. 
      Paddle Inherit from Entity, and both Paddle and Entity need to #include "GameMode.h" in order to pass down the constructor a GameMode* and store it inside of every Entity.
      I pretty much forward declared everything inside everything else but stuff just won't compile, the error I am getting is C2504 "Entity: base class undefined" .
      I'll paste below the .h and .cpp for the Entity class, and only .h for the other two. Can someone tell me what am I doing wrong?
      #pragma once #include "SDL2\SDL.h" #include "GameMode.h" #include "Utility.h" using namespace util; class GameMode; enum class PivotMode: Uint8 {CENTER,TOP_LEFT}; class Entity { protected://variables float XCenter; float YCenter; SDL_Rect CollisionBox; SDL_Texture* Sprite; GameMode* Game; SDL_Renderer* Renderer; public://constructors Entity(GameMode* gameRef, PivotMode inputMode, int x, int y, std::string path); virtual ~Entity(); Entity(const Entity&) = delete; Entity& operator=(const Entity&) = delete; Entity(Entity&&) = delete; Entity& operator=(Entity&&) = delete; public://methods virtual void Update(float deltaTime) = 0; virtual void Draw(float interpolation) = 0; private://methods SDL_Texture* RequestTexture(std::string path)const; void SetCollisionBox(int x, int y, PivotMode InputMode); }; Entity.cpp
      #include "Entity.h" Entity::Entity(GameMode* gameRef, PivotMode inputMode, int x, int y, std::string path) :Game{ gameRef }, XCenter{ static_cast<float>(x) }, YCenter{ static_cast<float>(y) } { if (Game) { Renderer = Game->GetRenderer(); } Sprite = RequestTexture(path); if (Sprite) { SetCollisionBox(x, y, inputMode); } } Entity::~Entity() { } SDL_Texture* Entity::RequestTexture(std::string path)const { if (Game->IsRunning()) { return Game->RequestTexture(path); } return nullptr; } void Entity::SetCollisionBox(int x, int y, PivotMode InputMode) { SDL_QueryTexture(Sprite, nullptr, nullptr, &CollisionBox.w, &CollisionBox.h); switch (InputMode) { case PivotMode::CENTER: { CollisionBox.x = x - CollisionBox.w / 2; CollisionBox.y = y - CollisionBox.h / 2; XCenter = static_cast<float>(x); YCenter = static_cast<float>(y); }break; case PivotMode::TOP_LEFT: { CollisionBox.x = x; CollisionBox.y = y; XCenter = static_cast<float>(x) + CollisionBox.w / 2; YCenter = static_cast<float>(y) + CollisionBox.h / 2; }break; } } Paddle.h
      #pragma once #include "Entity.h" #include "GameMode.h" class GameMode; enum class PivotMode:Uint8; class Paddle : public Entity { public://methods Paddle(GameMode* gameRef, PivotMode inputMode, int x, int y, std::string path); ~Paddle(); virtual void Update(float deltaTime); virtual void Draw(float interpolation); }; GameMode.h
      #pragma once #include "SDL2\SDL.h" #include <string> #include <vector> #include <memory> #include "App.h" #include "Entity.h" #include "Paddle.h" class Entity; class Paddle; class GameMode { friend class App; private://variables bool Running; SDL_Window* Window; SDL_Renderer* Renderer; App* AppRef; public://constructors GameMode(SDL_Window* Window, SDL_Renderer* Renderer, App* App); ~GameMode(); GameMode(const GameMode&) = delete; GameMode& operator=(const GameMode&) = delete; GameMode(GameMode&&) = delete; GameMode& operator=(GameMode&&) = delete; public://methods SDL_Texture* RequestTexture(std::string path)const; bool IsRunning()const; SDL_Renderer* GetRenderer()const; private://methods void Update(float deltaTime); void Draw(float interpolation); };  
  • Popular Now