Solved

Getting 3Ds Max models into DirectX

Posted on 2012-04-11
3
661 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C Language combined operators 28 106
is twain_32.dll cmpatible with windows 10 ? 10 125
URLs to purchase Othello or Reversi game 3 28
Why isn't object file created? 6 41
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…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

912 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now