• 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
huymoi7

Loading a model into OpenGL

8 posts in this topic

I want to take a model from 3DS MAX and load it into an OpenGL project.

 

How can this be done?

 

I just can't find much resources for it but it seems like such a vital part of video games programming. Surely people don't make all their models in the OpenGL code.

 

The only thing I've found is lib3ds, which I can only find one tutorial for.

 

I also found this decade old tutorial on NeHe

 

http://nehe.gamedev.net/tutorial/model_loading/16004/

 

Surely there is a more recent way of doing this?

 

Thanks in advance

0

Share this post


Link to post
Share on other sites

or you can do it yourself if you want

 

find how the vertices and normals and texture coordinates are stored in the file produced when you export the model and use that data to maybe store it in a class or array or any data structure in your code and then use this structure to draw your model when you call glVertex / glNormal / glTexCoord

 

if you decide to do it I'll do what I can to help you through it

 

have fun ^_^

0

Share this post


Link to post
Share on other sites

I recommend looking into Assimp.

 

I second this. You can also use Assimp to build your own engine-specific binary 3d model fileformat outside of the engine through some CLI tool you create, and use this in your engine.

 

If you do this, I can recommend boost::synchronization for file read/write. It is very easy to read/write data structures from/to files with it. 

1

Share this post


Link to post
Share on other sites

It is easy to load a model yourself, but then you have to animate it. that is far from easy, even from a full time professional. Skinning, animation blending, animation tree edition, skeleton retargeting.. it is all very common stuff but yet multi year project.

I don't recommend trying it, just go for Unity.

Using OpenGL directly to do a game is kind of a thing of the past.

-4

Share this post


Link to post
Share on other sites

It is easy to load a model yourself, but then you have to animate it. that is far from easy, even from a full time professional. Skinning, animation blending, animation tree edition, skeleton retargeting.. it is all very common stuff but yet multi year project.

I don't recommend trying it, just go for Unity.

Using OpenGL directly to do a game is kind of a thing of the past.

I don't agree with you that it is a thing of the past it just depends where your interest level is and what you want to create. If you are in the habit of writing an engine and then a game you will hate unity as it is doing everything for you already, on the other hand if you just wish to make a game Unity is a great tool that can help you speed up that process.

 

Most games have their own format they read in and have specialised exporters for the modeling packages to build into that format or have an asset pipeline that compiles the asset into something the game/engine understands. The reasons behind having your own format is that most of the time the modeling packages store data in such a way that all operations are possible but it isn't fast to load this file. A game only cares about displaying the vertex information and maybe deforming this based on the animation system, however this data has to load extremely fast (TCR/TRC on the consoles say something like "you should be done loading within 60 seconds or so at maximum").

 

Modeling package data formats generally store their data as seperate arrays and use index arrays to construct the actual vertex streams to display form that during runtime (read lots of processing), a game however wants a data layout from which you can just instantly grab the stream of vertices and indices and dump them into a vertex/index buffer without any/minimal processing over the data.

2

Share this post


Link to post
Share on other sites

Obj is a pretty easy to load format, good for beginners.  Blender can export to obj by default, I don't know about 3DS Max.  Also IQM seems to get good praise in the ##openGL irc channel.

2

Share this post


Link to post
Share on other sites

Obj is a pretty easy to load format, good for beginners.  Blender can export to obj by default, I don't know about 3DS Max.  Also IQM seems to get good praise in the ##openGL irc channel.

 Beat me to it. And yes Max does export to OBJ. For animation just load a bunch of obj files and play them in order. (Best way for a new person to opengl/model loading)

0

Share this post


Link to post
Share on other sites

Obj is a pretty easy to load format, good for beginners.  Blender can export to obj by default, I don't know about 3DS Max.  Also IQM seems to get good praise in the ##openGL irc channel.

 Beat me to it. And yes Max does export to OBJ. For animation just load a bunch of obj files and play them in order. (Best way for a new person to opengl/model loading)

Becareful with OBJ exporting and make sure it only exports triangular faces, I have seen the max exporter switch between squares and triangles in the same exported file, this is however a couple of years ago so things might have improved.

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