Search Unity

There's no way to make a 3d skybox in URP Fight Me...

Discussion in 'Universal Render Pipeline' started by transporter_gate_studios, May 21, 2021.

  1. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    219
    There's no way to make a 3d skybox in URP.

    My statement stands until someone can disprove it.
     
  2. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    219
    im willing to pay someone for a solution at this point...


    i've tried camera stacking, custom render passes, separate forward renderers i can't figure it out.

    I can't get a layermask to render on the skybox and not affect post processing. Initially i thought, put the skybox stuff on a base camera and everything else in the scene on an overlay camera. That works but breaks all depth information going to my scene materials. No water, no transparency.

    i now have the skybox meshes on the overlay cam but cannot figure out how to get it to render behind the base cam meshes.

    I have a custom renderpass setup and coded in the DrawMeshes function with the layermask and it does absolutly nothing.

    im so frustrated because in the builtin pipeline this process would take a minute to setup.
     
  3. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
  4. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    219
    Wow I thought i understood stencils, nope. Thanks. One Issue though... How would I get my transparent materials to render in the skybox? Stencil is working but transparents are being culled.
     
  5. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    219
  6. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    219
    Unless both post and transparents work with individual camera (which is the whole point of stacking) then like i said.... this cannot be done.
     
  7. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    296
    I have one thing to add to this.

    I was able to figure out how to setup a skybox from the posted example in about 5 seconds. Setting up skyboxes with URP is a breeze

    However, It becomes much more tricky when you are doing a VR game with URP because the tracked pose driver for XR headsets can be difficult to synchronize with rotating objects, such as the spaceship in the example. The background will actually jitter considerably.

    It took me 2 hours to figure out how to get rid of this jitter:

    - Setup a parent gameobject with a script that copies the rotation of a the object you are trying to sync with (and optionally moves at a smaller scale along with that object if you want to setup parallax) using FixedUpdate.

    - Setup a child gameobject with a Tracked Pose Driver (new input system, tracking HMD- Center eye, rotation only!). The skybox camera goes on this gameobject and is the Base camera in a camera stack!

    If you simply try to copy the rotation of another tracked pose driver attached to another camera in your camera stack, there will be desyncing jitters without using the aforementioned approach.
     
  8. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    219
    Thanks but i've done all of those things. i have it working with cinemachine and other non brain cameras. That was easy to setup yes. However, overlay cameras dont render depth so transparents and depth based post does not work. it is broken.
     
  9. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    219
  10. Kyperr

    Kyperr

    Joined:
    Jul 15, 2016
    Posts:
    32
    Did you ever solve this? I opened the 3D example and literally copied it over to my current project and it still won't work. There must be some sort of configuration to get it to work. I'd use any solution at this point. I even tried render textures but it looks like S***.
     
  11. unity_4EA6FC13EF4E95E76A1B

    unity_4EA6FC13EF4E95E76A1B

    Joined:
    Jan 18, 2023
    Posts:
    3
    Ditto. Example doesn't work. I tried copy pasting both render passes and it doesnt work.