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 Exalia · Nov 14, 2013 at 12:22 PM · apitoggleopengltrianglesgles

Why is Unity using GL_TRIANGLES not GL_TRIANGLE_STRIP?

Just curious why this is or if there is a way to change this.

Thanks :)

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by aldonaletto · Nov 19, 2013 at 06:00 PM

I kind of agree with @Mefistofel: it's hard to organize complex meshes in triangle strips or fans, what makes simple triangles a better choice. Besides this, modern shaders usually spend much more cycles in fragment programs than processing vertices (this may not be true for a complex model at a long distance, but as said above complex models are hard to convert to strips/fans). By the time OpenGL was created, the available hardware barely could process vertices at decent frame rate, thus optimizations like triangle strips or fans could make a big difference, but with modern GPUs things changed so much that there's a trend towards vertex proliferation via tessellation shaders.

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 Exalia · Nov 20, 2013 at 10:14 AM 0
Share

So if I've optimised my own mesh for strips I still can't use strips?

EDIT : I'm using mobile GPUs just FYI so I would like my character mesh to use TRIANGLE_STRIP along with transform feedback

avatar image aldonaletto · Nov 20, 2013 at 05:42 PM 1
Share

I've not found many details about how Unity renders meshes, but it seems that in the past you could define the mesh topology as $$anonymous$$eshTopology.TriangleStrip and pass the strips via SetIndices, but this isn't available anymore. Take a look at this post in the forums - it seems that a non-documented function may help you (if it yet exists in Unity 4.x, of course).

avatar image
0

Answer by Mefistofel · Nov 14, 2013 at 05:47 PM

Triangle strips are not used for three unique vertices(as usual triangle), they use one unical and two previous vertices from previous triangle. To use this, you need collect special vertex arrays. They have a limited ways to use, such as to render the landscape (it is necessary to transfer less points - more polygons can be rendered). For usual purposes such mode is not suitable.

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 Exalia · Nov 14, 2013 at 07:40 PM 0
Share

... Sorry if this sounds rude but I asked why this is and is there a way to change it, I know (probably too much) what the two functions do haha

but thanks

Also I don't think I've ever seen someone say that triangles is usually more suitable than strips. :\

EDIT : Strips uses less vertices and therefore less processing by vertex shader is the reason strips are usually better than triangles and why fan is better than strip.

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

18 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

Related Questions

Switching Graphics API Through a Launcher 0 Answers

how to turn a GUI toggle on/off from a script 1 Answer

Turn off Precompiled Shaders? 0 Answers

How Resolution Independence is Working 1 Answer

How to render OES Texture in Unity 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