Jump to content

Voxelization of a model


Joh
 Share

Recommended Posts

Here my first code for voxelization, my target is create a navmesh and those code work quite good, but could be better.

Anyway i was testing it and i like the result! :)

post-702-0-81970400-1339486557_thumb.jpg

post-702-0-71598600-1339486570_thumb.jpg

post-702-0-26513500-1339486578_thumb.jpg

  • Upvote 2

Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10.

Link to comment
Share on other sites

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.

Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10.

Link to comment
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.

Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10.

Link to comment
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.

 

@Josh

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

Exactly when triangle are processed..

Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10.

Link to comment
Share on other sites

I don't understand what you mean by triangles being processed. There are draw entity callbacks, but you can't override them with something else.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
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.

Whuts wroong?

Link to comment
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.

Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10.

Link to comment
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.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

@Benton i used library many times, if you need to do a project you have limited amount of time.

But this is not my case, i do this for fun!

  • Upvote 1

Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10.

Link to comment
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.

  • Upvote 3

Roland Strålberg
Website: https://rstralberg.com

Link to comment
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.

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

 Share

×
×
  • Create New...