PDA

View Full Version : How to create my own 3D files.



qiaobu
23-11-2009, 05:36 AM
Hi all
I want to know how I create my own 3D files, 3D files that should contain what data? I read somebooks through this a few days, learned that it should include vertices, lines, polygons, that enough? Another question, I put these data into the database or store as files, which is better? why?

ths all.

User137
23-11-2009, 06:45 AM
If you make it database you can't open it with anything else than your own loader, is possibly larger and slower to open.

On current day modellers use all same programs like 3DS Max or Lightwave etc. That defines what file formats programmers need to use, and it's not a bad thing really, lots of thought have put into their design.

I went using my own text format but also OBJ and little bit Milkshape3D is supported. Most people use 3DS, MD2 or MD3 format but you can expect to study a bit to learn them.

Lines? There is no such thing in 3D model. Vertices, polygons, texture coordinates, normals, possibly color materials, animation frames and bones.

NecroDOME
23-11-2009, 08:13 AM
You can look at the .obj spec. Could provide a lot of information about what date to store: http://www.royriggs.com/obj.html

qiaobu
23-11-2009, 08:53 AM
Very grateful to User137,NecroDOME.

qiaobu
26-11-2009, 02:19 PM
Hi
User137 I use 3DMax export an architectural model to obj file , I found that the obj file is too big.
I want create a virtual reality program, and if so, the model file will occupy considerable disk space.

User137
26-11-2009, 03:07 PM
I don't have experience in such advanced stuff, but it sounds like you might need a different approach. If object is too big for file then it is more than likely too big for video memory aswell - too slow to render if its at all possible to open.

I would think no game uses a single model for terrain or full buildings. Instead self made editors which combine shapes and many objects.

OBJ is big because it is text inside. 3DS and many others are binary but if you like the challenge (and isn't hard) you can make converter that reads OBJ and saves it again in binary format. Floating point numbers will each fit in 4 bytes instead of for example "900.512334" string that is separated by line change too.

qiaobu
26-11-2009, 03:24 PM
thank you very mach. :) :) :)