1. New Software Notice alert!

    The new Web Graphics Creator (version 4.0) will be out soon.

    For now, version 3.0 is still active and works great on most Windows machines. It no longer runs on Macs using Lion or greater... (but the new version will fix this)

    So hang in there! It's almost done!

Template Dimensions

Discussion in 'The eCover Creator' started by Jeri, Aug 20, 2005.

  1. Jeri


    Trophy Points:
    eGreetings All,

    I can up with some additional dimensions to use with the ECC templates.
    I thought some of you might be interested.

    These are the dimensions I used to create my ecovers here:

    It took some trial and error in creating them.

    Note: If you create a cover in a graphics editor and then use them in ECC and it looks too small. This is not necessarily the case. Try making the dimensions smaller.
    I noticed that if the image was too wide, ECC actually shrank the image to make it fit. This gives the false impression that the image is too small when in fact it was too large.

    Hope this helps some of you using a graphics editor to create your images.

    Best Wishes,
    P.S. ECC Rocks! :number:
  2. a¿ex

    a¿ex Staff Member

    Trophy Points:
    Hi Jeri,

    I regret, that you needed trial and error to find that out. I never thought, that people would make the bitmaps outside of TLC and so the following information didn't get documented properly. Anyway, here it goes:

    For every 3-D model there is a .xml file, which holds the info for the texture size and mapping.
    (You can find it in the folder "w3dMedia" in the folder "Resources". It must have the exact same name as the png file for the thumbnail and the w3d file for the 3-D geometrie)

    Textures in hardware rendered 3-D must be of specific sizes in order to render fast. It is boaring and complicated to explain why, but fact is, that the texture sizes must be a power of 2. (--> 2,4,8,16,32,64,128,256,512) The graphics card in the computer determines the max size. Unfortunately openGL on Mac only allows a maximum of 512 pixels (although the graphic card can in most cases handle much more, up to 4096x4096) and so I chose 512 as the least common denominator.

    As the dimensions of the 3-D models do not match these aspect ratios you almost always only see a part of the whole texture on the model.

    In the above mentioned .xml file the visible rect of the texture is specified according to the texture coordinates of the 3-D model, in order to show your entire image. So it is kind of a mask.

    There is a property #texturesize, which specifies the width and the height of the texture (-> power of 2) e.g.

    <textureSize>point(512, 256)</textureSize>
    <!-- should be power of two in both dimension (default =
    point(512,512)) -->

    note how in case of a ratio of less than 2:1 I use 512,256 instead of 512,512, just to save VRAM.
    (or 256,512 in case of 1:2)

    The smaller the size the less VRAM you need, but the poorer the quality, whne zooming in.

    Further there is the rect of the texture which is visible on this specific model:

    <targetRect>rect(10, 10, 200, 200)</targetRect>

    you can see it as kind of a mask: make a 512,512 bitmap and draw into the rect which starts from 10 from left, 10 from top to 200 from left to 200 from top.

    so in this case you the bitmap which would excatly fit would need to be 190 by 190 pixels. (200-10, 200-10)

    it only needs to be of the exact ASPECT RATIO, as the app scales the bitmap you pass to the it according to the property #mapmode (which can be specified in the same xml file). Sure enough, if you pass a bitmap which is smaller (e.g. 140 by 140) it will get scaled up, which results in a quality loss (scaling up an image always means a quality loss). While scaling down doesn't degrade the quality, it is wasted disk space as you will only see the scaled down version in 3-D ;-)

    so the best is to provide it in the correct size, if you want to fill the complete space.

    Now, what happens, if the bitmap you provide is NOT of the correct ratio ?
    In our above example for example 150x250.

    there are four ways to deal with that:

    - distort the image, ifgnoring the aspect ratio,

    - fit the bitmap into the available space, by taking the biggest possible dimension of both, in the above case that would be 114x190 (-> 150*(190/250)).

    - fit width -> 190x317 (-> 250*(190/150))

    or fit height -> the same result as "fit into" in this case: 114x190

    <!-- possible values are: #scaleToFit (-> distort image), #fitInto,
    #fitwidth or #fitheight -->

    if you use a mapmode of #fitinto there will be a visible 'background' (in some case this happens with #fitwidth, #fitheight too.)

    you can specify this the background color too.
    Available options are:
    the color of the topleft pixel of your bitmap, the color of the topright pixel, bottomleft and bottomright pixel OR you can specify a color as a hex value.

    <!-- possible values are either a color as hexstring or #topleft
    (->color topleft pixel), #topright, #bottomleft or #bottomright -->

  3. Jeri


    Trophy Points:
    Hi Alex,

    Thank you for your reply. :WOW1:

    But I guess your discussion is just way over my head.

    And your point is.....?

    (Sorry, I am such a dummie. I need layman's terms.) :help2a:

  4. a¿ex

    a¿ex Staff Member

    Trophy Points:
    Sorry I didn't mean to overwhelm you or turn you down.
    But maybe you can read it up about it some day, if you're looking for more infos.

    No specific point, I thought some of the info may be of interest or help to you and others.
    I read about your findings about the texture sizes by 'try and error' and so I wanted to explain some of the 'inner workings' to save you or any other user, reading this forum, more 'try and error'.

Share This Page