HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

MinMax Extents and BoundRadius

01-17-2006, 02:58 PM#1
Jacek
What these things I noted in title do? How they should be set?
01-17-2006, 03:10 PM#2
Rao Dao Zao
They encompass the model, and define two things (I can never remember which does which). One - when the model goes off-screen by a certain distance it disappears; it's culled to save processor power. Increasing the extents makes the model have to go further off-screen before it disappears; ideally, it will be totally off-screen when it gets the chop. Two - the geometry within the boundsradius can be clicked to select the model; geometry outside cannot. You need these in each sequence; see real Blizzard models. Correct me if I got them the wrong way round.
01-17-2006, 03:17 PM#3
Nasrudin
I recently found out that you only need to set them at the start of the mdl, before textures materials and such. The values in the sequences, it seems, are useless.
01-17-2006, 03:19 PM#4
iNfraNe
Correct. Remember that if you change an object's pitch/roll the min/max extents dont change ingame, so it will usually stop rendering while still on the screen.
01-17-2006, 03:19 PM#5
Rao Dao Zao
Nasrudin - Not in my experience; having no extents/boundsradius in the sequences makes the model cull at the origin and be unselectable. It's a weird one, because once it was the set at the top that had to be changed. There must be some kind of priority system...
01-17-2006, 03:26 PM#6
Jacek
OK... I'll look at it immolately...err... immediately
01-17-2006, 03:27 PM#7
Nasrudin
Well, give me a minute and I'll find that model for you...

EDIT: Nvm, I was referring to the gaiascape's ruins pack models, but I forgot that they have no sequences. What I was referring to are the extent\boundradius values at the end of each geoset, they don't have any effect on the model rendering.
01-17-2006, 04:22 PM#8
Jacek
How do you calculate them?
01-17-2006, 06:47 PM#9
Rao Dao Zao
Don't bother. I use Magos' Model Editor to get them exact; then round up to the nearest fifty. Means you don't get any nasty early disappearances, but it probably takes a horrible toll on the processor.
01-17-2006, 06:58 PM#10
Jacek
errr... I want to know how to calculate them anyway
01-17-2006, 10:08 PM#11
kdub
Just find which vertex has the largest value of sqrt(x^2+y^2) and add like 25%

that should work fine.
01-17-2006, 11:09 PM#12
Magos
MinExtent - The bottom left corner of the bounding box
MaxExtent - The top right corner of the bounding box
BoundsRadius - The radius from the mass center of all vertices to the vertex furthest (sp?) away from the mass center

The bounding box is the smallest axis-aligned box that contains all vertices.
01-17-2006, 11:31 PM#13
StealthFox
The formula for finding the Bounds and Extents are found inside:

HRESULT D3DXComputeBoundingBox( LPD3DXVECTOR3 pFirstPosition,
DWORD NumVertices,
DWORD dwStride,
D3DXVECTOR3 *pMin,
D3DXVECTOR3 *pMax
);

and

D3DXComputeBoundingSphere(...)

Both are within the DirectX API.
01-18-2006, 03:48 AM#14
kdub
whatever. i just set them all to 200
01-18-2006, 12:46 PM#15
Jacek
200?