Describe the project you are working on:
3d game
Describe the problem or limitation you are having in your project:
aabb doesn't make sense for a 3d boundingbox it should be called aaabbb if anything but thats too long
I think rect3 is short and easy to understand and use for both beginners and existing users
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
rename aabb back to rect3
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
var boxa = rect3(0,0,0,1,2,1)
var boxb = rect3(0,0,0,8,8,8)
if !boxa.intersects(boxb):
placeblock()
If this enhancement will not be used often, can it be worked around with a few lines of script?:
this would be used alot yes and no it can't
Is there a reason why this should be core and not an add-on in the asset library?:
its more consistent rect2 naming
What? AABB stands fir Axis-aligned Bounding Box. It makes just as much sense for 3d.
yes but rect2 is the same thing and aabb but they use different names
also aabb sounds like the points aa to bb to people who don't know the abbreviation
I feel we still need a clearer name and while rect might not be the best option I feel aabb may be confusing to new users.
I also think we need to have a consistent name for both 2d and 3d that is clear to what it is.
"point aa to bb" doesnt even make sense. Also, rect3 doesnt makes sense because by definition a rectangle is 2d
point aa being x1,y1 or xa,ya and point bb being x2,y2 or xb,yb
so yes it does make sense
if you think rect3 is not a good name then tell me what you think is
I don't think aabb is a good name because its just a acronym and I feel something like a abbreviation is far more clear.
rectangles are indeed 2d shapes but if its axis aligned then it can translated to 3d space
point aa being x1,y1 or xa,ya and point bb being x2,y2 or xb,yb
so yes it does make sense
That is a serious reach. Mathematically its not even correct.
Aabb is a perfectly fine name. Its a standard acronym used all over the place in the industry that anyone reasonably experienced with gamedev should already be familiar with.
well I didn't so what's your point?
not everyone knows what aabb is but people do know what a rectangle is (its a box).
boxes can be both 2d and 3d
A rectangle is a 2d box. A 3d box is not a rectangle.
My point is that changing the name if something from an industry standard terminology simply because you don't know what it means is silly.
Renaming "rect2" to "rect" may solve the inconsistency.
Why not "Bounds" ? AABB is too technical. Bounds is common in many other softwares like UE4, Unity and Sketchup.
@vitorbalbio The issue with "Bounds" compared to "AABB" is that it doesn't mention the axis-aligned part, which can be pretty important sometimes.
To some people, it might be obvious that bounds are axis-aligned, but I doubt that's the case for everyone.
To some people, it might be obvious that bounds are axis-aligned, but I doubt that's the case for everyone.
Personally I always felt emphasizing the axis-alignment a bit pedantic. In every day language, when you speak of a "bounding box" basically anyone assumes axis alignment naturally anyway. And typically naming best practices recommend to omit adjectives/participles for the expected, and leave them for the unexpected.
Nonetheless I think AABB is established game-dev parlance and is here to stay.
I would rather rect2 be renamed to aabb2 and aabb renamed to aabb3 if anything.
however I still think aabb is still not very clear to what it is.
@jonbonazza a 3d box is made of rectangles so by that definition it is multiple rectangles.
so it could be considered very close to a rectangle
@bluenote10
In every day language, when you speak of a "bounding box" basically anyone assumes axis alignment naturally anyway
I'm gonna have to disagree with you here. I think the "Axis-Alignment" part is only commonplace within computer graphics/gamedev. That being said, I agree with you that "BoundingBox" is the only decent alternative to AABB.
Turning to what other game engines use:
Unreal:
It looks like Unreal has the concept of a "bounding box" but it is axis aligned in local space only (https://docs.unrealengine.com/en-US/BlueprintAPI/StaticMesh/GetBoundingBox/index.html)
It also has an axis-aligned bounding box which it calls AABB (https://docs.unrealengine.com/en-US/API/Runtime/Core/Math/FBox/index.html)
Unity:
They call their AABBs "Bounds" (https://docs.unity3d.com/ScriptReference/Bounds.html)
Cryengine:
They call theirs AABB (https://docs.cryengine.com/display/CPP/AABB)
well I didn't so what's your point?
If you are a beginner, you probably don't know lots of other things. That doesn't mean we should rename everything to have names that sound familiar. Also the meaning AABB is explained literally in the first sentence of its documentation.
That said, this is mostly a discoverability problem. We could make AABB easier to find for people who don't know it. Rect2 could mention AABB as 3D equivalent or we could make Rect3 redirect to AABB (although docs don't support redirects as of now).
Renaming "rect2" to "rect" may solve the inconsistency.
This. Rect2 makes little sense. Rects are always 2D as already mentioned and there's no Rect3 equivalent. (compare with vectors)
@vitorbalbio "Bounds" means something different in Unity. Unity's Bounds stores a center position and extents, while Godot's AABB stores a corner position and the size. Unity's Bounds.extents is half the value for the equivalent shape in Godot's AABB.size. I don't know what the behavior is in Unreal or others.
@Shadowblitz16 Even though it does seem inconsistent, I think changing this is unlikely. Many people prefer the existing name, and breaking compatibility is usually something we try to avoid unless the change is a large benefit.
@aaronfranke compatibility is already breaking with 4.0
what about renaming rect2 to aabb2 and aabb to aabb3?
at least then it would be consistent which itself is less confusing
See alternative/counter-proposal at #1671.
Most helpful comment
What? AABB stands fir Axis-aligned Bounding Box. It makes just as much sense for 3d.