Toggle navigation
Polycount
News
Forums
Patreon
Challenges
Quarterly Character Art Challenge
Bi-Monthly Environment Art Challenge
Wiki
Moar
Recent
Activity
Badges
Drafts
Store
Sign In
·
Register
Author:
rajkumar143
Home
›
Unity
Inside the Object
mountains
polycounter lvl 11
Offline /
Send Message
mountains
polycounter lvl 11
Mar 2013
My main camera inside (the object) / sphere
Game mode : I would like to see the object (sphere) but nothing... don't see. only blue and terrain..
Why ? how do... fix.
thank you.
0
·
Share on Facebook
Share on Twitter
Screen Shot 2013-03-25 at 11.00.02 AM.png
0B
Screen Shot 2013-03-25 at 11.00.20 AM.jpg
0B
Replies
Offline /
Send Message
Farfarer
Mar 2013
The normals are facing outwards, so they're being culled.
Most reliable method is to flip the normals in your 3D app.
But you can also edit the shader to have Cull Front rather than the default Cull Back.
http://docs.unity3d.com/Documentation/Components/SL-CullAndDepth.html
0
·
Share on Facebook
Share on Twitter
Offline /
Send Message
mountains
polycounter lvl 11
Mar 2013
Thank you for explanation and link
A code example works ?
This object will render only the backfaces of an object:
Shader "Show Insides" {
SubShader {
Pass {
Material {
Diffuse (1,1,1,1)
}
Lighting On
Cull Front
}
}
}
0
·
Share on Facebook
Share on Twitter
Offline /
Send Message
Farfarer
Mar 2013
Yes, that's correct. The Cull Front goes inside the Pass block.
SubShader { Pass { Lighting On Cull Front Material { Diffuse (1,1,1,1) } } }
0
·
Share on Facebook
Share on Twitter
Offline /
Send Message
mountains
polycounter lvl 11
Mar 2013
I have tried many ... but gives an error. :O
Create › Shader ?
0
·
Share on Facebook
Share on Twitter
Offline /
Send Message
Farfarer
Mar 2013
Well, what's the error? Can you post your shader code up?
0
·
Share on Facebook
Share on Twitter
Offline /
Send Message
mountains
polycounter lvl 11
Mar 2013
Problem solved
Thank you very much.
0
·
Share on Facebook
Share on Twitter
Sign In
or
Register
to comment.
Replies
Most reliable method is to flip the normals in your 3D app.
But you can also edit the shader to have Cull Front rather than the default Cull Back. http://docs.unity3d.com/Documentation/Components/SL-CullAndDepth.html
A code example works ?
This object will render only the backfaces of an object:
Shader "Show Insides" {
SubShader {
Pass {
Material {
Diffuse (1,1,1,1)
}
Lighting On
Cull Front
}
}
}
Create › Shader ?
Thank you very much.