• You don't get fast in order to take part in club races, you take part in club races to get fast!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. #GiveAwayFriday. Win a copy of F1 2017 - The Game. Click here to join.

why is right size of texture so important!?

Discussion in 'Bob's Track Builder' started by William Elgh, Nov 3, 2010.

  1. William Elgh

    William Elgh

    Messages:
    570
    Ratings:
    +100
    i just woundering why the textures NEED to be exact 512x512 or 512x256? (jpg) cus the track wont even load with one single texture in wrong size:confused:
     
  2. Andre_1th

    Andre_1th

    Messages:
    295
    Ratings:
    +0
    Yep was wondering myself also because it basicly destroys your hard work and your objects doesn't look as good as you mentioned. I don't know wich prg's you're using but after you noticed in xpacker
    that textures aren't correct size, hehe too late ;) Start again...
    What I do know, after change kmz into zip and extract, I check the sizes, rebatch them, rezip and stretch in BTB.

    What I do also now, maybe even better, first at all I rebatch first the jpeg in "the powers of 2"
    then I start to work with it so you don't need correct the sizes later.
     
  3. martinez

    martinez

    Messages:
    743
    Ratings:
    +14
    William, you just answered your question :) This is how it works and that's it. Just think of powers of 2... The texture could even be 4x1024 or 2048x256:)
    Then, it's better to use dds format - it works better in games, allows to use mip maps, I'm not sure if jpg's work good with effects like bump and specular. You don't have to buy expensive software - there are free programs which can convert to dds.
    Andre pointed it right - say you have texture like 900x1020 and have many objects drawn on it. You start to make those in Sketchup using just the sheet. Then after resizing to proper like 1024x1024 most objects will be incorectly maped. So, first prepare the right texture with the right size. Then make something from it. Don't worry about some empty place on the texture (because of the size).
    On the attached picture - light blue places indicate alpha channel transparency. So, there's some free place even for future objects. The texture is 512x1024 and it's going to be one material for many objects in my xpack.
     

    Attached Files:

  4. Emery

    Emery

    Messages:
    1,030
    Ratings:
    +279
    Oh, now that's clever, using one image that contains a bunch of textures!
     
  5. Alex Kyriak

    Alex Kyriak

    Messages:
    350
    Ratings:
    +1
    So is the idea to create one texture file, then just map it to a series of objects, such that only the required bit of image sits on the polygon surface in question on each model?
     
  6. martinez

    martinez

    Messages:
    743
    Ratings:
    +14
    Yes, if you use them all - then it's 100% success because it is coming as only one material for many objects instead of many materials for many objects (because of many small textures). My calculations say it's worth to do it even if I use even 25-50% of the objects from there. The sizes of loaded textures have less importance than the number of materials if we speak of game performance, framerates etc.
    If I will want to use less objects, I will have to redraw the texture and remap the objects. But it is sitll worth of it :)
    I learned this from studying original texture sheets from RBR - every track has it's own texture sheets. For series of tracks - like countries there - it does not much matter if say 25% of the textures are useless.
    My friend who takes care of the conversions says 3ds max has some limit of textures that can be loaded to the project. It was number of 32, now he found some way to make it bigger, but still loading 80 textures (and materials) can really harm the performance. The less material - the better, I say. And really believe :)
    Now I can also pack even couple road or roadside textures into bigger sheets and using profile and materials section (with scaling and offseting them) to place them on road or terrain. I will make some tutorials of it soon, I guess.
     
  7. Paul Minnaar

    Paul Minnaar

    Messages:
    213
    Ratings:
    +2
    Jeeez Martinez - this is a clever way of doing things. One texture, with plenty of texture objects, mapped to different models etc. - must make for faster load times. Thanks for this tip !
     
  8. martinez

    martinez

    Messages:
    743
    Ratings:
    +14
    Not only load times - also the better performance because of less materials :) I don't know if has big benefits for rFactor/Racer, but for RBR - I'm sure. I wish I could use also bigger texture sheets for roads/terrain - they can be only horizontal. But it's still a chance to save some calculations for the machines ;)
    I found this after optimising the GB Xpack from Jay_p_666. I wish he could contact me - anybody knows how is he? He had an idea to make the xpack better. I can not share it without his aproval.
    I'm a kind of crazy about better framerates - my machine is not that powerful :)
    Now, with quite good skills of photoshop and some skills of 3d programs I rather want to spend some time to use just objects/textures I want, which means making or remaping them again. If the objects are already build, remaping is quite easy task for me.
     
  9. Andre_1th

    Andre_1th

    Messages:
    295
    Ratings:
    +0
    @Martinez: you explained me something earlier about those sheets, works great but I don't now how to save as Alpha transparacy.
    With Adobe PS it seems I have only the transparancy option, or this is then the Alpha?
     
  10. martinez

    martinez

    Messages:
    743
    Ratings:
    +14
    I forgot how to "translate" PS into English ;) Most everything is on a screenshot then.
    On the alpha channel white color is what you will see, black will be transparent.
    You can still make corrections on the alpha channel - just use eraser or paint it as white.
    Always save as .psd first to make yourself a chance for making corrections.
    Next - flatten the image and save as DTX 3 ARGB 8 bpp / explicit alpha. In the xpack - select "Use Alpha" or "Use Chroma" when setting the material.
    For partly or gradiented transparency - save as DTX 5 8 bpp / interpolated alpha
     

    Attached Files:

  11. Andre_1th

    Andre_1th

    Messages:
    295
    Ratings:
    +0
    Tnx Martinez, yes Xpack I know, but still learning Adobe, I'm better with Paint ;)
    Working on it Szef !
    Dziękują :cool:

    diditmyway_as.jpg
     
  12. martinez

    martinez

    Messages:
    743
    Ratings:
    +14
    I'm not sure if you need transparency for the walls of buildings. Transparent windows again?
     
  13. mianiak

    mianiak

    Messages:
    578
    Ratings:
    +16
    I find that saving the psd as 32bit uncompressed tga first, then opening that tga in ps and then save it as dds a bit more fluent. Saves having to undo the flattened ps if you need to go back to it and to open the tga it's just a drag and drop :) Plus once you flatten it and save it as dds, if you undo the flattening and edit it then save, it will try to save it as a dds.
     
  14. Andre_1th

    Andre_1th

    Messages:
    295
    Ratings:
    +0
    Nono, I won't dare anymore :) Just tried to understand how you saved as alpha with ps, very clear now !
     
  15. martinez

    martinez

    Messages:
    743
    Ratings:
    +14
    That makes sense, thank you! :) That was really focusing me to remember about the "undos" and typing the same things all the time, indeed.
     
  16. Andre_1th

    Andre_1th

    Messages:
    295
    Ratings:
    +0
    Very interesting, can you plz translate this into Dutch language, sometimes I feel so very lonesome.
     
  17. Andre_1th

    Andre_1th

    Messages:
    295
    Ratings:
    +0
    I'm waiting for your Tutorial wich explains it all for noobs like me :signup:
     
  18. martinez

    martinez

    Messages:
    743
    Ratings:
    +14
    After aprox. one year you will know all of that, like me :D :D
     
  19. Andre_1th

    Andre_1th

    Messages:
    295
    Ratings:
    +0
    Very interesting guys tnx !

    Found this, proberly known for many moons before?

    http://developer.nvidia.com/object/photoshop_dds_plugins.html

    Never mind, works great, and l prefer the "powers of 4"
    Check btw the mipmapping option, hehe.

    Now Im just wondering why SketchUp doesn't support dds...but thats another thread.
     
  20. mianiak

    mianiak

    Messages:
    578
    Ratings:
    +16
    Are you sure about that? I just made a texture 192 x 384 and it wouldn't load.