object radius based visability augmentation (Wishlist)

object radius based visability augmentation // Wishlist

1  |  

technozeus

Dec 31, 2002, 2:28pm
When an uncached object's origin or rotation point first eneters visibility range and the object is loaded and rendered, the size and orientation of that object's bounding box should also be cached. This way, while an uncached object is considered out of visibility range as long as it's origin is out of visibility range, a cached object could be concidered within visibility range whenever any part of it's bounding box is within visibility range, or perhaps better yet when it's origin is within the object's radius of the visibility range. The object's radius, in this sense, would the the distance from the object's origin to the corner of it's bounding box that is farthest from it's origin. This calculation would only have to be done once, when the object is cached, and then saved for use in calculating whether or not the cached object is within visibility range.

I think this would be a good compromise between the performance of origin based visibility range detection and the increased realism of bounding box based visibility range detection. Once cached, a large object would no longer suddenly pop in or out of visibility right in front of you. For example, at 200 meters visability a ball with a 190 meter radius and it's origin at it's center currently apears only when it's surface is about 10 meter from you or closer and vanishes when it's surface is just over 10 meters away from you.

In the case of the example ball with a 190 meter radius (the actual radius, of the ball's surface, not the "object's radius" as I previously defined), by allowing the bounding box to be used for visibility range calculations on cached objects, the ball would still not first apear until it's surface gets within about 10 meters of you, but once it has been loaded and cached that huge ball would no longer vanish and reapear at such a close distance.

Even better yet would be to use a definition of "object's radius" (or a bounding box radius) that would be a single scalar number representing the distance that should be added to the visibility range for the specific object without regard to the object's orientation to assure that the cached object will never be treated as out of visability range while any part of that object would be "in" visability range.

I figure the non-orientation-dependent aproach would be best because it requires less calculation to determine if a cached object is in visability range than an oriented bounding box aproach, and because a large object suddenly bocomming visable or invisable at close range would be about as obvious if it's tall or wide and set back in the view as if a narrow face of the object was turned toward you placing that smaller surface much closer.

Calculating the radius of an object's bounding box as the length of a line from it's origin to the farthest corner from it's origin at the time the object is first loaded, and then adding this "object radius" to the visibility range for the cached object would bring small cached objects (such as a meter or less in radius) into view only slightly sooner than uncached objects, and so should not have a great impact on performance, but would have a profound positive effect on the level of realism that could be achieved.

TechnoZeus

bowen

Dec 31, 2002, 4:53pm
Althought this would kill older computers, we need it. Maybe an option between object
origin or radius visability. :)

--Bowen--

[View Quote]

technozeus

Dec 31, 2002, 11:01pm
Actually, it wouldn't kill older computers at all. On the contrary, if properly used it would actually increase performance. Here's why... Right now, the existance of a few large objects in the average world makes it necessary to have a visibility range that is quite a bit larger than what would be needed with the radius based augmentation. Therefore, with that augmentation in place, the smaller objects could be given a slightly smaller visability range. Since they are harder to see at a distance and often obscured by larger objects such as the house they may have been placed in, smaller objects having a few meters less visability range would generally not even be noticed, but rendering a small object usually has almost the same performance impact as rendering a larger object of equal complexity so there would most likely be a performance gain.

TechnoZeus

[View Quote]

bowen

Dec 31, 2002, 11:22pm
[View Quote] It would either kill frames per second or the processor power. Depending on which
approach you're going to take. But it'd only have to do it once per cache so I guess
it could work but would definately take a huge rework of the current cache system.

--Bowen--

technozeus

Jan 1, 2003, 12:12am
Well, here's what would need to be calculated...
Find the 8 corner points of the bounding box.
For each corner point, calculate (x^2+y^2+z^2)^.5
Compare each of the 8 calculated values a single time to see if it's larger than the largest of them found so far, and if so store that value as the radius.
When these steps are completed, the stored radius value would be saved into the cache with the object.
This would only have to be done when an uncached object is encountered, loaded, and cached.
Anyone who knows even a little about programming should be able to see that these few calculations are negligable in comparison to the overhead of almost any graphics operation, and in this case it would happen very infrequently. As I said, it would probably reduce the overall processing necessary, and improve performance and framerate, due to the ability to achieve improved results with a lower visability range.

TechnoZeus

[View Quote]

ananas

Jan 1, 2003, 6:41am
I think this would be a nice enhancement. I do not see any
problem to do those few calculations when a model is added
to the cache.

A good example where this behaviour would be really an improvement
is zaw25. When the visibility (float) is higher than the minimum
and the zaw25 comes into rendering distance, the framerate drops,
the visibility drops and the zaw25 is not in range anymore. It is
not rendered anymore as it is outside of the visible range, this
raises the framerate, zaw25 becomes visible again, is rendered and
so on.


I think a reason why it cannot so easily be done is that the
browser currently does not examine cells that are outside of
the visibility range at all, but with this change it would
have to examine a wide range of cells that all might contain
large-range visible objects.


[View Quote]

john

Jan 4, 2003, 3:35pm
Idea: Make it so the Browser takes a picture of the buildings and sets them
as a semi-backdrop to the rest until you start to get closer.

[View Quote]

technozeus

Jan 5, 2003, 1:50pm
Actually, I suggested something on that line a long time ago. I'm not sure how well it would actually work in practice, but it sounds good. :)

TechnoZeus

[View Quote]

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2021. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn