Results 1 to 17 of 17
  1. #1
    MSgt. Shooter Person
    Join Date
    Jun 2012
    Posts
    63

    Question Mobile draw calls

    Hello everyone!i am creating adventure game for ios!I have a city model with buildings etc.When i import in udk and then upload to iphone and ipad,my game is very laggy!I enter command "stat es2" and i see that i have 200-250 draw calls.I didnt do anything special for optimizing but I know that i need to reduce draw calls.On building i have 9 materials .Is it OK?Can i use in 3ds max "render to texture" to reduce number of materials??I did it but i have bad quality of my texture.
    What size of textures you suggest?1024x1024 or 2048x2048 or maybe better?
    I dont like use render to texture coz when i use "render to texture" my final one texture is very big size (around 8 mb) +medium quality
    Without using "render to texture" i have 9 textures(for 9 materials).Their size about 2.4 mb together!
    As you can see ,when i use "render to texture" i have bigger texture memory!!!
    Is texture memory important???
    Also , 2048x2048 one texture for my building looks good ONLY on PC,not on ios
    I tryed change lodgroup to "UI" and "flattened" but no differences.
    I dont use "optimize content for mobile" in udk , i know that unreal frontend can compress textures when i cook game on ios
    Maybe i need to reduce 9 materials to 2 or 3 or maybe 4?But how to do it???
    I wonder how people make the game on udk for ios with good quality of textures?

  2. #2
    Iron Guard
    Join Date
    Jan 2012
    Posts
    630

    Default

    I don't know what's the better way to work, i'n not expert, most of all about graphic, but i have a level with different villages and many buildings.
    What i did is create one material 2048x2048 with all the different textures needed by the buildings in it, but only one because in ios you should probably consider 512x512 as a reference, everything higher must be an exception.
    All the buildings have just one material, so one draw call and one lightmap. This is difficult when you do the texturing and the lightmaps (this required more than a month only working on few buildings to me, but i started from zero) but gives you low draw calls number.
    I don't know if this is a good way to work, but 9 materials per building i think is really too much.

    I have a maximum of 50 draw calls (and about 20 draw calls (UP), but what is this?).

    Are you using precomputed visibility in the level?

  3. #3
    MSgt. Shooter Person
    Join Date
    Jun 2012
    Posts
    63

    Default

    Thank you for your answer
    i have 9 textures for my building(each texture about 256x256) So i need to combine all textures together in Photoshop??
    How did you create one material 2048x2048??How?

  4. #4
    Iron Guard
    Join Date
    Jan 2012
    Posts
    630

    Default

    Don't take too seriously what i said without listening for other people's answers, i'm a developer and i just did some texturing for necessity.
    Anyway i just put all the texture in one 2048 image and then i recreated all the texturing and lightmaps, but, as i said this will keep a lot of time so don't do it without asking to someone expert before.
    Maybe in the level and design and creation section you can find more suggestions.

  5. #5
    MSgt. Shooter Person
    Join Date
    Dec 2011
    Location
    Melbourne, Australia
    Posts
    50

    Default

    Hey Nmzik,
    Ive been working with UDK and other game engines for the past 2 years now and one thing to really look out for is the draw calls, especially for mobile devices.
    Having 9 textures on 1 object is very innefficient. I am pretty sure the way UDK calls upon assets is like this:
    1 draw call for model
    1 draw call per texture file accociated with model.

    So in your case 1 model would be using up 10 draw calls.
    Also avoid using the Brush tool to place geometry in you level, as each wall with a material is considered a draw call, so 1 room could cost you 5 or more calls.

    Always aim to texture your models using the lowest texture sizes possible to increase performance. 3DS Max or Maya have ways for you to send your UV unwrap to photoshop at whatever size you specify.
    My recommendations would be to have 512x512 as your maximum resolution sizes for an iphone. And keep in mind that if your game is setup in a way which doesnt allow the player to get close to an object than use lower texture sizes for them since they will never fill the screen (use 128 or 256 res). As you get more processing power when moving to iPads, I'd reccommend uppingthe texture sizes to accommodatethose screen sizes/resolutions.

    Another thing I have found is try to include Collision boxes within your model (this is done by exporting your model with a simple mesh and naming it with a prefix. UDK documents this in their documentation under collisions).
    My first time using UDK i used a lot of trigger boxes which caused too many draw calls, but now that i have collision boxes the draw call stays at 1 since its part of the character.

    Bit confusing at first but once you figure it out your games will begin to run a lot smoother!
    Last edited by Mr Random; 08-19-2012 at 04:38 AM.

  6. #6
    MSgt. Shooter Person
    Join Date
    Jun 2012
    Posts
    63

    Default

    Thank you Mr Random
    I have two questions:1)what means "simple" mesh??Its the same as my model -just need to clone and rename it??
    2)Now i am using "use simple line collision" for all my meshes .Is it OK?(i unchecked another options)

  7. #7
    MSgt. Shooter Person
    Join Date
    Jun 2012
    Posts
    63

    Default

    But what i need to do if i have 9 materials on mesh already???I can combine in photoshop and when i set new texture in 3ds max,texture locates not in right place!I need manualy move my UV!I just want to keep my 9 textures(collapse in one)without reduce of quality

  8. #8
    Iron Guard
    Join Date
    Jan 2012
    Posts
    630

    Default

    @Mr Random Can you explain this:
    Another thing I have found is try to include Collision boxes within your model (this is done by exporting your model with a simple mesh and naming it with a prefix. UDK documents this in their documentation under collisions).
    My first time using UDK i used a lot of trigger boxes which caused too many draw calls, but now that i have collision boxes the draw call stays at 1 since its part of the character.
    Do the collisions need draw calls? I use the Simplified collision geometry (usually UBX) for the more complex models and the 6 DOP simplified for all the other.
    Does this affect processing time performance in some way? I didn't know that collisions require draw calls to be created.

    Nmzik@ Yes you have to create your texture first, then you can import it in 3d studio or whatever you use and recreate the texturing and then you need to do the lightmaps.
    Another way to reduce the draw calls number is merging meshes. For example in my villages i have fences around them, they are made placing a fence static mesh on every side, so 4 fences with one material are 4 draw calls (or 8? times ago i read in this forum that a mesh with 1 material has just one draw call, not 1 for the material and 1 for the mesh).
    I created a mesh with all the 4 walls merged and used it in the level, in this way i have 1 draw call for all the enclosure of the village.
    Last edited by Ivan84; 08-19-2012 at 06:55 AM.

  9. #9
    MSgt. Shooter Person
    Join Date
    Dec 2011
    Location
    Melbourne, Australia
    Posts
    50

    Default

    Yeh, thats what i meant
    Using the UBX prefix for collisions should not affect draw calls.
    Since you have already called upon the mesh which has that data in it

  10. #10
    Iron Guard
    Join Date
    Jan 2012
    Posts
    630

    Default

    And if i use the 6 dop collision created in automatic by the engine? Will this affects draw calls?

  11. #11
    MSgt. Shooter Person
    Join Date
    Dec 2011
    Location
    Melbourne, Australia
    Posts
    50

    Default

    hmm, that I am not 100% sure of since the engine itself is generating it. But my guess is that it will not affect the draw call since it is applying it to the model which is what is called upon.
    Just keep in mind that the simpler your meshes are for collisions the better aswell. So always try to stick to 6DOP, unless the mesh needs a more detailed collision. Even when importing your own collisions try to have as little vertices as possible.

  12. #12
    Iron Guard
    Join Date
    Jan 2012
    Posts
    630

    Default

    Thank you for the explanation.
    I'm trying to use more 6dop as possible but for some meshes i need more accuracy.

  13. #13
    MSgt. Shooter Person
    Join Date
    Mar 2010
    Location
    Germany
    Posts
    190

    Default

    hi,
    i have also a question about drawn calls so i post it here... if i have a "snow" particle effect with many little planes will it be just one drawn call of one for each plane ?

  14. #14
    MSgt. Shooter Person
    Join Date
    Dec 2011
    Location
    Melbourne, Australia
    Posts
    50

    Default

    Yes, a particle effect is 1 draw call, but they do affect performance in other ways.

  15. #15
    MSgt. Shooter Person
    Join Date
    Mar 2012
    Posts
    41

    Default

    Quote Originally Posted by Mr Random View Post
    Another thing I have found is try to include Collision boxes within your model (this is done by exporting your model with a simple mesh and naming it with a prefix. UDK documents this in their documentation under collisions).
    My first time using UDK i used a lot of trigger boxes which caused too many draw calls, but now that i have collision boxes the draw call stays at 1 since its part of the character.
    What are you talking about?? Collision and trigger volumes have nothing to do with draw calls. That geometry is never drawn. It doesn't even reach the GPU.

  16. #16
    MSgt. Shooter Person
    Join Date
    Jul 2011
    Posts
    59

    Default

    lol, Piotr beat me to it, DRAW is exactly what the word suggests... Thats anything that is rendered onto the screen in the camera frustum, volumes and collision are invisible during game play so why would these be rendered?

    The problem on mobile is that any meshes or particles (not including volumes or collisions etc..)in the level visible or not visible to the cameras view are rendered due to no visibility culling that's where precomputedvisibility comes into use.

    The complexity of the collisions or sizing of volumes might affect FPS if that's what the op was meaning?

  17. #17
    MSgt. Shooter Person
    Join Date
    Dec 2011
    Location
    Melbourne, Australia
    Posts
    50

    Default

    Yes Collision Boxes arent 'Drawn' But for mobile devices you have to be careful with complex collision meshes which could be a cause for his performance drop as well, which I thought I'd mention just in case.
    And reading back at my post where I mentioned me using trigger boxes causing to many draw calls, yes that was a mistake, pretty sure I meant to say BSP Brushes (Got to caught up in Triggers), since thats what was my problem. Apologies


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.