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 /
This question was closed Mar 26, 2014 at 08:52 PM by MousePods for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by MousePods · Mar 25, 2014 at 01:01 AM · optimizationdrawcallscubes

Serious Drawcall Issues

I have done a ton of research, and I thought I understood drawcalls. Obviously I don't ={

I have a wall setup this way.

alt text

It contains 4 small cubes with scale of .5,.5,.5 They have the same material and scale so they should batch!

alt text

When they are alone in the scene, they product one drawcall, perfect!

(This is 3 walls with 4 small cubes each)

alt text

Now, I copy two of those smaller cubes, unparent them, and make them a scale of 1,1,1

I have 6 drawcalls...?

alt text

Then, I move the 3 walls away from the 2 cubes I just created.

alt text

My drawcalls decrease????

What I should have in this scene are 3 drawcalls.

  1. The GUITexture (vignette)

  2. The 4 small cubes

  3. The 2 large cubes

What am I missing?

Thanks!!!

EDIT: When I put the 3 walls underneath the 2 pink cubes, the drawcalls are what their suppose to be no matter their position. What is happening ={

alt text

Comment
Add comment · Show 5
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 Gruffy · Mar 25, 2014 at 01:19 AM 0
Share

hey bud, are your gameobjects set to receive shadows or any extra lighting at all? Cheers. Gruffy

avatar image MousePods · Mar 25, 2014 at 01:20 AM 0
Share

Nope, I already turned off cast / receive shadow.

This is the shader I am using.

 Shader "VertexColor" {
 Properties {
     _Color ("$$anonymous$$ain Color", Color) = (1,1,1,1)
 }
 
 SubShader {
 
        Tags {Queue=Transparent}
        Blend SrcAlpha One$$anonymous$$inusSrcAlpha 
     
     
     Pass 
     {
         Color$$anonymous$$aterial Emission
     }
 }
 
 Fallback "VertexLit", 1
 }

This is really frustrating, and I appreciate your response! I just don't understand how it can increase in drawcalls as the 3 walls gets closer to those 2 pink cubes.

avatar image Gruffy · Mar 25, 2014 at 01:46 AM 0
Share

I see.... could you pack this up into a package, zip it up and upload it here. i will take a look. I think max package size is 512kb and I always seem to have to zip anything I upload here to get it accepted (seems odd tom e that u cant upload a .package, but then it may just be me)

avatar image supernat · Mar 25, 2014 at 01:57 AM 0
Share

Are you doing any level of detail stuff? It just seems odd that the vertex count went down in the last image you posted. Actually, it all seems odd. Is occlusion culling enabled? The last image looks orthographic on the top cubes. $$anonymous$$aybe the back cubes are being culled out.

avatar image MousePods · Mar 25, 2014 at 02:26 AM 0
Share

@Gruffy Thanks for the help! I took out all the plugins (rotorz, 2D toolkit) and got it down to bare bones. It still is not working. Here is the unitypackage. Dropbox

Thanks again!

@supernat

  1. The last image is putting the walls on a lower z.

  2. Also, I am not doing any level details.

  3. Yes, occlusion culling is enabled.

  4. All I am using is vertex color with the same material. In those images, the only two scales I have are .5,.5,.5 and 1,1,1

Thanks for your help!

1 Reply

  • Sort: 
avatar image
0
Best Answer

Answer by MousePods · Mar 26, 2014 at 08:52 PM

Future Readers:

I got the answer from the helpful people over at Rotorz Tile System! (which, btw, you should check out! Their system is simply amazing!)

The Issue: Multiple scales will break the dynamic batching.

The Solution: Generate a mesh in unity and save it using AssetDatabase. Then you have a scale of 1,1,1 but its really at another size.

If you want this code, just pm me.

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

Follow this Question

Answers Answers and Comments

22 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

Related Questions

Why is the CPU usage so high? 1 Answer

Is there a way to merge multiple identical animated models? 0 Answers

Instantiated object material colors 1 Answer

Does using point lights stop dynamic batching? 1 Answer

Why isn't batching working? 5000+ Drawcalls 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