Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 logty · Aug 03, 2011 at 12:22 PM · cuberendergeneration

Rendering one side of a cube?

How do I make it so that I only render a select number of faces on a a cube and not all six?

Comment
Add comment · Show 3
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 aldonaletto · Aug 04, 2011 at 01:54 AM 0
Share

Why do you want to render only some cube sides? Do you want to render something like a box or a tunnel? Unity shaders use cull back option, which means they do not render the back sides. If you place a camera inside a cube, for instance, you will not see any face because all of them will be showing their back sides to the camera.

avatar image logty · Aug 04, 2011 at 02:00 AM 0
Share

The one problem with that is I believe that if I have a large number of cubes in a plane, then it will still render the side even if I cant see them causing extra lag

avatar image aldonaletto · Aug 04, 2011 at 02:34 AM 0
Share

Ok, your concern is about performance. Back culling is used exactly to avoid rendering invisible sides, which would be a waste of time, so you don't need to worry about this. But there are worse problems: Unity renders everything in the camera frustum - even things that are behind mountains or buildings. It becomes particularly heavy when you have a complex terrain with several mountains and valleys one after the other, or when the player is inside a building with many rooms, enemies, itens etc.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Jessy · Aug 03, 2011 at 01:59 PM

Use a square, not a cube.

Comment
Add comment · Show 5 · 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 logty · Aug 04, 2011 at 01:45 AM 0
Share

I am sorry, I dont really have any experience in this area, how would I generate just a square? does it involve creating a mesh? Thanks for the answers!

avatar image aldonaletto · Aug 04, 2011 at 02:01 AM 0
Share

You can use planes - just adjust the scale to get the desired size. But remember that cull back thing: you can only see one side of the plane - the other is invisible because it's the back side. You will need a 2 sided shader to render both sides, but these shaders don't correctly process the lights in the back side because normals are reversed.

avatar image Jessy · Aug 04, 2011 at 02:14 AM 0
Share

Yes. You need to learn to model, or have a modeler $$anonymous$$mmate, if you're going to use Unity. The default plane is not a square; either – it's 100 squares! (Better for specular highlights with vertex lighting.)

avatar image aldonaletto · Aug 04, 2011 at 02:38 AM 0
Share

He's worried about performance - using planes definitely will not be a good alternative...

avatar image Jessy · Aug 04, 2011 at 02:42 AM 1
Share

Alternative to what?

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Generate cubes in 5 areas 1 Answer

Mapping Cube to Sphere - Using 64 planes as a cube "side" 1 Answer

Generating a grid of cubes with space between. 2 Answers

Procedurally Generated Cube Mesh 3 Answers

How do I combine faces of cubes? 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