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

Can somebody here help me with DirectX?

22 posts in this topic

Hi, thanks for clicking. It would mean a lot to me if somebody could test something for me.

I have a model and I will put an address down to download the file(100% virus-free and scanned, so don't worry). It is a model saved in a .x file extension. If you have DirectX9 or some other third party files, could you do a bare bones test compilation of code with this file in it to see if it loads?

My computer is messed up and won't support DirectX Development libraries, so that's why I am wondering if anyone can show a picture/snapshot of the model and see if it is formatted in the correct texture, geometry data, not corrupt in any other way, etc.

You can use any simple copy/paste sample .x file loading codes, etc. I just really need to see, and would be utterly pleased if anyone here can attempt to load the attached .x file and show a picture if it compiles correctly, etc.

Thank you!

Here is the link to the file: [url="http://www.2shared.com/file/uzltd4Qa/rhinoqueef.html"]http://www.2shared.c...rhinoqueef.html[/url]

EDIT: VERY SORRY for posting twice! It was an accident.
0

Share this post


Link to post
Share on other sites
Hi,
you didn't upload textures, don't forget that the .x format doesn't include texture data, the images have to be in separate files.

There are few possible errors in the model (no idea whether it is intentional or really an error):
- The box is "missing" one edge - the one above the F letter. There is a hole in the model.
- The cylinder isn't really a cylinder (if it was supposed to be a cylinder). There's only 1/4 of the outer surface and no bottom/top caps.

http://imageshack.us/photo/my-images/339/rhinoqueef.jpg/
0

Share this post


Link to post
Share on other sites
Hi, Tom. Thanks for being kind enough to compile the code and upload a photo of it within a window.

However, you didn't do it raw I noticed. There appears to be some settings enabled in that window you showed displaying text and buttons on the bottom.

I find that you used some special settings to enable additional displays within the window. I just expected to see the window with the model file loaded inside of it. You must have used some extra code or some third-party controls to load additional displays inside the display.

Are you coding raw through the DX API and the OS bare bones, compiling through a command-line interface program from your OS, or using some other DirectX interface/API programs for programming? I usually code directly with Direct3D and the operating system. However .... still ... yeah.

I am not sure why the box is missing one corner of its face, but all in all thanks.

However, a re-post of the window without additional settings would have been appreciated better(I prefer to know that you directly uploaded the file itself and didn't take this process through additional and unknown procedures to display it through some tweaking or code/interface changes).
0

Share this post


Link to post
Share on other sites
Tom used DirectX Viewer, which is a tool in the DX SDK. It is included therein for the specific need of verifying model files.

Internally, the tool uses very standard programming practices, and uses the native D3D interfaces for rendering. It also uses the Effect framework (for which the source is available), and if no effect is found to go with the loaded file, it basically sets a sensible default state for the device so that you can see the mesh with lighting and can manipulate its orientation, position and scale with the mouse.

Had he used custom code for this, the results would (statistically speaking) vary even more from the "reference" state. In addition, since the model does not define camera position nor lighting, at least [i]some [/i]extra code is needed in addition to the .x loader.
2

Share this post


Link to post
Share on other sites
Hi again, Tom and Nik02.

I should have made this clear earlier. I expected my code to be compiled and run through a basic DX window.
0

Share this post


Link to post
Share on other sites
I still don't understand what do you want.
Do you want to see a code to load and display an x model?
Or do you want to see how the particular x model looks and whether it is fine, with no errors?

If the later, then I already provided a picture. That's how the model looks, writing the code myself would make no difference. The model file includes definition of vertices (position, color, normal, texture coordinates etc.), indices and "subsets". There really aren't multiple different ways how to interpret and display the data. What may differ is lighting, because the model doesn't define lights or shaders (effects). But what exactly do you mean by "raw"? There is no "standard" way how to light a model. And I can say that the way DirectX Viewer rendered it is kinda very "basic".
0

Share this post


Link to post
Share on other sites
The SDK tutorial 6 (D3D9) shows how to load an .x file in general. The DX Viewer uses almost the exact same approach to loading the file.

The D3DX Mesh is little more than a container class for a vertex buffer, an index buffer and a few other utility data structures. It does contain convenient methods for rendering and optimization as well.

Note that the .x format is relatively complex to parse manually without using the D3DX mesh functionality. There are more "raw" interfaces available in d3dx9xof.h or dxfile.h headers (which still require d3dx9.lib for implementation) - using those, you can manually enumerate through the file sections and load just what you need. I believe none of the samples nowadays use the loader cores directly, though.
0

Share this post


Link to post
Share on other sites
Hi again, Nik02 and Tom KQT.

By "raw" I am referring to loading the model file without DirectX's mesh system, and through a DirectX interface directly.

I expected to see a snapshot within the window of a basic DX utility window system, not the DX Viewer. Because you are using the DX Viewer, and all through my programming of DX I have never used the "Viewer", I am uncertain if you did or did not render the .x file's geometry or statistics in a separate mesh class or container.

This is what I mean, and I really would recommend leaving it as this. I don't want to get too in to specifics here, but if you are willing, could you show the same model file loaded again, but not in the DX Viewer utility?

Thanks in advance. You certainly don't have to, and your kindness to do it in general was fulfilling enough.

- Mikey
0

Share this post


Link to post
Share on other sites
Loading a .x file with the d3dxof functions is not trivial. Essentially, the file has several sections that have data structured according to "templates" identified by GUIDs. The loader would enumerate through all sections and parse sections of interest (such as vertex data section) according to the template type.

The default template types are documented in the SDK. The most important ones for this case (loading static geometry) have names starting with Mesh*. The individual templates tend to be simple but can form potentially complex hierarchies. Add to that, .x files can be either binary, text or compressed text. And that for robust file handling, you have to understand custom templates too.

Because of this complexity, most real-world developers either:
1: use D3DX Mesh for prototyping or simple demo/poc or
2: write their own custom (often simpler than .x) mesh format and corresponding container + serializer to gain flexibility and precisely solve their needs or
3: use a simpler public format to begin with, and write a custom loader.

I used to write an (incomplete) "raw" .x loader some ten years ago just for fun, but I believe that it has been eaten by the sands of time (or something). Writing a new one would require considerable amount of effort, and would not be very useful to most people anyway.
1

Share this post


Link to post
Share on other sites
Also note that while the .x format is relatively difficult to parse due to its generic nature, there is nothing "magical" about it. The data ends up in vertex and index buffers when you load it to the D3D device in any case. The D3D core itself does not care how the data was produced; mesh files have absolutely no significance to the device. The D3DX mesh is a convenient helper over the templated file formats so you don't have to write a loader or a geometry container yourself in case you want to do simple mesh rendering.
0

Share this post


Link to post
Share on other sites
[quote name='Nik02' timestamp='1333369630' post='4927454']
Also note that while the .x format is relatively difficult to parse due to its generic nature, there is nothing "magical" about it. The data ends up in vertex and index buffers when you load it to the D3D device in any case. The D3D core itself does not care how the data was produced; mesh files have absolutely no significance to the device. The D3DX mesh is a convenient helper over the templated file formats so you don't have to write a loader or a geometry container yourself in case you want to do simple mesh rendering.
[/quote]
Exectly. I really wonder what differences does MLillowitz expect. It's not really about loading the mesh but about rendering it. That's where the results may differ.

And even if I did write my own code to parse the x file and create corresponding vertex and index buffers, with absolutely no use of the mesh interface, how would you know that the result is correct, that the result is better and more "accurate" than what D3DXMesh (and thus DirectX Viewer) gives?

X format is DirectX native format so I suppos the developers of DirectX know best how to load it. I personaly 100 % belive the D3DXMesh interface. So, what you see on my screenshot is how the model is supposed to look like. If my custom x-file loader (if I had one) created something different, I would be quite sure that it's me who made a mistake in the code.
That's my opinion.
1

Share this post


Link to post
Share on other sites
Hi, Tom KQT.

To put this as blunt as possible, I wanted you to [b][i]NOT [/i][/b]use the DX Viewer utility for obvious reasons I mentioned before.

For more info, please view by blogs if you are confused.

[b]Thank you.[/b]

20+ years of programming experience.

- Mikey
-3

Share this post


Link to post
Share on other sites
Hi again, jbadams.

My version of Windows 7 Pro has all DirectX runtime libraries corrupted and has necessary OS GUI deficits in prominent .sys files.

I can't run any video files either. Somebody purposely corrupted the files on my system through hacking and malice.

Also, if you wish to see my blogs you'll have to wait until I get hosting on my site. I told you I can give the site, yes, to bookmark, but the site won't be up for a while until I finish paying for hosting and other services.

The site will be here: [url="http://www.mlillowitz.com/"]http://www.mlillowitz.com/[/url]

And I'm sorry if you don't understand my points. When my blogs are up and site maybe you'll understand. I'll just wait until I can save up enough to get my new iMac. :)

20+ years of programming experience.

- Mikey
-4

Share this post


Link to post
Share on other sites
The obvious thing to do would be to make backups of your personal files, and reinstall the OS. Windows install is relatively painless nowadays, but reinstalling your tool software can take some time (depending on software, of course). After that, turn on automatic updates, check that your firewall is active, download Microsoft Security Essentials (or some other malware detector), establish a backup plan and keep software such as Adobe Flash and Reader up to date as well.

If your OS is corrupted to the point where it will not even run, take out the hard drive and connect it to an another computer via a SATA-USB adapter cable (can be purchased for less than $30). You can then find your personal files under the Users directory when you connect it as an USB drive. Some viruses will actively scramble your files, though, so recovery may not be possible. Also, the reason for the corruption could be a failing hard drive; that would potentially hinder the file recovery as well.

Note that D3D does not run in iMac unless you install Windows in it (be it dual-boot or virtual).

In my 20+ (actual) years of developer experience, I have picked up some IT admin practices as well ;)
1

