voxelTerrain - marching cubes, transvoxel - demo - vid - src
-
- Halfling
- Posts: 80
- Joined: Wed May 14, 2008 10:44 am
- Location: EU
- x 22
voxelTerrain - marching cubes, transvoxel - demo - vid - src
thread is depricated - checkout http://www.ogre3d.org/forums/viewtopic.php?f=11&t=77978
vid:
[youtube]7xTUvElNTj4[/youtube]
Feedback:
Any feedback would be great.
Have fun
Markus
vid:
[youtube]7xTUvElNTj4[/youtube]
Feedback:
Any feedback would be great.
Have fun
Markus
Last edited by qwertzui11 on Fri Mar 28, 2014 12:38 pm, edited 3 times in total.
-
- OGRE Contributor
- Posts: 1316
- Joined: Tue Nov 21, 2006 11:28 am
- Location: Groningen, The Netherlands
- x 18
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
Very interesting! A number of people have requested that I implement the transvoxel algorithm into my own voxel terrain library (PolyVox). I may do this in the future, but I wonder how well the algorithm works if you want each voxel to have a material as well as a density value. It seems to me that this is a difficult problem to solve as there is no sensible way to determine which materials to use for the lower LODs. Have you considered adding multiple materials at all, or does the transvoxel algorithm provide a way to handle this?
-
- Halfling
- Posts: 80
- Joined: Wed May 14, 2008 10:44 am
- Location: EU
- x 22
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
if u already got multiple materials at ur voxel terrain, there wont be any problems with the transvoxel algo too.
But beside it was quite easy implementing the marching cubes algo, there's a lot of code online to find for marching cubes and dividing it in parts isn't that difficult. For rendering a simple octree is enough.
For Transvoxel there're quite no resources and rendering all the lods got hard work espeacilly because they get calculated totally async and parallel.
Markus
But beside it was quite easy implementing the marching cubes algo, there's a lot of code online to find for marching cubes and dividing it in parts isn't that difficult. For rendering a simple octree is enough.
For Transvoxel there're quite no resources and rendering all the lods got hard work espeacilly because they get calculated totally async and parallel.
Markus
-
- Orc Shaman
- Posts: 788
- Joined: Mon Jan 18, 2010 6:06 pm
- Location: Costa Mesa, California
- x 24
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
This looks awesome, I wanted to try to implement PolyVox for converting an Ogre::TerrainGroup to voxels to allow for editing but I'm failing at it. Do you have any tips on how to accomplish this? Nice work BTW!
-
- Halfling
- Posts: 80
- Joined: Wed May 14, 2008 10:44 am
- Location: EU
- x 22
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
It's not trivial, there'd be a lot of tips ; u should intensly read Eric Lengyel’s Dissertation @ http://www.terathon.com/voxels/
u may wanna study my method part3::calculateTransvoxel(...) in the class part3:
https://github.com/qwertzui11/voxel-Ter ... /part3.cpp
Or u may wanna buy a license of the c4 engine which has an implementation of Transvoxel too; at standard license u get the src too.
https://www.terathon.com/c4engine/order.php
Markus
u may wanna study my method part3::calculateTransvoxel(...) in the class part3:
https://github.com/qwertzui11/voxel-Ter ... /part3.cpp
Or u may wanna buy a license of the c4 engine which has an implementation of Transvoxel too; at standard license u get the src too.
https://www.terathon.com/c4engine/order.php
Markus
-
- Halfling
- Posts: 80
- Joined: Wed May 14, 2008 10:44 am
- Location: EU
- x 22
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
whops u wrote PolyVox, not Transvoxel
I got no idea of the PolyVox lib and its ad- and disadvantages, or usage.
Markus
I got no idea of the PolyVox lib and its ad- and disadvantages, or usage.
Markus
-
- Orc Shaman
- Posts: 788
- Joined: Mon Jan 18, 2010 6:06 pm
- Location: Costa Mesa, California
- x 24
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
Were you going to put the rest of the source code in the repository?
-
- Halfling
- Posts: 80
- Joined: Wed May 14, 2008 10:44 am
- Location: EU
- x 22
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
i could; but it's just the convertion of the vector3 arrays of postions and normals and the array of triangles to a mesh.
call part3::hullVertices(), call part3::hullNormals() and part3::hullTriangles() für the geometry
Markus
call part3::hullVertices(), call part3::hullNormals() and part3::hullTriangles() für the geometry
Markus
-
- Gnoblar
- Posts: 19
- Joined: Fri Sep 09, 2011 11:32 pm
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
Are there some files missing in the repository? You seem to be including some header files that do not exist such as
blub/core/axisAlignedBox.hpp
blub/core/triangle.hpp
blub/core/hashMap.hpp
blub/core/mutex.hpp
blub/core/sharedPointer.hpp
blub/core/axisAlignedBox.hpp
blub/core/triangle.hpp
blub/core/hashMap.hpp
blub/core/mutex.hpp
blub/core/sharedPointer.hpp
-
- Halfling
- Posts: 80
- Joined: Wed May 14, 2008 10:44 am
- Location: EU
- x 22
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
I didn't add them because they are "special". In my Demo hashMap simply derives from QHash (Qt), mutex derives from boost::mutex, axisAlignbedBox derives from Ogre::AxisAlignedBoundingBox.
For Platform-, Renderer- and Engine-Independency I didn't add them. U may wanna replace these Classes with ur own.
However if u just wanna get it running or get stuck at implementation; I'll post the missing core files.
Have fun
markus
For Platform-, Renderer- and Engine-Independency I didn't add them. U may wanna replace these Classes with ur own.
However if u just wanna get it running or get stuck at implementation; I'll post the missing core files.
Have fun
markus
-
- Gnoblar
- Posts: 19
- Joined: Fri Sep 09, 2011 11:32 pm
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
If you could add those files, I would really appreciate it, I'd like to get it working so I can tinker with it.
-
- Halfling
- Posts: 80
- Joined: Wed May 14, 2008 10:44 am
- Location: EU
- x 22
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
i commited and pushed the missing core files. However they are full of dependencies, like Qt, Ogre3d, bullet or boost.
Have fun
Markus
Have fun
Markus
-
- Gnoblar
- Posts: 19
- Joined: Fri Sep 09, 2011 11:32 pm
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
Thanks Markus!
Just a quick question. Was there any particular reason you choose to use the QT containers over the STL containers?
Also, I think you're still missing a few files: line.hpp, plane.hpp
Just a quick question. Was there any particular reason you choose to use the QT containers over the STL containers?
Also, I think you're still missing a few files: line.hpp, plane.hpp
-
- Halfling
- Posts: 80
- Joined: Wed May 14, 2008 10:44 am
- Location: EU
- x 22
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
u r welcome
For Qt there are only historical reasons why I use them. I really should replace them with stl/boost headers However I really like the QString class, everthing else is replaceable and maybe better.
Markus
For Qt there are only historical reasons why I use them. I really should replace them with stl/boost headers However I really like the QString class, everthing else is replaceable and maybe better.
Markus
-
- Orc Shaman
- Posts: 788
- Joined: Mon Jan 18, 2010 6:06 pm
- Location: Costa Mesa, California
- x 24
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
Are you saying the missing files aren't needed? Or are you going to upload them also?
-
- Halfling
- Posts: 80
- Joined: Wed May 14, 2008 10:44 am
- Location: EU
- x 22
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
added them.GavinL wrote:Also, I think you're still missing a few files: line.hpp, plane.hpp
Yes all used core files are now pushed to the repo too.
Have fun
Markus
-
- Gnoblar
- Posts: 4
- Joined: Tue Dec 27, 2011 4:34 am
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
Thanks qwertzui11!
But there are also files missing. Such as
blub/core/file.hpp
blub/core/map.hpp
blub/core/sharedPointer.hpp
blub/graphic/material.hpp
blub/core/quadVector3.hpp
But there are also files missing. Such as
blub/core/file.hpp
blub/core/map.hpp
blub/core/sharedPointer.hpp
blub/graphic/material.hpp
blub/core/quadVector3.hpp
-
- Halfling
- Posts: 80
- Joined: Wed May 14, 2008 10:44 am
- Location: EU
- x 22
-
- Gnoblar
- Posts: 4
- Joined: Tue Dec 27, 2011 4:34 am
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
Alsoqwertzui11 wrote:added too.
Markus
blub/core/quaternion.hpp
blub/core/vector2.hpp
And don't you provide the whole project? You are appreciated.
-
- Halfling
- Posts: 80
- Joined: Wed May 14, 2008 10:44 am
- Location: EU
- x 22
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
added all core, graphic and physic classes. They are quite unclean.
DIDN'T add network, login, dbms, input and sound classes. There shouldn't be any deps to these classes.
Beside in physic is the bullet implementation of physics for the voxelTerrain.
Markus
DIDN'T add network, login, dbms, input and sound classes. There shouldn't be any deps to these classes.
Beside in physic is the bullet implementation of physics for the voxelTerrain.
Markus
-
- Gnoblar
- Posts: 4
- Joined: Tue Dec 27, 2011 4:34 am
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
Only one :qwertzui11 wrote:added all core, graphic and physic classes. They are quite unclean.
DIDN'T add network, login, dbms, input and sound classes. There shouldn't be any deps to these classes.
Beside in physic is the bullet implementation of physics for the voxelTerrain.
Markus
blub/gui/renderWindow.hpp
Thanks!
-
- Halfling
- Posts: 80
- Joined: Wed May 14, 2008 10:44 am
- Location: EU
- x 22
-
- Gnoblar
- Posts: 4
- Joined: Tue Dec 27, 2011 4:34 am
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
what is the entrance of the project? or this project does not execute ? Or it does not generate an application?qwertzui11 wrote:done
-
- Halfling
- Posts: 80
- Joined: Wed May 14, 2008 10:44 am
- Location: EU
- x 22
Re: voxelTerrain - marching cubes, transvoxel - demo - vid -
no it doesn't, as I said it's really "just" the lib for created a iso surface of some voxel data. Let's continue this support via PM
Markus
Markus
-
- Halfling
- Posts: 80
- Joined: Wed May 14, 2008 10:44 am
- Location: EU
- x 22