Sign in to follow this  
Ninja2008

Line of Sight,Collision,3D worlds..questions

Recommended Posts

Hi I use DX8 and VB6 to create 3D,2D games,I have 2 questions,I hope that anyone can help me in finding the answers.. 1-how to make an object "look" to other object and give a result of true if it is seen and false if it is not,I know there is something called "Ray" but I don't know how to use it..if there is some tutorials about that anywhere please tell me.. 2-I made a collision function "box collision",I know how to do sphere collision,I just want to know some precise collisions algorithms for complex objects,again if there is tutorial anywhere please tell me.. 3-if I am making a 3D world,is the correct thing to make all static objects in one .x file or not? by static I mean buildings,roads..idle things,you know like designing a city in 3DS Max all in one file then converting to .x and loading the whole city in one call...is this right?..or segmenting objects in the city you know like buildings alone,roads alone.., I just want to know the right thing,and I use frustum culling,is this culling usefull for this type of loading?,or using of another type? and which culling is the best? sorry for alot of questions,but I just want to do the right thing,and thanks for the reading time..

Share this post


Link to post
Share on other sites
Questions #1 and #2 are better suited to the 'Maths & Physics' forum so I'll move this across for you.

Regarding #3, it's more of a design thing - do all those objects logically belong together? Do you at a later date want to consider them as a single entity? If not then you should seperate them. If you want to re-use individual buildings for different cities then you don't want that building grouped together with hundreds of others. A city might have many similar/identical buildings, so you don't really want to duplicate all of these in the same mesh data.

Frustum culling is a definite good idea, but works better with fine to mid granularity of objects. Say individual buildings or parts thereof which doesn't suit the sort of mesh arrangement you're describing.

As for which culling algorithm, go for one that has coarse results - older graphics engines would cull down to the sub-primitive level (mostly software rasterizers) but this would be performance suicide on current hardware. Stop culling at subsets or whole meshes and don't go down to the primitive level or you'll risk spending more time doing culling and micro-managing the GPU than you will doing useful work [wink]

hth
Jack

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