3DSkybox - A way to create more immersive skyboxes for your game

This is a fantastic idea, one I will likely use in several of my builds in the future, thank you!!

However, I’m seeing an issue with lighting on the 3D skybox model, so it looks pretty funky and discolored.
Would there be any way to fix this? or is it an inevitable result?

5 Likes

It’s pretty much just a single ViewportFrame, so it has all the limitations that come with them (So lighting isn’t supported), I’ve also noticed strange behaviour when using fog, so it’s probably not recommended to use that with this either.

3 Likes

Right, thanks for the reply, and this amazing tool you’ve made here.

2 Likes

I’ve just began using this, and I’m quite pleased! There is one small thing that I’m not sure you’re aware of: the script doesn’t keep the skybox camera’s FieldOfView equal to the CurrentCamera’s. Video example:

https://giant.gfycat.com/WeakDimwittedKittiwake.webm

With the following one-line addition in the update loop we get this:

SkyboxCamera.FieldOfView = Camera.FieldOfView

https://giant.gfycat.com/ScaryNeedyBooby.webm

26 Likes

Whoops, must have slipped past when creating it.

I’ve now updated the model with that addition, Cheers!

3 Likes

Amazing stuff! I will use this soon

1 Like

Very impressive, hope to use this in the future.

2 Likes

I know I’m doing something wrong, I cant seem to figure out how to get it working with my custom mesh landscape, or even with the stock city one… I put my mesh part as a child of Viewpoint Frame in the model, and I throw it into the Starter GUI, but it seems too high as I’m “under” the mesh, so I drop the Y value for the camera, but it just disappears… If you want more of an explanation or me to show what I’m talking about, msg me and we can exchange discord tags.

1 Like

It’s sad that viewport frames dont respect world lighting

4 Likes

Still really good for doing things like continuing landscapes outside of the play area.

2 Likes

Amazing. Can’t wait to use it in my ski resort.

2 Likes

This is a gorgeous creation you have there. I’ve been interested in ViewportFrames and this, nice work. :wink:

2 Likes

Jesus, that looks awesome!

2 Likes

This looks seriously awesome!! Really creative way of using the ViewportFrame, can’t wait to experiment with it :smiley: Skyboxes seem to be the one thing the interwebs can’t (or won’t) tell me how to make, so this could be really useful :+1:

2 Likes

By far the most creative and ingenious use of a viewport frame if not any roblox object!

1 Like

This is cool, thank you for posting this!
:+1:

1 Like

This is really cool and I’ve been playing around with it in various projects with some fun results. I am curious how you got the moving part to work fine though. I’ve attempted several solutions and any part that moves just fine in the workspace is frozen in the viewport.

EDIT: After playing around with it a bit more, I’ve discovered that beginning the simulation with an empty 3DSkybox Viewport and dragging the moving object from the Workspace directly into my player’s GUI folder causes the object to move in the Viewport as intended. How can I work around this and allow the object to move straight from the StarterGui? I’ve tried programming the object to parent itself to the Viewport in the StarterGui after first loading in the Workspace to get the movement script working, but then it doesn’t update with the player’s own Gui folder.

3 Likes

Since it’s a ViewportFrame, it won’t simulate any physics (So no Motor6D animations etc), in the example pyramid above, I just used a simple script that updates the pyramids CFrame each frame.

game:GetService("RunService").Heartbeat:Connect(function()
	pyramid.CFrame = pyramid.CFrame * CFrame.Angles(0, math.rad(0.5), 0)
end)

I believe there are some methods which allow you to create animations within a ViewportFrame, however, if I remember correctly, they use a similar hack to what you described originally (But updating each frame, which could be quite costly).

2 Likes

This brings me back to the HL2 and Portal 2 days, where Valve projected skyboxes using a similar method.

Good work! Can’t wait to mess around with this idea.

6 Likes

I set it up exactly as it is in the description, but it doesn’t work.

3 Likes