• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

jerry2

What's the default object file format

12 posts in this topic

As we all know,direct3d uses the *.x as the default object calling format.But what''s the default object calling format for OpenGl? And what graphical format is better for 3d programming? tga,bmp,jpg or ? jerry2
0

Share this post


Link to post
Share on other sites
A/ there is none. also u will actually find most commerical games in d3d dont use the x format.
B/ ultimatly it makes no difference opengl will see them all the same anyways.
so choice is based on loading times + other factors

im talking about standard formats here
bmp - bad ( no alpha or compression ) good ( simple format )
tga - bad ( no compression ) good ( simple + does alpha )
jpg - bad ( no alpha ) good ( compression though loosy + quite hard to load unless u use a library )
png - bad ( ) good ( loseless compression but difficult to read unless u use a library )
0

Share this post


Link to post
Share on other sites
For 3D formats, I know:

QuakeII (*.md2): simple, fast loading, fast drawing, simple animation, but not hierarchy, no material, single texture

QuakeIII (*.md3): a bit more complex but with hierarchy and multiple textures -> simply the best

3DS: very hard to use, but include everything you want

X: simple with directX, but very complex with OpenGL, nice but slower drawing and loading than md3
0

Share this post


Link to post
Share on other sites
TGA files can be compressed, it is part of the Targa format spec''s. IIRC it uses a RLE (Run Length Encoding) compression for the images, it''s not as good as PNG for compression, but the format is easier to understand than PNG and it''s easier to read!


When I find my code in tons of trouble,
Friends and colleages come to me,
Speaking words of wisdom:
"Write in C."
0

Share this post


Link to post
Share on other sites
quote:

QuakeIII (*.md3): a bit more complex but with hierarchy and multiple textures -> simply the best



I really don''t know why certain people always fly on this Q3 format, simply because it''s Q3 and from Carmack doesn''t mean it''s good.
MD3 is a format that has been developed for the Q3 engine, and it''s surely good for it. But it might be total crap for your engine, if your basic design is different. It is definitely NOT a multipurpose format. There is no such multipurpose format in the 3D world anyways, except *.3DS perhaps, but it has some severe limitations (max. 65535 faces per object, buggy hierarchies...)

There are only two possibilities:
1) if you are just playing around with OpenGL, no real 3D engine design yet, then use an ASCII format, such as OBJ or ASE. It''s slow to parse but simple and you can even edit it by hand.
2) If you have a real engine: use your own format, optimized for your engine structure. This is the only way to go, you will have every data you need, it can be expanded as your engine grows and it''ll be ways faster to load.

- JL
0

Share this post


Link to post
Share on other sites
John Carmak is not my gourou, but *.md3 is just good for me.

My first 3D app was a *.md2 viewer, so I think it is not very complex compared to ASCII format parsing.
0

Share this post


Link to post
Share on other sites
Well, it''s OK if md3 suits your needs. But it shouldn''t be used as a multiple purpose format, because it is none. It''s not about simplicity either, it''s just as simple to write an md3 loader as an ase loader.

But: ASE and especially OBJ are accepted standards, they are directly supported by all major 3D modelling packages, and they contain a lot more information than md3 files.

If a beginner starts with an md3 type fileformat, then he might miss very interesting information other, really multiple purpose, standards would give him. Eg. a lot of people (even advanced) still don''t know what the W-coordinate (not the homogeneous, the texture mapping one: UVW) is, and how it is used. Game 3d formats don''t contain such data, because the game doesn''t need it, but this does not mean, that it doesn''t exist.

Another very important point to start with an ASCII format: you can look at it and modify it with a simple editor. This is extremly usefull, eg. "hmm, there''s a bug in my normal transformation code, what would happen, if I just modified this single normal value to (1,0,0)... ?" That''s a lot harder with binary formats.


0

Share this post


Link to post
Share on other sites
Ok anonymous master, you''re right, excuse me for giving my opinion!

PS: I''ve see that opengl can handle 4 textures coordinates, can you explain what is the goal of the two last?
0

Share this post


Link to post
Share on other sites
i know people always make a module to read several 3d file format,commonly don''t use the X files.
and now i know the 3ds and tga format r the suitable ones to use for 3d programming,is that true?

jerry2
0

Share this post


Link to post
Share on other sites
bobatefrei:

> Ok anonymous master, you''re right, excuse me for giving my opinion!

hmmm... I just pointed out the advantages of an ASCII format for a beginner, where is your problem ? If you want to use md3, it''s fine for you !

> PS: I''ve see that opengl can handle 4 textures coordinates, can you explain what is the goal of the two last?

OpenGL texcoords are s,t,r and q. s and t are the normal u and v type mapping coordinates you use every day. r is simply used for 3d volume textures, not interesting for now, but will be in the future, when hardware gets more powerful.
The q coordinate is very interesting, it''s the homogeneous coordinate of a texture ''vector'', what the w coordinate is for normal homogeneous vectors. You can use it (by means of the OpenGL texture matrix) for special projections of texture coordinates, such as multiple perspective projections, used for projective textures, light effects and other cool effects.
0

Share this post


Link to post
Share on other sites
Im a beginner :o)

i created my own simple ASCII format that I can understand, just contains a few simple command that i can parse into a compiled display list, does the job nicely and i can add features to this format as needed.

One thing you guys might be able to help with is howto protect a file format from user modification. I was thinking about using some kind of "broken" compression?
0

Share this post


Link to post
Share on other sites
quote:

One thing you guys might be able to help with is howto protect a file format from user modification. I was thinking about using some kind of "broken" compression?



Just use a crc algorithm, that computes a checksum of your file. You can use compression or even encryption prior to the CRC check, so that it gets even more difficult to alter the file. With the nice side effect of a reduced filesize. Esp. ASCII formats compress very well.
0

Share this post


Link to post
Share on other sites
for all fileformats except images + sound ild go with an ascii (readable version) i wish i originally had done so it would of cut weeks (no exageration) off my development time. its an very easy task to convert them to some binary format just before release
0

Share this post


Link to post
Share on other sites