1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

When to minimize draw calls?

Discussion in 'ModelConverterX' started by Sidney Schwartz, 11/5/10.

  1. Sidney Schwartz

    Sidney Schwartz Resource contributor

    Joined:
    20/11/05
    Messages:
    456
    Country:
    us-oregon
    When converting GSU objects my usual procedure is to

    1. Use mass texture editor to rename and convert.
    2. Use material editor to add _LM textures if used.
    3. Export.

    If I want to also use the draw call minmizer, at what point should I use it? Before or after using the mass texture editor?

    Initial results seem to indicate that the draw call minimizer is not working very efficiently in that it misses opportunities to combine textures that would fit on a single sheet. It would also be nice to get a list of how the dcm is supposed to treat different kinds of textures. From what I've seen so far I'm making the following assumptions:

    1. "Plain" textures (alpha channel not used, no night textures) are combined.

    2. Textures with alpha channels and night maps are left as is.

    3. Native GSU textures are converted to external textures and included on one of the combined sheets.

    Is that about right?
  2. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,302
    Country:
    netherlands
    Hi Sidney,

    There is no fixed order. You can first use the drawcall minimizer or first use the mass texture editor. If you first minimize the drawcalls, you have less textures to edit later on.

    But on the other hand, for some objects the drawcall minimizer will work better if you first resize your textures to a power of two. Then they can be combined more efficiently.

    In the latest development release the drawcall minimizer does work with any texutres, so having night textures or alpha channels is no problem anymore. That should work fine.

    I am planning to merge the material editor, mass texture editor and drawcall minimizer in a future version, so that it is easier to manipulate your materials.
  3. Sidney Schwartz

    Sidney Schwartz Resource contributor

    Joined:
    20/11/05
    Messages:
    456
    Country:
    us-oregon
    Thanks for the info, Arno. I always make my textures X2 out of habit. I'll make sure I have the latest release and explore it some more. :)
  4. Pyscen

    Pyscen

    Joined:
    13/8/06
    Messages:
    705
    Country:
    us-texas
    Sidney,

    I actually do the conversion prior to MCX,... for instant... Taking the tiles into photoshop and converting them. I believe someone else was actually converting the tiles (textures) into dds files in Photoshop also (using the Nvidia dds reader). which I have used also.

    Arno,

    What I have noticed having MCX converting to dds, the file is say 256 x 256... the options given (to change the size) are 64 x 64 or 512 x 512,... I'm just wondering why MCX doesn't give 128 x 128 option in size?

    I believe I have read somewhere to stop the flicker in FSX is to create LOD for the object or (there was something else, and for the life of me I can't remember...) was it adding mips?

    Arno... the LOD creator, I know you have been grappling on how to improve upon it somewhat,... I was just wondering if it is possible to a allow the user of MCX to pick and choose what can be removed during the process of creating the LOD. For example, the window panes or an covered walkway that is part of the whole object etc.... as a whole this way could speed up the process of creating LOD for an object... would it not?

    Also,... I have also noticed, if you change a texture name, from a color to a diffuse name (also deleting a texture), the change doesn't occur until you close and reopen the material editor. Just wondering if this was the intended way in which MCX was to handle this?
  5. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,302
    Country:
    netherlands
    Hi,

    That sounds like a bug. It is designed so that it shows the next bigger and smaller option. But I am planning to show more options in the future.

    Do you mean flickering of textures? Then the mipmaps is most likely the solution.

    Do you mean that you would like to manually picks elements to remove? That might be another approach indeed. I have some interesting ideas for the LOD Creator, but at the moment I am more working on the gPoly tool. So they have to wait a little bit.

    Can you describe in slightly more detail what you are doing. You mean you are renaming or removing a texture, but the material name only updates later? I would have to check, it sounds like I forgot an update somewhere.
  6. Pyscen

    Pyscen

    Joined:
    13/8/06
    Messages:
    705
    Country:
    us-texas
    ok... wasn't sure if that was the case or not. :)

    ok... I will see about adding mips then,... MCX is creating 6 or 7 depending on other things of the texture.

    Yes that exactly what I meant,... Yes I know your working on gpoly, not wanting you to stop that at all :D Just making a suggestion for future.

    Yes I can,...

    Just an example, colorFFFFFFFF (white) and I would change the diffuse filename to interior.jpg,... before it would remove the colorFFFFFFFF and change it to the diffuse filename in the select window, I would have to close the Material editor and then reopen it for the change to occur. Does that make sense?

    When Deleting, say the colorFFFFFFFF (white) (again),... it asks to comfirm, which is fine,.. but it does remove the texture unless you close and reopen the material editor. The Select window is the first picture shot given below.

    Attached Files:

    Last edited: 13/5/10
  7. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,302
    Country:
    netherlands
    Thanks, I understand what you mean with the materials now. Seems like a bug as well.
  8. Pyscen

    Pyscen

    Joined:
    13/8/06
    Messages:
    705
    Country:
    us-texas
    Glad I could help!
  9. Sidney Schwartz

    Sidney Schwartz Resource contributor

    Joined:
    20/11/05
    Messages:
    456
    Country:
    us-oregon
    Hi Doug,

    I do that sometimes too, or even afterwards. I use Imagetool with a batch file and it takes no time at all. I'm more interested in how the draw call minimizer decides how to combine textures. I also may be making some incorrect assumptions about how Sketchup handles textures. I'll have to go back down into my secret lab and experiment. :)
  10. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,302
    Country:
    netherlands
    Hi,

    What the drawcall minimizer does is quite easy. You have a given texture sheet size (1024x1024 by default) and it will try to place any texture it finds on your model in that sheet. If the texture has night textures, then a new night texture sheet is also made. This continues till all the textures have been processed and then the texture coordinates are updated to use the new sheet. If your texture is repeating then it can not be combined and will be skipped.
  11. Sidney Schwartz

    Sidney Schwartz Resource contributor

    Joined:
    20/11/05
    Messages:
    456
    Country:
    us-oregon
    Aha. That explains a lot. Thanks, Arno. :D
  12. robystar

    robystar

    Joined:
    4/10/06
    Messages:
    3,402
    Hi Arno,

    Please explain what you mean by "If your texture is repeating then it can not be combined and will be skipped." I am not sure I understand.
    Furthermore, the name given to the combined texture sheet is somewhat enigmatic. For instance, I now have a texture called object217completemap.dds but do not have a model called that way as far as I know.
    I keep a static objects library directory in the addon scenery for the downloaded object libraries but now I am lost as to what bgl this texture belongs to.
    A better way would perhaps be to abrreviate the name of the bgl, add the modelname and finally a suffix like _cm.dds (completemap.dds).
    Would be easier to retrieve the model the texture sheet belongs to.
  13. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,302
    Country:
    netherlands
    Hi,

    With repeating I mean that your UV coordinates are not between 0.0 and 1.0. So for example if you map between 0.0 and 2.0, so that the texture shows twice on the polygons, it can not be combined. So basically any polygons that has the texture repeated somehow will not be minimized. This could also happen if you by accident have your mapping slightly wrong and a tiny part of the texture is repeating. So it is good to always maps your textures careful.

    I do not understand the texture name you mention there. What MCX does is take the model name and add _0, _1, _2, etc to it for the different combined textures it is making. So the name you made can only happen when you have renamed it yourself.
  14. tgibson

    tgibson

    Joined:
    22/9/06
    Messages:
    4,544
    Country:
    us-california
    A good example of a repeating texture is when only a small number of the roof shingles are represented on a bitmap. This texture gets tiled multiple times all over the roof to create the final roof texture with hundreds of shingles.

    Hope this helps,
  15. robystar

    robystar

    Joined:
    4/10/06
    Messages:
    3,402
    Thank you.
    That's become clear now.
    Regarding naming of minimized drawcall textures: my mistake.

Share This Page