How to get object's width, height and depth values

Posted By: Illegitima

How to get object's width, height and depth values - 09/22/07 03:06

Hi there again,
It seems I always ask the most stupid questions ever. Now this time I found it way difficult to get any object's height, width and/or depth value. No where in the WED's object properties I can find these. There're positions, scales and so on... I also got this "bound" thing but I don't really get what this means and its values are a complete nonsense to me.
So please tell me how to get any objects current height, width and depth. I'd be really grateful.
Thanks in advance.

N.
Posted By: HeelX

Re: How to get object's width, height and depth va - 09/22/07 11:20

Well, you asked for WED, so I will slighty make a notice that you can query these infos also during runtime.. so, here is how you get it in WED:

Select an entity and open its properties panel. Then go to the "object" tab. There you'll have several numbers..

Position, Rotation and Scale reflect the numeric values of these properties from left to right: x,y,z

Bound values are also to be read from left to right as columns: x,y,z direction and the upper row means the extend in positive direction and the lower one into negative direction.
Posted By: JazzDude

Re: How to get object's width, height and depth va - 09/22/07 19:25


Quote:

Bound values are also to be read from left to right as columns: x,y,z direction and the upper row means the extend in positive direction and the lower one into negative direction.





I'm assuming that would be the distance from the origin. Right?
Posted By: HeelX

Re: How to get object's width, height and depth va - 09/22/07 20:04

yes, but scaled with the scale values.
Posted By: Illegitima

Re: How to get object's width, height and depth va - 09/23/07 20:24

Hi there and thanks for the reply. I have another question though related to this one. From which origin are calculated these boundaries - from the origin of the scene (world) or from the origin of that object (well, its center to be more precise). I ask, because some of my exported objects ended with their center somewhere else (out of the object or not exactly in the middle). Is this going to affect the so called bounds?
Posted By: HeelX

Re: How to get object's width, height and depth va - 09/24/07 09:18

It is always the origin. You can check this by moving the object around: you will notice that the bound matrix doesnt change.
Posted By: Illegitima

Re: How to get object's width, height and depth va - 09/25/07 02:26

Ok, thanks. And is there a way to manipulate the origin's place. Some objects directly exported from MAX, got their origins not in the middle of them. It happens with objects that are actually a group of other objects (like couches, desks and so on) Should I go for "create single mesh" when importing?
Thanks again, and sorry for the diverse questions, but I was really mixed and now the things started to become much clearer
Posted By: HeelX

Re: How to get object's width, height and depth va - 09/25/07 15:35

Do you mean static mesh import or import into MED and then placing a model? In both cases you can simple change the origin MED by loading the file into it and moving the mesh so that the origin is in the center of the mesh. Save it as MDL and load it. If you want to load it as static mesh, you can also take a MDL7 source for the static mesh importer.
Posted By: Illegitima

Re: How to get object's width, height and depth va - 09/25/07 23:40

Thanks again! You've been really helpful and nice portfolio by the way.
© 2024 lite-C Forums