Solved

Getting 3Ds Max models into DirectX

Posted on 2012-04-11
3
675 Views
Last Modified: 2012-08-13
I have bunches of models that I have made for 3D Game, I am trying to get those models in DirectX, I am using C++.

I want a way that will not allow the end users to modify or replace the model, I think if I used .x files the end user might be able to replace the models and result that his own models appear in the game!

What is the way that's used in commercial games to get 3Ds Max models in DirectX?
0
Comment
Question by:Mohamed Abowarda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
satsumo earned 500 total points
ID: 37837009
Commercial games typically use a proprietary model format and load from that.  The models, textures, sound and other resources are typically stored in a large archive file of some kind.  Often the file is compressed and encrypted to prevent people taking the data.  ID Software are curious because their games are easy to get data from.  The newer games use zip archives (you can open them in any zip utility) and textures are stored as common PNG or DDS files.

In this case the easiest way to do this is to make the .X files into resources, so that they are compiled into the executable.  DirectX has functions for loading .X files from resources, and a program can load any format of data from resources.  Done this way there is only one file to distribute and its not so easy for people to replace the models.

Some people would be able to extract the models from you executable, you can load an exe into Developer Studio and examine the resources.  It's still enough to stop the great majority of people.  If you want to go further you can design your own model format, or look into encryption.  However, you soon reach the point where the effort out weighs the benefit.
0
 
LVL 12

Author Comment

by:Mohamed Abowarda
ID: 37837502
Hi satsumo,

Can you please post a code to load .X file into DX9?

I tried to use D3DXLoadMeshFromX() however I am not sure how to use it, also if you can post a full code that will allow loading .x files I would appreciate it.

Thanks,
0
 
LVL 12

Author Closing Comment

by:Mohamed Abowarda
ID: 37863839
I found out how to load .x file in DirectX.

Thanks,
0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question