Share this post


Link to post
Share on other sites
[quote name='MLillowitz' timestamp='1333429357' post='4927772']
My version of Windows 7 Pro has all DirectX runtime libraries corrupted and has necessary OS GUI deficits in prominent .sys files.
[/quote]
You should be able to fix that by re-installing the OS and then re-installing the SDK and run-times. It's a simple and relatively quick fix, and if done correctly won't lose any of your data (which you should have backed up anyway).

Honestly, this is pretty basic for anyone with a technical background, I'm surprised you haven't done so given your "20 years experience"...
0

Share this post


Link to post
Share on other sites
Hey, jbadams.

I can't reinstall because the files necessary to do so are corrupt.

Did you not read my post?

20+ years of programming experience.

- Mikey
-2

Share this post


Link to post
Share on other sites
[left]Regardless of how messed up your installation is, the original installation media will work fine. Furthermore there are plenty of places where you can obtain (including MSDN and TechNet) original copies of the ISOs to install the operating system. Provided you have the legal license.[/left]

[left]Lastly, even if someone DID write said example, you would not be able to compile it if your DXdev installation was so corrupt. Furthermore, even if it was corrupt a simple re-installation would fix that.[/left]

[left]Lastly, I highly doubt you have 20+ experience in anything software development related. I HIGHLY suggest you stop claiming that.[/left]
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