Solved

Getting 3Ds Max models into DirectX

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
As we all know Counter Strike is a very popular computer game. Usually it is played over a network for which people create a server and users join it but it is interesting to know that one can creates a dedicated server which not only hosts the game…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

757 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

13 Experts available now in Live!

Get 1:1 Help Now