How to see a sphere from inside it

I know this was questioned LOTS of times, but i couldn’t find an answer for it. Most of the scripts that people made to correct this are outdated, the tutorials don’t work anymore, and i couldn’t find any shader that could do that or something…

Look at the image below:
78358-howto.png

I made a transparent sphere, and i wanted to put it in the first person character’s camera, so it would fit like a helmet or something. The Player can see it when it is far from it, like in the image. But when i put the sphere in the camera, to look like a helmet, the Player doesn’t have the “glass” effect. I wanted the player to actually SEE AND FEEL that his head is inside a glass bubble\helmet.

The problem is that i can’t get it to work! I already reduced the clipping of the camera, but it still doesn’t work. It is the same problem that occurs with water, as it is just a plane, and you can’t see it when you are UNDER it. Do someone have an updated answer for this? Something that would make the player see the sphere from insidet it without changing it’s appearence.

I have a Double Face script but it doesn’t do anything, so i will not post it in here. I would appreciate if anyone could help me. I think Unity should make this an option, you know? Make an asset with some scripts, and one like this included. Like, something with a public variable wich you could turn ON or OFF the “see from inside”.

Your gonna want to make a sphere with the normals inverted. The normals are the direction of the quads on your object. To see them the normal must be pointed at you, if you flip them you can flip the object and still see the sphere.
If you have blender you can invert a sphere quite simply (if you don’t its free so you should get it, it can do almost anything). Go into edit mode (tab) > select all faces (a) (make sure they all light up, you may have to press this a few times) > press w > then select flip normals. And boom your good.

If you don’t have blender and want to do it in Unity there are a few ways of doing it. You can use a script to create a sphere with inverted normals, something like this. Or you could turn off culling (its recommended you don’t as it is a huge performance hit) but it will render both sides, if you want to do this then go ahead, it should be your last resort though.

If you have any questions feel free to ask. Hope this helps!

Seeing as this question is the first link you find in google I figured I would post a solution.

Just add this script to the object you want to see from the inside. It reverses normals of the mesh on Start so you have to press “Play” to see the effect. The side effect is that you don’t see the object from the outside now, but if you need that just duplicate your object and place it in the same spot.

