5E Product Walkthrough Playlist
  1. #1
    phantomwhale's Avatar
    Join Date
    Aug 2007
    Location
    Melbourne, Australia
    Posts
    1,370

    Trouble with large decal on background

    Have been wrangling with a large decal from my desktop background, and found it has caused some odd behaviours I am struggling to explain.

    What I have working at the moment is a background with a simple "logo" decal - the deadlands logo in this case. I have done this with the following code :

    Code:
    	<framedef name="desktop">
    		<bitmap file="frames/dlr_desktop_background.png" />
    		<middle rect="0,0,512,512" />
    		<right rect="512,0,768,1002" />
    		<decal rect="1400,0,600,276" />
    	</framedef>
    This uses the dlr_desktop_background.png (see attached in photoshop, with rulers) and produces a desktop shown in Deadlands_logo_FGdesktop.jpg

    This is fine. But I wanted to try a bigger decal, so I did the following

    Code:
    	<framedef name="desktop">
    		<bitmap file="frames/dlr_desktop_background_desert.png" />
    		<middle rect="0,0,512,512" />
    		<right rect="512,0,768,1002" />
    		<decal rect="1280,0,1457,1002" />
    	</framedef>
    This uses the dlr_desktop_background_desert.png (see attached in photoshop, with rulers) and produces a desktop shown in Deadlands_desert_FGdesktop.jpg

    My decal appear to have been trimmed on both sides ! Almost halved on the horizontal. And also this appears to stop the right hand part tiling as well (leaving some of the "default" background") ? Also, even removing the decal section from the code does not fix this issue ?

    Is my Decal too large ? If so, what are the maximum limits supported ? In any case, I can't find anything in the documentation that explains what I am seeing, so I am hoping someone can enlighten me here !

    Many thanks,
    Ben

  2. #2
    Oberoten's Avatar
    Join Date
    May 2006
    Location
    Älvsbyn, Sweden
    Posts
    2,620
    I see what the problem is I think...

    ... the decal can only stick to one of the portions, and you have a rather large right side "portion" as well as a large left-side. Suggest you re-define things a bit to having a big "center" portion as well as a left, right, top and bottom part as well as top left, top right etc.

    Decal will then be stomped onto the middle portion which can be stretched and tiled as far as you want since it will be over-written by said decal.

    - Obe
    For your Ars Magica needs :
    https://fgrepository.com




    Atque in perpetuum frater, Ave atque vale.

  3. #3
    phantomwhale's Avatar
    Join Date
    Aug 2007
    Location
    Melbourne, Australia
    Posts
    1,370
    I presume the decal always sticks to the "middle" portion - in this case it looks like it might be limited to the size of just one "tile" of the portion ? This doesn't explain the missing lower right hand section of the desktop though.

    I tried defining a full frame set, using 64 pixel wide border elements (except for a 256 pixel wide right section), but this caused it to get worse (more trimmed decal, missing lower left section as well now). The code I used for this was :

    Code:
    	<framedef name="desktop">
    		<bitmap file="frames/dlr_desktop_background_desert.png" />
    		<topleft rect="0,0,64,64" />
    		<top rect="64,0,64,64" />
    		<topright rect="1024,0,256,64" />
    		<left rect="0,64,64,874" />
    		<middle rect="64,64,512,512" />
    		<right rect="1024,64,256,874" />
    		<bottomleft rect="0,938,64,64" />
    		<bottom rect="64,938,512,64" />
    		<bottomright rect="1024,938,256,64" />
    		<decal rect="1280,0,1457,1002" />
    	</framedef>
    I also tried using a reduced chunk of the decal, but this seemed to change very little.

    Does anyone have an example of this working (e.g. very large decal on a not-so-large tiled background) ?

    --- EDIT

    I tried swapping the old image for the new image, but still using the old frame coordinates for all elements - the first example in my first post (e.g. the only thing change here is the underlying PNG image is now wider than before).

    The result (attached) is I get a small rectangular decal from the map background, as expected, as well as a large missing lower-right hand side chunk ! So it seems the image size, or ratio of background to decal, is causing some unexpected behaviour possibly ?
    Last edited by phantomwhale; January 6th, 2011 at 04:02.

  4. #4
    I'm just guessing at this, but I think it might be your decal.

    <decal rect="1280,0,1457,1002" />

    It's stating that the image size is 1457 x 1002. Total image size is 1002 x 2000 and your decal dimensions start at 1280+1457 = 2737 wide. That's an overlap of 737 pixels.

    Shore this up to about

    <decal rect="1400,0,600,250" />

  5. #5
    phantomwhale's Avatar
    Join Date
    Aug 2007
    Location
    Melbourne, Australia
    Posts
    1,370
    Quote Originally Posted by tdewitt274
    I'm just guessing at this, but I think it might be your decal.

    <decal rect="1280,0,1457,1002" />

    It's stating that the image size is 1457 x 1002. Total image size is 1002 x 2000 and your decal dimensions start at 1280+1457 = 2737 wide. That's an overlap of 737 pixels.

    Shore this up to about

    <decal rect="1400,0,600,250" />
    The original image was 2000 x 1002 pixels (the one with the deadlands logo).

    However, the newer image, dlr_deadlands_background_desert.png (with the larger desert decal) was 2737 x 1002 pixels.

  6. #6
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    Assuming your target desktop.png is 2737x900 with the decal section starting at x = 1280, what do you get when try this framedef:

    Code:
    <framedef name="desktop">
      <bitmap file="frames/dlr_desktop_background_desert.png" />
      <topleft rect="0,0,64,64" />
      <top rect="64,0,960,64" />
      <topright rect="1024,0,256,64" />
      <left rect="0,64,64,772" />
      <middle rect="64,64,960,772" />
      <right rect="1024,64,256,772" />
      <bottomleft rect="0,836,64,64" />
      <bottom rect="64,836,960,64" />
      <bottomright rect="1024,836,256,64" />
      <decal rect="1280,0,1457,900" />
    </framedef>
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  7. #7
    phantomwhale's Avatar
    Join Date
    Aug 2007
    Location
    Melbourne, Australia
    Posts
    1,370
    Using those values, it produces the attached screengrab.

    I have also attached a very low quality JPG version of the PNG file, if anyone would like to try this at home It doesn't have the invisible decal background, but otherwise produces the same results.

    Bit tired to make conclusions about what's happening here, but welcome anyone else's thoughts !

  8. #8
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    I think your right in that you appear to have hit some sort of upper limit of a frames bitmap size. No matter what I tried, I saw similar clipping as per your previous screenshots, so I eventually scaled the overall image down by 40% (1200x439) and got a successful render using the framedef below.

    Code:
     <framedef name="desktop">
       <bitmap file="frames/dlr_desktop_background_desert.png" />
       <topleft rect="0,0,64,64" />
       <top rect="64,0,271,64" />
       <topright rect="335,0,226,64" />
       <left rect="0,64,64,311" />
       <middle rect="64,64,271,311" />
       <right rect="335,64,226,311" />
       <bottomleft rect="0,375,64,64" />
       <bottom rect="64,375,271,64" />
       <bottomright rect="335,375,226,64" />
       <decal rect="561,0,639,439" /> -->
     </framedef>


    Only problem is at that size, you lose some of the detail and the decal is not that particuraly large (about the same size of the decal in the 4E skins).

    I would try scaling the overall image down from the 2737x1002 dimensions to something around 2200x805 - 1800x659 and seeing if that improves the detail and size. Failing that you can get it to work using the 1200x439 example above. Hope that helps.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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
  •  
DICE PACKS BUNDLE

Log in

Log in