Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Voxelization of a model

Recommended Posts

smile.png Well i should create also my own cube implementation to let it usable.

Next step is to create a video with animation.


Or (better) using texture.


I'll see.

Link to post
Share on other sites

Well i used leadwerks cube.. Also my target is just voxelize it (i don't really need to render) as i use it only to create a navmesh.

But i was thinking to implement also a render way and the performance it can (slightly) improved with other code.

Link to post
Share on other sites

Well exactly how this could help me?

I mean i CHOOSE to use leadwerks as in past this community gave me a lot, now i wanna create a commercial game with this engine.

Also my target is a real-time navmesh generator that will be used during the game, so i don't need static data or something else.



Is it possible to have a callback ffrom the engine during the render?

Exactly when triangle are processed..

Link to post
Share on other sites

make a shader , where you can write a position of the pixel in WorldViewProjection into rendertarget. Then, you can read rendertarget and set positions to all your boxes into right position :(


just a theory, lol

Link to post
Share on other sites

Hey this is cool!

Could you make some kind of exporter for it that exports some kind of voxel map of this?

I mean just a binary file with inital height, witdth, depth and then the bits or as bytes(0 and 1 if there is a cube or not) would be enough.

i would love to load this into my blockmap.

Link to post
Share on other sites

@Annixa an exporter is already ready. I'll upload it tomorrow.


@Wh1sp3r a good idea, i could try it. Creating a good voxel render code it will take some time anyway.


@Josh It will be amazing if i could have a callback when the engine renderize triangles. This is really usefull for the real time navmesh. As now my code spent something like 35 millisecs to check 5000 triangles, as i don't have directly access to the render source code i am checking all the triangles..

It will be faster if i will be able to skip this step with a callback.

Link to post
Share on other sites

The engine doesn't ever deal with triangles in the rendering routine. It just tells the GPU which vertex buffer to draw.


In Leadwerks3D, it is possible to replace the rendering module with your own, so you could make a voxel ray-tracer without using my renderer at all.

Link to post
Share on other sites

I fully understand what Joh is saying. I also do this for fun, no more, no less.


Developers can have different goals. Some want to get things done as quickly as possible and care less about how. The main goal is to get things up working as fast a possible with as little effort as possible. I can fully understand the need for such an approach, specially if the output is going to be a commercial game giving some income. In that case, lib's that save time and effort is gold.


Then we have another type of developer like my self. I'm not into this to get an income or hit the world with something spectacular. All this is just for fun, a hobby. Of course I also want to get things done, but in my case I care more about how its done and less about the time it takes to get it done. I guess that Joh may belong to this group of developers as I do.


Both types of developers has their own justification and different methods, and that's a good thing. In my eyes there is no 'better' or 'worse' method of developing using lib's and third-party code. It all depends of what the intent is. So use lib's anytime you like to, or make your own if that's fun, as long as you are enjoying what you do.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Facebook Twitter Youtube Github Steam
  • Create New...