Replicating 'enlarge' effect?

I’m trying to replicate something similar to @plasma_node Hyperspace arrival effect - To be more specific the enlargement of the Planet(s) // Space stations on arrival.

Below is a brief example - Although, I have been informed that this effect can be achieved by manipulating the Camera instead of the model and that is what I wish to achieve.

I know that it’s possible as the same effect is used in Starscape - Though, I’m new to Camera Manipulation and wish to develop on it.

An alternate way I achieved this was by developing a custom Tween controller that managed the size of Models and shrank / enlarged them accordingly. Though this took its toll on performance.

Any support would be greatly appreciated!

2 Likes

You could keep the model in a fixed position while you animate the warp effects around it and once an amount of time has passed you can start moving the model.

So this is actually a pretty complicated and unique scenario on my end, as I am essentially fitting an entire to-scale star system within 60,000 cubic studs (due to physics precision issues past that distance).

So the enlarge effect is supposed to represent your ship coming out of hyperspace and still moving pretty fast for a few seconds like star wars does it. The effect is exaggerated in this video. Most of the enlargement will normally be done in hyperspace as that’s where you move really far, really fast; The last bit of enlargement is just for dramatic effect. You can actually see the planet is really small at the beginning of the video because the ship is far away.

If you don't want to read this, scroll to the end. In a nutshell my system is really complex because I am doing something ambitious, but you can accomplish a similar effect easily.


So here is my solution for space stations, nearby starships, and celestial objects. Basically I can’t fit a full scale star system into 60,000 cubic studs so I have to split it into many many chunks. When you hyperspace to a space station around planet 1, going from the sun for example, you enter a new chunk. Old chunk unloaded, new chunk loaded, celestial objects adjusted to look bigger/smaller, all within the same 60000x60000x60000 space. So it’s like moving space around you lol. This is elaborated on more further down.

As such I have to load in nearby objects for whatever “chunk” you’re flying to in the same 60,000 stud space retroactively.

As for the enlargement effect the celestial bodies like stars and planets are adjusted based on your calculated distance from them. (So you might be located at 0,0,0 and the planet at 0,0,30000 but the game knows it needs to make it look like it’s 0.2 AUs away from you so it shrinks/enlarges it retroactively based on camera position)

So what’s happening here is unique in my game is that both the ship and the planet are moving. As I said the planet will move based on your relative position to match where it should appear, but for this video, I actually exaggerated the effect intentionally by enlarging the planet with a tween.

Once I complete the framework it will work as described, however. Essentially your ship will move and the surroundings will also change/move. Let’s say the ship is moving from chunk A0 to chunk B6 and needs to exit at 0,0,0 at that chunk. To get this effect I just spawn the ship at -50000,0,0, delete chunk A0 stuff from workspace and then load in chunk B6 stuff into the workspace. Then I finally tween the ship to the position it needs to end up, in this case, 0,0,0. As a result of moving the ship that far it makes the planet start small and look bigger when you exit. Then there is a little bit of added exaggeration but less then what I did in the video to show off the cool effect. These two things coupled together will look pretty much similar.

I probably didn’t need to include this long explanation but if it helps in any capacity then it was worth it.


How you can implement this

So basically what you can do is adjust the size of a model relative to the camera’s position and where you want the model to appear. That’s the key word because there is a distinction between how something should appear and what it actually is sized + positioned to make it look that way.

On top of that, you can add some exaggerated size tweening as I did by starting smaller as I did.

So like I said, in my video, the planet is visible at the beginning it’s just really small. (And covered up by a spinny thing partially)
image

Because you are not doing something as ridiculously overcomplicated as I am (I hope) you can achieve the same effect by retroactively scaling a model + added tweening when exiting hyperspace.

For retroactive scaling, I don’t recommend using tweens. I think you should use a loop as it’s probably more efficient. Then when you want to exaggerate the effect, pause the loop, use a tween, then resume the loop.

I’ve never encountered any performance issues. The key here is to use a tiny model that appears large by being placed close to the camera but further than the objects that need to go in front of it. I don’t remember the exact math I used but if you play around a bit you should be able to get it.

I know this is a long post, but I hope it helps.

3 Likes

This is brilliant! To hear from the man himself provides concepts of how I could potentially do this!

I like how you introduced me to the idea of Chunk generation as well as positioning it according to the camera.

Definitely going to try this method!
Thank you!

1 Like