Sign in to follow this  
aye2m

Working with .x files

Recommended Posts

Hi all, I am trying to simulate a driving car scene (like Need For Speed game). I am thinking to use .x file to create the whole scene and load it into my program. How can I render only some parts of the .x file? Or is there any better way? Thanks a lot in advance.

Share this post


Link to post
Share on other sites
Hi there aye2m,
How are you doing?

The Problem
Rendering parts of a .x mesh

The Solution
You can start looking at how PVS (Potentially visible set) is implemented. It's a method that basically just checks which regions of your map is visible and how they have implemented a BSP (Binary Space Partition).

These are all methods that Doom/Quake have implemented. I haven't really done this with .x files and i'm sure it can be done or you could create your own file format.

Look at this article at flipcode. They basically go over how the Quake 2 map file format works and looks.

With a direct approach to your question. It's going to be difficult if you aren't dividing your .x files up into little segments. The approach I would do might be simple but effective is to essentially break your map into smaller .x files. Maybe a .x mesh for every room and use the BSP to couple them together similar to the Quake map format. This way you can cull big parts of your map from being rendered using frustum culling.

I hope this helps buddy.
Take care.

Share this post


Link to post
Share on other sites
A mesh can contain multitple meshes, and each mesh can contain segments. using directx, you can access any particular part of a mesh, but I dont belive its the standard way to go about creating a scene. My guess is that you're building a scene in maya or max and you want to export the whole thing to an x file?

Share this post


Link to post
Share on other sites
Quote:
Original post by Stellar Developer
My guess is that you're building a scene in maya or max and you want to export the whole thing to an x file?


Yeah. I want to create the whole scene and load it into my program. Is using an x file for the whole scene a good way? The idea is to simulate the driving car like NFS.

Thanks a lot.

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