• 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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by Finity · Aug 04, 2013 at 04:15 PM · planecullingcloth

How to render both sides of a cloth?

I am making a flag which is affected by wind force.

I currently can only see one side of the InteractiveCloth object. I understand that I need to use 2 planes. But isn't there an efficient way to do this? Otherwise, won't it calculate cloth physics for both of the planes?

Comment
Add comment · Show 4
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 robertbu · Aug 04, 2013 at 04:33 PM 0
Share

If culling is turned off, then the shader will display both sides. This is a simple, one line change you can make in the source of shaders. Just add/change "Cull Off" as the first line of a Pass.

avatar image Finity · Aug 04, 2013 at 04:38 PM 0
Share

I don't want to turn off culling as the lighting will be wrong on the back side. Is there any other way?

avatar image robertbu · Aug 04, 2013 at 05:29 PM 0
Share

You can use a shader that does two passes, one for each side.

avatar image RalphTrickey · Aug 04, 2013 at 06:11 PM 0
Share

Can you use that shared mesh in two materials, one affected by physics and one not, and set the culling of the back face to the other winding?

Seems like it should work, but I don't know enough to be sure.

3 Replies

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

Answer by Jonny-Roy · Aug 04, 2013 at 07:15 PM

I did this recently, for best results, duplicate your faces either in your 3d editing environment or via a script and flip the normals. Just turning culling off with screw up your lighting (as the lighting uses the normals and they will face the wrong way) and if you create a 2 pass shader you will end up with un-needed extra draw calls.

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 Finity · Aug 04, 2013 at 07:52 PM 0
Share

every face will be affected by the cloth collisions separately and it won't be realistic when some part of the flag wraps around because of the wind's speed and direction. There should be a way to stuck InteractiveCloth between 2 planes and group those planes as 1 so InteractiveCloth can deform and transform vertexes correctly. Can't this be done?

avatar image Jonny-Roy · Aug 04, 2013 at 09:08 PM 0
Share

You are only going to duplicate the faces, so each face on the opposite side would share the same Vertices. As the InteractiveCloth updates the Vertices not the Faces, it will act correctly.

avatar image
0

Answer by DanJa512 · Dec 21, 2015 at 05:37 PM

Just to document -- having tried just about everything in Unity 5.3, duplicating the geometry has been the closest solution, though both sides are simulated separately leading to "rogue edges" being seen from the other side.

The solution Jonny Roy suggested does NOT work in 5.3 because Unity seems to simulate the cloth based on its normals -- this is what the "surface penetration" value represents, how far negative to resting position the cloth is allowed to move (opposite normal direction), while "max distance" represents maximum distance negative OR positive resting position the node is allowed to move.

Please correct me if I'm misled.

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 MadAce · Jan 27, 2016 at 06:54 PM 0
Share

Let's see...

You cannot just duplicate the mesh with normals pointing the other way because then you'll just get 2 separate cloths simulated.


And you cannot have 2 faces to share the same vertices. That's just impossible.


And If you do use Culling Off then you'll get wrong lighting on one side.

So, there's no solution?

avatar image
0

Answer by pmurph03 · Feb 14, 2016 at 08:06 AM

Looking into this myself I discovered the only thing that worked for me was instead of using a plane, using a very thin box as the cloth instead to display two sides properly.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

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

A node in a childnode? 1 Answer

skinned cloth a new mesh or alter a preexisting mesh? 1 Answer

How can I make grid tiles/plane transparent 1 Answer

Unity Backface Culling 3 Answers

Unity object: Plane render both sides, possible? 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