Posted: Mon Jun 30, 2008 4:19 pm Post subject:
Recovering 3D models from voxels
Subject description: better ideas?
I am trying to recover 3D models from voxels. If it succeed you can put your models made in voxel into 3D games instead remaking them. But the result did not satisfy me.
I wrote a program for the reconvering.
1. Build a model from the voxel, when building ignore the invisible faces.
First a 30x30x30 solid voxel cube is used for testing.
2. It is a high-ploygon model. So it needs mesh simplification or the game will lag.
From higher levels to lower ones, the models' polygon count reduce.
This time the result is acceptable since a cube is simple. The 10% one would be fine with less polygons.
Here is a solid look, it looked the same as the original model.
Now trs.vxl.
This time a extra smoothing step is needed before mesh simplification, so the model will not looked too rough.
Then the simplification is crap.
Generally speaking, you should use the lowest level for a low-ploygon model.
However it have lost too many details & even deformed, with about 1000 triangles.
Anyways, I exported the unsimplifized models to 3dsmax. The renders are not bad
So, finally I have to use 3D textures or layers of textures, with normal maps for lighting. I will try it out later...(not so good as standard 3d models however) QUICK_EDIT
how about giving people the converter and telling them to use Gmax to tweak it? Allowing the engine to accept 3d but giving people freedom. _________________ Yes, work on MV continues. It is not forgotten. QUICK_EDIT
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Tue Jul 01, 2008 1:04 am Post subject:
Can't normals be used for the smoothing as well? I don't know much about Voxels, but I thought they specified the angle of the light reflection or something like that... _________________ QUICK_EDIT
You're never going to get good results out of automatic optimisation, you'll need to do it by hand.
If they're coming out as complicated as that cube did it'd probably be quicker to remake the model using the voxel conversion as a base and building around it.
By all means keep working on this, but you're not going to solve the polycount problem unless you have it make each voxel cube be a perfect cube with 8 polygons in it. _________________ QUICK_EDIT
great work
do you made the simplification algorithm yourself or used a function from a finished library?
If you've done it, maybe it would work better if you add a user definable threshold variable, that is used to define the max difference of the angle between the normals of adjacent polygons. All adjacent polygons with an angle of their normals below this threshold get coalesced.
This way you could prevent the simplification algorithm to combine 2 polygons which have a 90° (or other certain) angle towards each other and which would cause a loss of detail if coalesced. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Posted: Tue Jul 29, 2008 4:57 pm Post subject:
A small update
I dont work on this very often, so the progress is slow. (I must make progess on the engine itself first)
It's not going very well but I finished texture generation as well as the normal map.
Because of some reason, I turned off lighting. The model in the pic is dark.
The texture altas is not good enough. Some room is wasted. texture:
normal map:
IMO the model will eventually lose details because we are trying to reduce the vertices while each vertex holds its normal information. If you simplifize it there will be less light and shade, the color on the model will be the linear interpolated color of the vertices around. Result in a bad look.
So if there is a normal map mapping on it, the lost normals will be back.
Even though each vertex also holds the texture coordinate and there will be less info when the model got simplifized, I think the texture will just get displaced a little in the wrost case(sorry I did't try because there are other probs). Anyway mesh simplification doesn't kill textures at all.
That's why I tried to generate texture first.
@Lt A1br3cht:
Sorry the converter can't work without other project files and the UI is not friently enough for public use right now. I think I'll do this if I get hosted somewhere. So it is Ok to release works then.
This will be opensource.
The engine does use 3d models but doesn't support voxels. That's one reason I am trying to do such conversion.
@Lin Kuei Ominae:
I implemented one myself. And also tried the one in the Direct3DX library.
The one I used to simplifize trs.vxl is mine, shown in the pic in the topic. It have thresholds already. I think both work well.
I think when you are trying to simplifize the model hard(brutely) for a low polygon model, even adjacent polygons which have a 90° will coalesce. Otherwise it still going to be a high polygon one in this case. QUICK_EDIT
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum