Search Unity

Discussion How to realize the effect of Magicavoxel in Unity, such as glass

Discussion in 'General Graphics' started by mcstr, Feb 11, 2023.

  1. mcstr

    mcstr

    Joined:
    Feb 4, 2016
    Posts:
    2
    I want to realize the effect of Magicavoxel with voxel in Unity, like this

    But I got the poor effect. for example, I made glass, like this

    Does anyone know what did Magicavoxel's render do? Is it related to my use of urp? How can I do it.
     

    Attached Files:

    Last edited: Feb 11, 2023
  2. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,929
    MagicaVoxel uses path tracing, and it takes quite a while to render a single frame.

    Most realtime engines -including Unity- use rasterization or (more recently) ray tracing. Unless you're willing to use HDRP w/raytracing and have moderately high rendering knowledge, you're not getting close to the quality level of offline path tracing.

    Instead, try to focus on getting realtime rendering that looks better. For instance, shadow map resolution in your screenshot is extremely low. Try decreasing max shadow cascade distance, increasing the amount of shadow cascades, and increasing shadow resolution.

    Also, you'll benefit from some antialiasing.
     
    Last edited: Feb 14, 2023
  3. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
    A shader that blurs what's behind it will go a long way in getting close to that effect