Jump to content

Question regarding "ScaledSpace" subscenes in KSP in Unity, maybe the modders know?


JoergZdarsky

Recommended Posts

I have a question on how KSP was built within Unity3D when it comes to the LocalSpace/ScaledSpace topic, I hope that maybe some of the modder community might know?!

I've sent a message to HarvesteR, but obviously the devs of KSP are way to busy. :)

Hopefully this KSP section is right for the question?

I am currently trying to built a universe setting in Unity similar to the one found in KSP for private and own education, and for fun. I want to combine it with the procedural creation of planets und nebulas, and make it work with the oculus rift I've just ordered. While the procedural creation of planets using quadspheres, quadtrees and simplexnoise is not a problem, I of course also ran into the floating point issue when trying to render solar distances.

I am also using floating origin for the players position within the scene, which seem to work quite nice, however I have a problem to understand how KSP solved to combine the LocalSpace and the ScaledSpace in Unity to render close and for objects at once.

Am I right that KSP is rendering all three Spaces (Internal, Local, Scaled) in ONE scene in Unity? And just apply the planet meshes and cameras to three different layers (for Internal, Local, Scaled) within the same scene? Or is KSP using some other kind of technique (e.g. somehow rendering the spaces within three completely detached scenes)?

Looking at their conference at Unite 2013 (very interesting!!), starting at 11:00 it seems that they used one scene and a ScaledSpace is only a separate layer.

Another question, in the ScaledSpace, when KSP does scale down the planets ratio by 6000:1, I guess they also scale down the distances between objects and the camera speed (for the ScaledSpace)? Because I think otherwise (e.g. when not changing camera speed) it would not feel right because you'd get to distant objects too fast.

So I wonder if they detached the cameras, because at least the LocalSpace and ScaledSpace camera should move at different speed ? But since they mentioned in the Unite 2013 developer conference that each camera uses its own Floating Origin parameters, it seems to me they really detached all cameras in the scene, so that the cameras are at different positions at least when the player moves around. I wonder how the cameras are synchronised and how then they managed to have different Floating Origins affect only separate layers if in the same scene.

Maybe one of the modders/addon makers can give me a hint? Thanks in advance!

Cheers,

Joerg

Edited by JoergZdarsky
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...