Instead of flipping normal back and forth, you can simply give the object (that you want to be visible from the inside) a shader with culling turned off. I have seen no ‘performance hit’. You can add “Cull Off” to the sub-shader section of any shader, here is the Standard Shader with Cull Off, it should work with Unity 5, but doesn’t seem to compile with Unity 2018:
//Save as StandardCullOFF.shader
Shader “StandardCullOFF”
{
Properties
{
_Color(“Color”, Color) = (1,1,1,1)
_MainTex(“Albedo”, 2D) = “white” {}

	_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5

	_Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5
	_GlossMapScale("Smoothness Scale", Range(0.0, 1.0)) = 1.0
	[Enum(Metallic Alpha,0,Albedo Alpha,1)] _SmoothnessTextureChannel ("Smoothness texture channel", Float) = 0

	[Gamma] _Metallic("Metallic", Range(0.0, 1.0)) = 0.0
	_MetallicGlossMap("Metallic", 2D) = "white" {}

	[ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0
	[ToggleOff] _GlossyReflections("Glossy Reflections", Float) = 1.0

	_BumpScale("Scale", Float) = 1.0
	_BumpMap("Normal Map", 2D) = "bump" {}

	_Parallax ("Height Scale", Range (0.005, 0.08)) = 0.02
	_ParallaxMap ("Height Map", 2D) = "black" {}

	_OcclusionStrength("Strength", Range(0.0, 1.0)) = 1.0
	_OcclusionMap("Occlusion", 2D) = "white" {}

	_EmissionColor("Color", Color) = (0,0,0)
	_EmissionMap("Emission", 2D) = "white" {}
	
	_DetailMask("Detail Mask", 2D) = "white" {}

	_DetailAlbedoMap("Detail Albedo x2", 2D) = "grey" {}
	_DetailNormalMapScale("Scale", Float) = 1.0
	_DetailNormalMap("Normal Map", 2D) = "bump" {}

	[Enum(UV0,0,UV1,1)] _UVSec ("UV Set for secondary textures", Float) = 0

	// Blending state
	 _Mode ("__mode", Float) = 0.0
	 _SrcBlend ("__src", Float) = 1.0
	 _DstBlend ("__dst", Float) = 0.0
	 _ZWrite ("__zw", Float) = 1.0
}

CGINCLUDE
	#define UNITY_SETUP_BRDF_INPUT MetallicSetup
ENDCG

SubShader
{
	Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }
	LOD 300


	// ------------------------------------------------------------------
	//  Base forward pass (directional light, emission, lightmaps, ...)
	Pass
	{
		
		Name "FORWARD" 
		Tags { "LightMode" = "ForwardBase" }

		Blend [_SrcBlend] [_DstBlend]
		ZWrite [_ZWrite]
		Cull Off

		CGPROGRAM
		#pragma target 3.0

		// -------------------------------------

		#pragma shader_feature _NORMALMAP
		#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
		#pragma shader_feature _EMISSION
		#pragma shader_feature _METALLICGLOSSMAP
		#pragma shader_feature ___ _DETAIL_MULX2
		#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
		#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
		#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
		#pragma shader_feature _PARALLAXMAP

		#pragma multi_compile_fwdbase
		#pragma multi_compile_fog

		#pragma vertex vertBase
		#pragma fragment fragBase
		#include "UnityStandardCoreForward.cginc"

		ENDCG
	}
	// ------------------------------------------------------------------
	//  Additive forward pass (one light per pass)
	Pass
	{
		Name "FORWARD_DELTA"
		Tags { "LightMode" = "ForwardAdd" }
		Blend [_SrcBlend] One
		Fog { Color (0,0,0,0) } // in additive pass fog should be black
		ZWrite Off
		ZTest LEqual

		CGPROGRAM
		#pragma target 3.0

		// -------------------------------------

		#pragma shader_feature _NORMALMAP
		#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
		#pragma shader_feature _METALLICGLOSSMAP
		#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
		#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
		#pragma shader_feature ___ _DETAIL_MULX2
		#pragma shader_feature _PARALLAXMAP

		#pragma multi_compile_fwdadd_fullshadows
		#pragma multi_compile_fog

		#pragma vertex vertAdd
		#pragma fragment fragAdd
		#include "UnityStandardCoreForward.cginc"

		ENDCG
	}
	// ------------------------------------------------------------------
	//  Shadow rendering pass
	Pass {
		Name "ShadowCaster"
		Tags { "LightMode" = "ShadowCaster" }

		ZWrite On ZTest LEqual

		CGPROGRAM
		#pragma target 3.0

		// -------------------------------------

		#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
		#pragma shader_feature _METALLICGLOSSMAP
		#pragma shader_feature _PARALLAXMAP
		#pragma multi_compile_shadowcaster

		#pragma vertex vertShadowCaster
		#pragma fragment fragShadowCaster

		#include "UnityStandardShadow.cginc"

		ENDCG
	}
	// ------------------------------------------------------------------
	//  Deferred pass
	Pass
	{
		Name "DEFERRED"
		Tags { "LightMode" = "Deferred" }

		CGPROGRAM
		#pragma target 3.0
		#pragma exclude_renderers nomrt

		// -------------------------------------

		#pragma shader_feature _NORMALMAP
		#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
		#pragma shader_feature _EMISSION
		#pragma shader_feature _METALLICGLOSSMAP
		#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
		#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
		#pragma shader_feature ___ _DETAIL_MULX2
		#pragma shader_feature _PARALLAXMAP

		#pragma multi_compile ___ UNITY_HDR_ON
		#pragma multi_compile ___ LIGHTMAP_ON
		#pragma multi_compile ___ DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE
		#pragma multi_compile ___ DYNAMICLIGHTMAP_ON

		#pragma vertex vertDeferred
		#pragma fragment fragDeferred

		#include "UnityStandardCore.cginc"

		ENDCG
	}

	// ------------------------------------------------------------------
	// Extracts information for lightmapping, GI (emission, albedo, ...)
	// This pass it not used during regular rendering.
	Pass
	{
		Name "META" 
		Tags { "LightMode"="Meta" }

		Cull Off

		CGPROGRAM
		#pragma vertex vert_meta
		#pragma fragment frag_meta

		#pragma shader_feature _EMISSION
		#pragma shader_feature _METALLICGLOSSMAP
		#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
		#pragma shader_feature ___ _DETAIL_MULX2

		#include "UnityStandardMeta.cginc"
		ENDCG
	}
}

SubShader
{
	Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }
	LOD 150

	// ------------------------------------------------------------------
	//  Base forward pass (directional light, emission, lightmaps, ...)
	Pass
	{
		Name "FORWARD" 
		Tags { "LightMode" = "ForwardBase" }

		Blend [_SrcBlend] [_DstBlend]
		ZWrite [_ZWrite]

		CGPROGRAM
		#pragma target 2.0
		
		#pragma shader_feature _NORMALMAP
		#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
		#pragma shader_feature _EMISSION 
		#pragma shader_feature _METALLICGLOSSMAP 
		#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
		#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
		#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
		// SM2.0: NOT SUPPORTED shader_feature ___ _DETAIL_MULX2
		// SM2.0: NOT SUPPORTED shader_feature _PARALLAXMAP

		#pragma skip_variants SHADOWS_SOFT DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE

		#pragma multi_compile_fwdbase
		#pragma multi_compile_fog

		#pragma vertex vertBase
		#pragma fragment fragBase
		#include "UnityStandardCoreForward.cginc"

		ENDCG
	}
	// ------------------------------------------------------------------
	//  Additive forward pass (one light per pass)
	Pass
	{
		Name "FORWARD_DELTA"
		Tags { "LightMode" = "ForwardAdd" }
		Blend [_SrcBlend] One
		Fog { Color (0,0,0,0) } // in additive pass fog should be black
		ZWrite Off
		ZTest LEqual
		
		CGPROGRAM
		#pragma target 2.0

		#pragma shader_feature _NORMALMAP
		#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
		#pragma shader_feature _METALLICGLOSSMAP
		#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
		#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
		#pragma shader_feature ___ _DETAIL_MULX2
		// SM2.0: NOT SUPPORTED shader_feature _PARALLAXMAP
		#pragma skip_variants SHADOWS_SOFT
		
		#pragma multi_compile_fwdadd_fullshadows
		#pragma multi_compile_fog
		
		#pragma vertex vertAdd
		#pragma fragment fragAdd
		#include "UnityStandardCoreForward.cginc"

		ENDCG
	}
	// ------------------------------------------------------------------
	//  Shadow rendering pass
	Pass {
		Name "ShadowCaster"
		Tags { "LightMode" = "ShadowCaster" }
		
		ZWrite On ZTest LEqual

		CGPROGRAM
		#pragma target 2.0

		#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
		#pragma shader_feature _METALLICGLOSSMAP
		#pragma skip_variants SHADOWS_SOFT
		#pragma multi_compile_shadowcaster

		#pragma vertex vertShadowCaster
		#pragma fragment fragShadowCaster

		#include "UnityStandardShadow.cginc"

		ENDCG
	}

	// ------------------------------------------------------------------
	// Extracts information for lightmapping, GI (emission, albedo, ...)
	// This pass it not used during regular rendering.
	Pass
	{
		Name "META" 
		Tags { "LightMode"="Meta" }

		Cull Off

		CGPROGRAM
		#pragma vertex vert_meta
		#pragma fragment frag_meta

		#pragma shader_feature _EMISSION
		#pragma shader_feature _METALLICGLOSSMAP
		#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
		#pragma shader_feature ___ _DETAIL_MULX2

		#include "UnityStandardMeta.cginc"
		ENDCG
	}
}

FallBack "VertexLit"
CustomEditor "StandardShaderGUI"

}

I made it! I used my double-face script with another one and now it is finished! Finally! My space exploration game is finally going to happen! (No, it will not be as No Man’s Lie).

With my character you can now feel that you are really in a space suit. Combined with the breathing sound and some effects, the player now really feel that he is in a true space journey!

Unfortunately none of the answers were right, but i still thank you guys for trying =)
I am also going to give some points to @RavenOfCode , you helped a lot ^.^