Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question How to have inside of model also rendered?

Discussion in 'General Graphics' started by Bender_R, Aug 8, 2023.

  1. Bender_R

    Bender_R

    Joined:
    May 21, 2018
    Posts:
    79
    Hi,

    I have a (common?) issue with a model that has an outside and an inside. Only outside is rendering well.

    I found different posts on this issue, caused by backface culling. But I can't figure out how to fix this for my model. Is there any setting to set this backface culling off? Or can I use another rendering pipeline?

    Can anyone point me in the right direction?

    Outside: https://ibb.co/jy0r5bW
    Inside: https://ibb.co/CshRTB8

    Thanks!!

    - Bender
     
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,672
    Put
    Cull Off
    into your shader (In desired
    Pass
    shader block). And don't forget for proper normals for back faces (for example by usign VFACE for inverting normals on back faces).
    If you using URP Lit(SimpleLit) shader you can set
    Render Face
    property on material to
    Both
    .
     
    Lars-Steenhoff likes this.
  3. Bender_R

    Bender_R

    Joined:
    May 21, 2018
    Posts:
    79
    Hi @eizenhorn , thanks for your very fast response!! I've been trying to achieve this option, but don't know how to edit the shader. As a developer I don't have much experience with graphics. I do have an option where I can compile and edit the shader, but after saving nothing seems to happen.

    Do you maybe have a screenshot or a link to an instruction?

    Thanks!!
     
  4. Deatonjc

    Deatonjc

    Joined:
    Apr 22, 2017
    Posts:
    25
    Depends on what shader you use but under shader settings

    Urp: surface type> render face > both
    Hdrp: it says 'two sided' check the box
     
  5. Bender_R

    Bender_R

    Joined:
    May 21, 2018
    Posts:
    79
    I noticed these options for URP and HDRP. I use standard RP, which doesn't have these options.
     
  6. Bender_R

    Bender_R

    Joined:
    May 21, 2018
    Posts:
    79
    @Deatonjc Ok, just for testing I converted my project to URP. Now I can change the setting to render 'Both'. But now the inside has the same look as the outside. Is there a setting to preserve the settings of the original Blender model?
     
  7. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    For that case, it's better to duplicate the geometry in Blender and flip the normals. Just disabling backface culling in Unity can have unexpected results with shading and lighting.

    https://www.katsbits.com/codex/flip-normals/
     
    nasos_333 likes this.
  8. Bender_R

    Bender_R

    Joined:
    May 21, 2018
    Posts:
    79
    Pff, not sure how to do that since I'm no Blender expert :-( Will try to contact the creator. Otherwise I'll check Fiverrr ;-) Thanks for your help anyways!

    - Bender
     
  9. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,034
    Depends on pipeline, best way to control it is use two passes, one cull front and one back

    But URP does not support that, but can use two materials on same mesh ignoring the warnings.

    Using just cull off may or may not work, depending on lot of factors and visual expectation.
     
  10. Bender_R

    Bender_R

    Joined:
    May 21, 2018
    Posts:
    79
    Thanks. Asked for a fix on Blender end.