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

Started by
0 comments, last by jollyjeffers 15 years, 5 months ago
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..
Advertisement
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

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

This topic is closed to new replies.

Advertisement