• 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.
Sign in to follow this  
Followers 0
RyxiaN

DirectX 11 Custom Model Format

7 posts in this topic

The time has come where I need to import models to my game (or application). Since I'm using DirectX 11 there is no built in support for that and the .X file format is old and stuff, I want to create my own model format. I don't think loading my own custom format would be very hard, but I can't find any help on how to export my models to my custom format. I'm using 3ds Max 2010, and I know you can either create a MAXscript or create a plugin with C++, but C++ isn't my main language. C# is. So that would be pretty hard. Does anybody know any good tutorials or guides on how to create your own plugin for 3ds Max? Havn't found anything myself.

Another solution, that would be much better for me, would be creating a program that reads the native 3ds Max format (.max) and then export it. I could use C# for that. But then the question remains: How do I read the native format? Is there any documentation on how the file format is laid out? Any guides?

Thanks in advance!
0

Share this post


Link to post
Share on other sites
my suggestion for you, would first be to find out how to load a publicly available format, such as obj or md5 (which are both in ascii format so the can be read by humans).

Otherwise, i wrote a small exporting script in 3ds a few months ago, but i had such a hard time using maxscript since there is almost nothing on the web that teaches someone how to use it (i could only find a couple example scripts). I would avoid creating a script, since that would most likely mean learning a whole new language, just so you can export to your format. The best idea would be to make a converter in the language that you DO know. you can export from 3ds into a format that has everything you need, like the obj format, collada (which has everything a 3d modeler could possibly export) or fbx, then write the converter in the language you know (C# is it?) where it loads in the model from 3ds max, reads it, and spits it out into the format you want.

don't read .max format, just read something like collada or obj, depending on what you need. I wrote a little lesson for loading obj files in direct3d 11, and i'm currently doing one on md5, which supports animation, while obj does not. but after you know how to load a format like obj or md5, you could write your own converter to convert them or another format to the format you want.
1

Share this post


Link to post
Share on other sites
Thanks both of you! I'll try to load the OBJ format first and then export it by myself to my custom format. But I will need animations later, so I guess I'll have to move on to MD5 or something later. But iedoc, is your guide for OBJ avaialble anywhere online? Also, any "parts" of the MD5 one available anywhere?

Another question: If I decide to go with the MD5 format, how do I export models from 3ds Max to MD5? 3ds Max doesn't seam to be able to export to MD5.

Thanks in advance!
0

Share this post


Link to post
Share on other sites
[quote name='Hodgman' timestamp='1320300343' post='4880036']
My preferred approach is to create your custom format from an intermediate format, such as Collada, via a conversion tool.

e.g. "[font="Courier New"]*.max[/font]" -> open in 3DS max -> export to Collada -> "[font="Courier New"]*.dae[/font]" -> run conversion tool -> "[font="Courier New"]*.yourEngineModel[/font]"

This way you get the benefits of a custom file format, but also don't have to write plugins for art tools. You can use a library like Assimp to help with the conversion tool.
[/quote]

This is what our engine does, Export DAE/FBX -> Model compiler -> "*.ourmesh and *.ouranim"

And then we can animate meshes with any of our animation tracks that have the correct structure.
0

Share this post


Link to post
Share on other sites
[quote name='RyxiaN' timestamp='1320337585' post='4880173']Another question: If I decide to go with the MD5 format, how do I export models from 3ds Max to MD5? 3ds Max doesn't seam to be able to export to MD5.[/quote]You'd have to [url="http://www.modwiki.net/wiki/MD5_(file_format)#3d_Studio_Max"]find[/url] or write an MD5 exporter. N.B. MD5 is an engine specific format for the Doom3 engine ([i]and IIRC Doom3's art was mostly made in Maya[/i]), so I wouldn't expect to find any official support for it anywhere.
0

Share this post


Link to post
Share on other sites
I'm not saying the obj loading lesson i made is the best way to do it, or the best lesson on the net. I was just saying i did happen to write one, which is here:
[url="http://braynzarsoft.mezoka.com/index.php?p=D3D11OBJMODEL"]http://braynzarsoft.mezoka.com/index.php?p=D3D11OBJMODEL[/url]

also, the file i used to export to md5 from 3ds max is here:
[url="http://www.katsbits.com/tools/"]http://www.katsbits.com/tools/[/url]

about the md5 loading lesson, i still haven't finished it. I'll put it into two parts though, first one to just load the model, the second one to do the animations. When i do happen to finish it though (hopefully in the next week, it will be here:
[url="http://braynzarsoft.mezoka.com/index.php?p=DX11Lessons"]http://braynzarsoft.mezoka.com/index.php?p=DX11Lessons[/url]
0

Share this post


Link to post
Share on other sites
Allright, thanks a bunch guys! I'll take look at your obj loader and I will probably be able to load the md5 format myself once I studied the format a bit. Thanks for the exporter too! (:
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0