Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How make space scaled system (3d skybox )

Discussion in 'Scripting' started by zenden_1, Sep 30, 2018.

  1. zenden_1

    zenden_1

    Joined:
    May 20, 2017
    Posts:
    53
    Hello, i want to make a space scaled system like that :


    The autor of the vidéo say how to do that but i don't understand. He say that :
    In this video, the foreground objects (the 2 ships and the trusty Unity cube) are in normal space. The background objects (the moon, gas giant, and Halo ring) are rendered with a separate camera moved such that it gives the illusion that they are 20,000 times larger than they actually are.

    They're very easy to implement. You put all the GameObjects that you want in the scaled space on a specific layer, and have a separate camera that renders only that specific layer. The scaled camera then mirrors the main camera's field of view and rotation. The translation gets mirrored as well, but for every 1 unit, the scaled camera moves only 1/scaleFactor. The parallax effect that comes from that gives you the illusion that you're looking at something much, much bigger than it actually is.


    I'm a beginner and i'm not good in english, can you help me to make a script for that ?
     
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hi, @Zenden944

    This article explains how multiple cameras can be used in similar manner:
    https://blog.theknightsofunity.com/using-multiple-unity-cameras-why-this-may-be-important/

    Otherwise it just seems like a neat way to circumvent scene scale issues by using two cameras.

    "Small" scene camera moves normal speed, and renders only moving space ship.

    "Huge" scene camera mimics the translation of "small" scene camera but does it in multiple times smaller scale, and renders only planetary objects.

    "can you help me to make a script for that ?"

    Maybe someone will, but it's unlikely, as you should learn to do it yourself, if you want to make such system.
     
  3. zenden_1

    zenden_1

    Joined:
    May 20, 2017
    Posts:
    53
    Hello, thank's for your answer

    Qu'est-ce que tu veux dire "does it in multiple times smaller scale?
     
  4. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @Zenden944

    I have no idea - don't speak French either. But I can see the video - the point is, there is scale difference.

    If you check the video carefully, near the of the video clip, you'll see a problem with this technique, I think.