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 Kwayzie · Aug 19, 2013 at 02:40 AM · importsee through

how can i make this house not invisible from the inside?

so when i import my house into unity i looks fine from the outside but when i walk in it i can see through everything. i want to not be able to do this in the game. i want to be able to walk up to the house and open the door and walk around the house. i know that as a poly it only renders one side of it and i just found this out. so i dont want to start the house all over. is there any way to fix this? im using 3ds max

http://i1303.photobucket.com/albums/ag156/nova00971/inside_zps9915789e.jpg this is the inside view

house.jpg (391.9 kB)
outside.jpg (317.2 kB)
Comment
Add comment
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

4 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Adamcbrz · Aug 19, 2013 at 04:12 AM

There is two options you can do.

1) find a shader that doesn't has cull both. Here is a forum post that might help, http://forum.unity3d.com/threads/136231-mobile-2-sided-diffuse-shader?p=924526&viewfull=1#post924526

2) return to 3d max duplicate the polys and reverse the normals.

Comment
Add comment · Show 3 · 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 Kwayzie · Aug 19, 2013 at 05:09 AM 0
Share

well since im still new to the whole scripting thing and only know how to write one to turn the flashlight on and off i went with choice 2 since that seemed easier. i was able to make cuts and extrude those cuts to make a wall and reversed the normal and seems to work fine now! thanks! :)

avatar image DaveA · Aug 19, 2013 at 05:13 AM 0
Share

Don't use Answer unless you are actually answering. Use comment. And if this is the correct answer, please mark it answered by clicking on the checkmark

avatar image CodeAssembler · Aug 19, 2013 at 06:46 PM 0
Share

Ups.. didn't noticed you answer right first Adamcbrz. I guess I was slow typing :)

avatar image
2

Answer by DaveA · Aug 19, 2013 at 05:15 AM

You can use this script. Put it in a js file in an Editor folder under Assets:

 @MenuItem("GameObject/Flip Mesh", false, 4) 
 static function FlipMesh() 
 { 
     Undo.RegisterSceneUndo ("Flip Mesh");
     var trs = Selection.GetTransforms (SelectionMode.Deep);
     for (var tr in trs) 
     {
         var r : MeshFilter = tr.gameObject.GetComponent.<MeshFilter>();
         if (r)
         {
             var m : Mesh = r.sharedMesh;
             if (m)
             {
                 var tris : int[] = m.triangles;
                 for (var i : int = 0; i< tris.Length; i+= 3)
                 {
                     var t : int = tris[i];
                     tris[i] = tris[i+1];
                     tris[i+1] = t;
                 }
                 m.triangles = tris;
             }
         }
     } 
 } 
 
 @MenuItem("GameObject/Double-side Mesh", false, 4) 
 static function DoubleSideMesh() 
 { 
     Undo.RegisterSceneUndo ("Double-side Mesh");
     var trs = Selection.GetTransforms (SelectionMode.Deep);
     for (var tr in trs) 
     {
         var r : MeshFilter = tr.gameObject.GetComponent.<MeshFilter>();
         if (r)
         {
             var m : Mesh = r.sharedMesh;
             if (m)
             {
                 var tris : int[] = m.triangles;
                 var tris2 : int[] = new int[tris.Length*2];
                 for (var i : int = 0; i< tris.Length; i++)
                     tris2[i] = tris[i];
                 for (i = 0; i< tris.Length; i+=3)
                 {
                     tris2[i+tris.Length] = tris[i+1];
                     tris2[i+tris.Length+1] = tris[i];
                     tris2[i+tris.Length+2] = tris[i+2];
                 }
                 m.triangles = tris2;
             }
         }
     } 
 } 
Comment
Add comment · Show 1 · 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 CodeAssembler · Aug 19, 2013 at 06:38 PM 0
Share

Thanks for this code DaveA, really interesting...

avatar image
0

Answer by CodeAssembler · Aug 19, 2013 at 04:18 AM

Unfortunately no. If you want to fix that you then have to use a custom shader or something that renders 'double sided' on purpose instead of just 'reacting' to the polygon normals like Unity render usually does.

So if you don't use such a custom shader, then the only option would be to 'fix' the normals in 3ds max (in your case) and make sure you do use a Cube mesh instead of a plane so it can have normals both sides or just duplicate the plane and flip it and use on plane per side with the normal facing 'to the camera'.

Here is a link for a discussion on the subject of the double side shader:

http://answers.unity3d.com/questions/187630/writing-a-double-sided-shader-how-to-reverse-the-n.html

I hope this helps

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 meat5000 · Aug 19, 2013 at 06:50 PM

In 3DS, make it a solid object with separate inner walls to outer walls. The normals will work automatically. In blender you can do this through an operation 'solidify', don't know about 3DS, might require some work but less than implementing shaders if you are well versed in modelling.

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

19 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

Related Questions

Adding a new mesh to a prefab from it's blend file 0 Answers

Can't import assets 7 Answers

Common ingame 3D Model import for players 0 Answers

Integration of InMobi with HeyZap Mediation 1 Answer

Is it possible to make a model in a program then import it to unity make a terrain and place the thing/building on the terrain and export the whole thing BUT then import it into Skyrim? 0 Answers


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