ViewportFrame particles

As you probably know, Vpfs don’t render particles. I know there are some 2d particle modules, but I don’t really seem to get any use from them. I would like to know is there a workaround / free resource to help me achieve the following :
-Be able to display multiple particles on Ui and on ViewportFrames through parts.
-Have support for attachments and modifiction to the parts and particles.

Thanks, I appriciate it :heart:

I don’t think it is possible to actually get particles inside viewports.
You would need a module script designed to somewhat mimic the mechanical parts behind particle emitters.
Then again, I don’t think the viewports are designed for things like that; they don’t support transparency; instead, they’re designed for minimaps, 3D character showcases, etc.

They aren’t , and that’s why I am looking for a workaround or a introductory of one.

I don’t think there’s a workaround to that, other than creating your own (could be barebones) or using somebody’s particle system.

Or you can just create your own viewport system, but it would probably suck since parts collide with other parts.

It’s not possible with regular viewport frames, but as seen in this video, it is possible if you create your own system to fit an object inside of a frame.

Hey, I recently decided to find out how to make a custom viewport frame, and here’s what I did:

First, to put the part on screen, you need to use:

workspace.Camera:ScreenPointToRay()

In order to get the middle of a gui and put the part there, you would need to do this:

local point = Camera:ScreenPointToRay(Frame.AbsolutePosition.X + (Frame.AbsoluteSize.X / 2), Frame.AbsolutePosition.Y + (Frame.AbsoluteSize.Y) / 2, depth)

From there, you can put the part in the middle of the frame:

Part.Position = point.Origin

From here, you can adjust the depth argument in ScreenPointToRay. You can also get into math/trig to automatically solve depth like I did, but it’s pretty difficult and I would recommend just doing it manually unless your up for the challenge.

You’re also going to need to make the part look at the camera, which is pretty simple; you just need to use CFrame.lookAt().

This is what my final product looks like (My solution for depth allows a bit of bleeding with large parts (30 studs tall in this case) like this, but its pretty good for the most part):
image

With particles:

Also keep in mind this isn’t the best solution, since you can’t get parts to go over UI on screen. You can also translate this code to allow for models to be displayed. I hope this helps, good luck with your project!

You didn’t make custom viewport system, the object is physically there and is… Just literally put infront of the screen in based frame, but could work as a solution I guess?

Correct, it’s technically not a custom viewport due to 1:1 replication of that being impossible. OP said that other solutions didn’t work for them, so this is the best I could provide. But you can do some cool things with it, such as particles being able to go directly into the screen. This is pretty much as close as you can get to a custom viewport frame.

1 Like