PDA

View Full Version : Need help with 3D models: recomended formats?



MrUNOwen
10-31-2010, 12:09 PM
Hello,

Does anyone have any recommended formats to use for people using blender (and possibly working with other people using Maya) for 3d modeling? I need a format that supports textures (skins) as well as a skeleton for the model (if it's multiple formats/files I don't mind).

Also is there any recommended algorithms for soft/simple folds between joints?

bcthund
10-31-2010, 05:57 PM
Well I'm not sure about skeleton and joints, but I was recently looking into the formats that Blender can export/import in and I liked "Stanford PLY" for it's simplicity as a raw format. It includes vertex points, texture coordinates, normals, and an index list that identifies how many sides each set has so you can tell triangles from quads. It does not however save the actual texture image, only the UV coordinates.

Here is what the format looks like:
<div class="ubbcode-block"><div class="ubbcode-header">Click to reveal.. <input type="button" class="form-button" value="Show me!" onclick="toggle_spoiler(this, 'Yikes, my eyes!', 'Show me!')" />]<div style="display: none;">
ply
format ascii 1.0
comment Created by Blender3D 249 - www.blender.org (http://www.blender.org), source file:
element vertex 43
property float x
property float y
property float z
property float nx
property float ny
property float nz
property float s
property float t
element face 13
property list uchar uint vertex_indices
end_header
1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000 0.419307 0.523163
1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000 0.419307 0.875904
-1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000 0.066565 0.875904
-1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000 0.066565 0.523163
1.000000 1.000000 -1.000000 1.000000 -0.000000 0.000000 0.419307 0.523163
1.000000 1.000000 1.000000 1.000000 -0.000000 0.000000 0.419307 0.170421
0.999999 -1.000000 1.000000 1.000000 -0.000000 0.000000 0.066565 0.170421
1.000000 -1.000000 -1.000000 1.000000 -0.000000 0.000000 0.066565 0.523163
1.000000 -1.000000 -1.000000 -0.000000 -1.000000 0.000000 0.419307 0.523163
0.999999 -1.000000 1.000000 -0.000000 -1.000000 0.000000 0.419307 0.170421
-1.000001 -0.999999 1.000000 -0.000000 -1.000000 0.000000 0.066565 0.170421
-1.000000 -1.000000 -1.000000 -0.000000 -1.000000 0.000000 0.066565 0.523163
-1.000000 -1.000000 -1.000000 -1.000000 0.000000 -0.000000 0.419307 0.523163
-1.000001 -0.999999 1.000000 -1.000000 0.000000 -0.000000 0.419307 0.170421
-1.000000 1.000000 1.000000 -1.000000 0.000000 -0.000000 0.772048 0.170421
-1.000000 1.000000 -1.000000 -1.000000 0.000000 -0.000000 0.772048 0.523163
1.000000 1.000000 1.000000 0.000000 1.000000 0.000000 0.419307 0.523163
1.000000 1.000000 -1.000000 0.000000 1.000000 0.000000 0.419307 0.875904
-1.000000 1.000000 -1.000000 0.000000 1.000000 0.000000 0.066565 0.875904
-1.000000 1.000000 1.000000 0.000000 1.000000 0.000000 0.066565 0.523163
0.000000 1.000000 1.000000 -0.000000 0.000000 1.000000 0.595677 0.523163
-1.000000 1.000000 1.000000 -0.000000 0.000000 1.000000 0.419307 0.523163
-1.000000 0.000001 1.000000 -0.000000 0.000000 1.000000 0.419307 0.699534
-1.000000 0.000001 1.000000 -0.615474 0.615474 0.492325 0.772048 0.523163
-0.000000 0.000000 2.250138 -0.615474 0.615474 0.492325 0.948419 0.302675
0.000000 1.000000 1.000000 -0.615474 0.615474 0.492325 0.948419 0.523163
1.000000 -0.000000 1.000000 0.615474 -0.615474 0.492325 0.772048 0.523163
-0.000000 0.000000 2.250138 0.615474 -0.615474 0.492325 0.595677 0.302675
-0.000001 -1.000000 1.000000 0.615474 -0.615474 0.492325 0.595677 0.523163
1.000000 -0.000000 1.000000 0.000000 -0.000000 1.000000 0.772048 0.346792
-0.000001 -1.000000 1.000000 0.000000 -0.000000 1.000000 0.595677 0.523163
0.999999 -1.000000 1.000000 0.000000 -0.000000 1.000000 0.772048 0.523163
-1.000000 0.000001 1.000000 0.000000 -0.000000 1.000000 0.772048 0.346792
-1.000001 -0.999999 1.000000 0.000000 -0.000000 1.000000 0.772048 0.523163
-0.000001 -1.000000 1.000000 0.000000 -0.000000 1.000000 0.948419 0.523163
-0.000001 -1.000000 1.000000 -0.615474 -0.615474 0.492325 0.419307 0.523163
-0.000000 0.000000 2.250138 -0.615474 -0.615474 0.492325 0.595677 0.302675
-1.000000 0.000001 1.000000 -0.615474 -0.615474 0.492325 0.595677 0.523163
0.000000 1.000000 1.000000 0.615474 0.615474 0.492325 0.419307 0.523163
-0.000000 0.000000 2.250138 0.615474 0.615474 0.492325 0.242936 0.302675
1.000000 -0.000000 1.000000 0.615474 0.615474 0.492325 0.242936 0.523163
1.000000 1.000000 1.000000 0.000000 0.000000 1.000000 0.772048 0.170421
0.000000 1.000000 1.000000 0.000000 0.000000 1.000000 0.595677 0.170421
4 0 1 2 3
4 4 5 6 7
4 8 9 10 11
4 12 13 14 15
4 16 17 18 19
3 20 21 22
3 23 24 25
3 26 27 28
3 29 30 31
3 32 33 34
3 35 36 37
3 38 39 40
3 29 41 42
[/QUOTE]</div>

Godlike
11-01-2010, 04:28 AM
Practically you need: vert positions, triangles, texture coords, vertex weights and the skeleton. You can achieve "soft folds" around joints using vertex weights (If I understand correctly what you mean). I dont think its a good idea to bake any actual textures inside the model format. Its a material property and not a geometry.

Collada is a nice format that supports everything you need but Im not sure about the skeleton part.

Another idea is the model format Doom 3 uses. Its supports all that but its not expandable.

For my engine I have build a custom format for meshes and a separate for the skeleton. I use blender scripts to export the blender models and skeletons to my own format. I dont know if thats a good idea but I have the complete control over the format.

Its your choice

ZbuffeR
11-01-2010, 05:42 AM
Collada does skeletal animation :
http://www.gamedev.net/community/forums/topic.asp?topic_id=562776&amp;whichpage=1

MrUNOwen
11-02-2010, 11:04 AM
I use blender scripts to export the blender models and skeletons to my own format

I think I'll go that way ^_^. Any good (quick to learn) tutorials on doing that?

Also any good open gl tutorials on producing soft weighted folds? Does blender have weighted vertex for creating such folds?

nickels
11-03-2010, 09:46 AM
I use blender scripts to export the blender models and skeletons to my own format

++1
Sharing code is overated :cool: . Roll your own!!! As the joker would say, "I like to add a little chaos to the world...." :)

A good way to learn about writing export scripts for blender is to grab something like this .x exporter (http://directpython.sourceforge.net/exportx.html) script and run.