Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Sat Apr 20, 2024 12:17 am
All times are UTC + 0
Recovering 3D models from voxels
Moderators: Community Tools Developpers
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
YuriX
Medic


Joined: 14 Jan 2006

PostPosted: Mon Jun 30, 2008 4:19 pm    Post subject:  Recovering 3D models from voxels
Subject description: better ideas?
Reply with quote  Mark this post and the followings unread

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

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 #Tongue









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)

Back to top
View user's profile Send private message Skype Account
Lt Albrecht
Defense Minister


Joined: 25 Jul 2007
Location: Hampshire, England. Creating RA2: Moscow's vengeance

PostPosted: Mon Jun 30, 2008 9:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Mon Jun 30, 2008 9:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Cool down, man. He is still researching it. It's not finished and so far it is looking neat.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Tue Jul 01, 2008 1:04 am    Post subject: Reply with quote  Mark this post and the followings unread

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

_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
Daz
Energy Commando


Joined: 26 Apr 2003

PostPosted: Tue Jul 01, 2008 10:19 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

_________________

Back to top
View user's profile Send private message Visit poster's website
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Jul 01, 2008 12:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
YuriX
Medic


Joined: 14 Jan 2006

PostPosted: Tue Jul 29, 2008 4:57 pm    Post subject: A small update Reply with quote  Mark this post and the followings unread

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


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.

Back to top
View user's profile Send private message Skype Account
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Tue Jul 29, 2008 5:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

This is interesting, and im gonna follow this. Could be a good tool for moving engines. Good job, keep it up Smile

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
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


Powered by phpBB © phpBB Group

[ Time: 0.1551s ][ Queries: 11 (0.0078s) ][ Debug on ]