Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by JoshMBeyer · Mar 21, 2014 at 08:46 AM · blenderissueglitchto

Blender to Unity glitch?

So, I was modeling a city in blender. I made the ground(Grass, street, sidewalk, etc) worked just fine. No problems.(Using the same process, model, UVSmartPrpject, save blend, export .fbx, export UV, then import the textures to unity and apply textures to the mats). Well this time, i am having a strange glitch to where if I look through the door, or window I will see clear through the walls from inside the building. But if i walk around to the other side, it solid and rendering the walls? What might the issue here be?

Here are example photo's of the issue i am speaking of.

alt text

exm01.png (392.4 kB)
exm02.png (339.2 kB)
Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image pafla · Mar 21, 2014 at 09:29 AM 0
Share

Check your normals. Looks like the normals of the interior faces of the wall are pointing in the wrong direction (i.e. outward), resulting in the faces being culled.

avatar image Gruffy · Mar 21, 2014 at 10:26 AM 0
Share

Hey Josh, I just answered your question with a couple of (maybe to you) valuable bits of info when using Blender with Unity. take care bud. Gruffy

3 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Gruffy · Mar 21, 2014 at 09:51 AM

Unity only supports single sided meshes (meaning a texture will show up on one side and be culled on the other)** **Sorry this above is wrong on my part and Unity does indeed support the removal of back face culling, check out @whydoidoit s comment below. He is correct and if you only wish to see the same texture on the inside you should add the shader code to your project and then change your current model material to use it.*** Gruffy Basically, you may have to duplicate your mesh with normals reversed in Blender (UV Editing mode-> Select all objects you want to have for inside areas and on the left hand panel of the right hand side window, you should see a tab that says"Flip Direction" and "Recalculate") You should press flip direction, then recalculate, then export. The place your original model and your flipped version together (maybe having to shrink by a tiny amount the interior version to make it fit inside with artifact-ing) The other way is to build both walls into a single model inside blender and separate out the uvs (doing the flip directions & recalculations on the mesh faces inside the building) This would be like placing two planes together, ensuring their normals are both facing outwards, to make a wall and texture both sides separately, but as a model in Unity treating it as one)

Overall, this later option (correctly model both inside and outside through blender and export a correct UV mutliple texture set (inside and outside normals set to corresponding mesh faces))

BTW, Unity import double the amount of verts on every model to create the normals for the model (this is handy to know as it would point out that just duplicating the model and flipping normals, as indicated in first suggestion would increase your model vert count threefold) Do the latter suggestion as this will ultimately produce a more effective model for Unity to use. Take care and any questions where I can, I will help with. Here is a Youtube link, to your initial problem anyway. Blender to Unity Gruffy Edit: here is another handy tip... in blender, when in the model window, press the "N" key and find the "Display" tab. In there, scroll down until you find the "Backface Culling" checkbox. Check that, you will now see what Unity sees when creating your models. To prove this, once checked, go to your model and select all ("A" on keyboard), the look on left panel for Normals: Flip Direction and Recalculate - proceed with both, lookk at your model it should now look inside out. reverse flip dir and recalc to return the other way.

Step by step from the beginning: Open Blender new file. Select the cube in "Object mode", press "tab" to go to "Edit mode". Press keyboard key "A" to select all. press "N" keyboard key to get mesh control panel up. look down panel until you find "BackFace Culling" (found under "Mesh Display" tab). Check "backface culling" checkbox. Go to Mesh Tools panel and find "Normals" tab, click "Flip Direction". Click "Recaculate (just to be sure). Look at your Cube Now! Reverse last two steps to return normals to outer faces. ope that little tip helps, it changed my workflow in minutes knowing this. Take Care Gruffy

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image whydoidoit · Mar 21, 2014 at 10:30 AM 0
Share

Unity only supports single sided meshes (meaning a texture will show up on one side and be culled on the other)

This isn't true. The default shaders mostly only support front faces but it is simple to create ones that also draw inside faces.

This would do it:

 Shader "Custom/TwoSide" {
 
     Properties {
 
         _$$anonymous$$ainTex ("Base (RGB)", 2D) = "white" {}
 
     }
 
     SubShader {
 
         Tags { "RenderType"="Opaque" }
 
         Cull Off
 
         LOD 200
 
         
 
         CGPROGRA$$anonymous$$
 
         #pragma surface surf Lambert
 
  
 
         sampler2D _$$anonymous$$ainTex;
 
  
 
         struct Input {
 
             float2 uv_$$anonymous$$ainTex;
 
         };
 
  
 
         void surf(Input IN, inout SurfaceOutput o) {
 
             half4 c = tex2D(_$$anonymous$$ainTex, IN.uv_$$anonymous$$ainTex);
 
             o.Albedo = c.rgb;
 
             o.Alpha = c.a;
 
         }
 
         ENDCG
 
     } 
 
     FallBack "Diffuse"
 
 }
avatar image Gruffy · Mar 21, 2014 at 10:59 AM 0
Share

ah yes,didnt even think about "Cull Off". I will edit my answer and comment on that bit about not being capable of handling it (stupid comment - my bad).

avatar image
0

Answer by MrScrumbles001 · Mar 21, 2014 at 10:25 AM

Your texture will only draw on the face with the normals facing out. If you want to be able to see inside the building you will have to use the solidify modifier in blender on the object so that it has an outward facing normal on the inside also.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by JoshMBeyer · Mar 21, 2014 at 02:21 PM

I used the Solidify modifier on the walls that were not rendering, and now everything is rendering properly. Thanks for the help

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

24 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Weird Blender camera animation issue 2 Answers

Parts of a model won't texture 1 Answer

A node in a childnode? 1 Answer

Part of a model is visible while the rest is invisible. Glitch? 2 Answers

Multiple transparency shaders yields a massive Unity glitch. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges