Display of 3D Object with ZIndex - "object3D" [Solution: ViewportFrames]

Currently it’s impossible to have 3D objects scaled to a gui element, such as a frame, and have it displayed on top of it. A solution is to implement a new gui element, which I call “object3D”. I have produced a mock up of what it would look like if we had this gui element, the uses are of course endless. (Without the use of a screengui behind an object.)

Mockup:


(The cube looks blue on all the other sides but the top because of the lighting.)

So, if you can’t see the properties I have layed them out here:

bool Enabled; //Display object trigger. [true, false]
string Name; //Name of element.
instance iAttach; //Instance(Gui Element) in which is used for scaling and positioning of object.
instance Object; //Object that is displayed if iAttach is not nill and Enabled is true. Positioned at the middle of iAttach.
//Object also can have parent as nil and object3D as it's renderer. (Exactly like putting object in workspace.)
int ZIndex; //Display order of display object.
color3 Tint; //Similar to ColorCorrection Tint.
udim2 Location; //Offset from middle of iAttach.
orientation Orientation; //Rotation of Object.
bool ChildrenAlwaysOnTop; //Children of object will display on top of object and other gui surrounding. ex. displaying players behind a wall in a 3D map.

So, what are the uses?
Well, there are quite a few,
Ex:

  • So, you have a shop gui that displays 3D models of whatever is being sold. The background is literally just a part with a surfacegui on top of it. The only problem is, if a player gets to close to a wall it’ll clip into it, the magic is ruined. Now a possible solution to this is raycasting behind the object and making the overall object/model smaller and closer to the camera, but this makes it look worse with poor resolution if images are involved. So, this solution is not the most efficient and most definitely not the best.

  • 3D maps could be valuable to a game, 3D shooters could use them as an alternative for a circular/square map. Thus, allowing for more control over how the map displays players or even how the map looks. But, it could also be used to display a ship and it’s orientation, so while dog fighting other players you’ll know which you’re pointing.

  • Now imagine if you had a transparent part that emitted particles in-front of what ever gui you had, this would remove the need to produce your own 2D particle emitter system. Allowing for easy creation of “2D” particles.

So, in others words, these situations could be drastically improved and redone so issues such as the first example or situations such as the second and third can be done and fixed.

Now I’d also like to include a function in which would also provide some support:

void SetChildrenOnTop(array Objects); //When ChildrenAlwaysOnTop is set to true, it'll look for anys object arrays given, if not it'll default to all children within the object. 
void Transition(udim2 Location, orientation Orientation, enum EasingStyle, int TransTime); //Tweens object in chose enum style, if only tweening orientation leave location nil, if only tweening location leave orientation nil, if tweening both include both values. Includes tween styles, (Sine, Elastic, Bounce, Linear, Quad, Quint)

Now of course I’d be obliged to receive some feedback, extra properties, or functions in which would make this feature request that much better. Cheers.

30 Likes

If you want an animated preview of an object with some fancy effects, this would probably be a more ideal solution.
cc @Imaginaerum was doing something like that for his shop gui but in 2D

This would definetly be a game changer, I love it.

2 Likes

I actually like the idea of this. I’m all in for it. The current method of making 3D GUI objects is just a pain and the fact that they’ll always sit behind certain GUI objects, it becomes a nuisance.

The only thing I would personally add would be rotation so we can make the 3D Object rotate.

Orientation is basically “rotation” but in radians.

2 Likes

omk

Yeah what I’m doing is a little different. We just have an item illustrated, converted to greyscale, and separated into two images overlayed on each other for effects/colors.

I think having some Tweening methods along with this would be great. It would make for great cinematic transitions/intro screens.

Added transition function, it allows tweening of orientation and location.

1 Like