artifacts when scaling in DX11

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • When I converted my game to DX11, suddenly many of my graphics started having black rectangles around them (both stationary and moving graphics). It only happens if the graphics are scaled, and only when using quality=1 (when scaled with quality=0 the rectangles disappear, though of course the graphics become pixellated). For animated graphics, sometimes the rectangles only appear on certain frames and not others. And as I said, the problem only exists in DX11 mode. It happens even when there are no shaders onscreen.

    The thing is, when I first load my MFA, everything looks fine. But when I reload a level from within the MFA (which destroys many objects and recreates them), that's when these artifacts appear. I'm still trying to nail down what's different about when they get created the first time vs subsequent times. I've tried checking/unchecking all settings on the active objects themselves (eg. "save background", "antialiasing" etc.) but nothing made a difference.

    Does anyone know what this problem could be caused by, or at least have any ideas of where I should investigate next?


    Please login to see this picture.

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • I have seen the same sort of artifacts when changing app size from 640x480 to 1280x720. When it asks if you want to change all frame sizes also i select yes and these same sort of artifacts appear on the blank frame and also around it, sometimes also trailing the mouse for a while. I always thought it was just Fusion just not working well scaling on any size screen over 1920x1080. I run a Win10 twin screen setup with one screen at 3440x1440 and another at 2560x1440 .There's been a few people discuss seeing weird artifacts on screen on discord in the past. Not exactly the same cause by scaling a graphic but looks just the same artifacts to me. I wonder if you see the same thing when you run on a screen set to 1920x1080. ... Searching 32 bit apps scaling artifacts on hi res screens ... opens up a rabbit hole. You might want to check on some of the things that come up and do some more tests changing some settings and screen resolutions.

  • Actually, I think the PNG part is right but not the "at runtime" part. While those big stalactite things in the picture are dynamically loaded PNGs, the birds' animations are baked into the Active Object normally (using Fusion's Graphics Editor) - though they were imported from Photoshop PNGs (at edit-time). But when I delete the graphics inside the bird objects and replace them with graphics I drew directly in the Graphics Editor, the artefacts go away.

    I'll experiment with outputting the PNGs with different settings to see if there's some way to get a PNG that doesn't break in DX11 mode :(

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • Unfortunately, the same artefacts appear whether premultiplied alpha is off or on :(

    c4t: Changing my monitor to 1920x1080 (which is my game's native resolution too) unfortunately didn't help. The artefacts are still there, in both windowed and full screen mode.

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • Do you get the same issue on a small test example mfa with only a few graphics in it.
    It might be worth testing to see if it is something that only happens under load with a lot of graphics using transparency.
    Another thing to look at might be if the graphics that are scaled are using power of 2 to scale. That is another rabbit hole search on how dx9 and dx11 work with transparency and scaling.
    Post a test exe if you like i am happy to test it on my two systems with different graphics cards and current release and beta release of Fusion.

  • Thanks. I'll try and get a testable EXE or MFA happening. Unfortunately, this is proving to be a bit of a nightmare to try and isolate or reproduce with 100% repeatability. Well actually, the static objects seem to reproduce 100% (they work 100% of the time on launch, and break 100% of the time upon a subsequent level reload) so I suppose I should start there.

    Though I've spent the morning trying to learn about how the artefacts affect the birds, and that's been much more confusing. These are some of the things I've found that make an impact, though none of them do so with 100% repeatability:

    -setting scale to 2 increases likelihood of artifacts compared to 2.0
    -creating objects on a different layer sometimes makes artefacts go away
    -sometimes creating 25 objects on one layer and 25 on another layer results in one batch all broken and the other all fine
    -sometimes running the MFA straight after saving makes artefacts go away, but they come back on subsequent runs (build cache option doesn't seem to affect this)
    -having more objects of the same type running seems to increase the likelihood of things breaking
    -sometimes removing objects seems to increase the likelihood of the remaining objects breaking

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • what about the sizes of the original graphics. Example 128x128 upscale to 256x256. or original 256x256 upscale to 512x512 . see if that is causing the same artifacts. Pretty much feeding the graphics pipe stuff it likes to eat.
    I noticed you said it does not happen with graphics you drew in Fusion editor. maybe because the editor defaults to set sizes like 32x32 and scaling 2 is 64x64 and graphics cards love that. Unless you drew graphics at different rez outside factor 2 might be worth a check. I found it pretty heavy reading on forums and docs.microsoft.com could be only things that the Clickteam can fix in the end. Maybe this stuff will help them in some way.
    Ill keep an look out for a mfa or exe and test for you.

  • OK, I've stripped away everything from my MFA but a few objects, and I now have a simple replicable demo of the bug. Unpack the ZIP, and run either the MFA or the EXE. If it behaves the way it does on my PC, then when you open it you'll see this:

    Please login to see this picture.

    Then when you hit spacebar a couple of times, a black outline appears over the object(s), like this:

    Please login to see this picture.

    Please let me know if you don't get the same behaviour, or if you can figure out how to prevent it. Yves, would you mind having a look at this too when you have time?


    Here's the zip (3.7MB): Please login to see this link.

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • Ok just tested your EXE and the MFA

    I get the same black line as your screen capson both EXE and MFA.

    I ran a test out of interest yesterday night on a basic all settings default 1920X1080 mfa. I Used my own graphics, made in Gimp and Affinity Designer. I got no lines

    I put one of your graphics in to that test i did with just one layer and default settings. set a timer to re-scale it every 5 seconds and let it run alongside a bunch of my own graphics again from Gimp and Affinity Designer. I got no lines using your graphic or on my own graphics.

    Next i thought id add some of my graphics into your MFA and holy layers Batman. So many layers. What ever your doing there is over my head, so i could not even see your graphics to replace them with ones id made.

    Anyway its not your graphic or the way you output it from what ever app you use. Not scaling it either as that works with random scale in a basic MFA. maybe something else your doing with the transparent values on layers or the image in bck2 or bck10

    Something else going on i cant work.

  • I think it is scaling because if you change the scaling in my MFA to 1 like below, the problem seems to go away:

    Please login to see this picture.

    The graphics that you see in the runtime (the stalagmite and the building) don't exist in the MFA. They are in the PNGs in the same directory, and get loaded into the little grey objects (bck2 and bck10). To use your graphics in my MFA (which is a great idea - I'm keen to see what happens), just replace those PNGs with your own PNGs. Either overwrite my PNGs using your own ones with identical names as mine, or place your PNGs alongside my ones, and modify these bits of the code to point to your new ones as shown below. But use the newer version I attached at the bottom - it'll make it simpler.

    Please login to see this picture.


    I've simplified the MFA further. It's down to 3 layers, and the Layer Object is no longer used (I had assumed that the parallax scrolling coefficients had something to do with the problem so I left it in, but actually the problem remains even without scrolling coefficients or the Layer Object). Here's the new ZIP:

  • Cool just put my own graphics into the folder and replaced yours by using identical names. I get the black lines on my graphics too. Same as you with my graphics when i set quality to 0 no black lines but pixelated graphics.

    It looks like the only way to not get black lines with quality 1 is to add the graphics to an active in the frame and control it like that. Instead of loading from outside. Quality set to 1 works fine with the graphics in an active. Maybe a bug on how Fusion is treating the graphic when loaded externally. Its defiantly an interesting one. Ive tried changing as many other settings as i can too in case i stumble on a solution also. So far nothing except quality to 0 changes it with external graphics.

  • It looks like the only way to not get black lines with quality 1 is to add the graphics to an active in the frame and control it like that.

    That would be bad enough (being able to use external graphics makes development much faster for me), but unfortunately it doesn't seem to be that simple. I've had the artefacts with internal graphics too. The birds in the screenshot on my first post were made externally and imported into Fusion normally using the graphics editor. At runtime, they're just created and scaled - no runtime importing.

    In the testing I've done, it seems like very little about this bug is 100% predictable. I tried various settings or methods that seemed to affect the bug sometimes but then not always (eg. changing layers, multiplying the scaling factor by 1.0 to force float, using fewer animation frames, using fewer objects, using more objects). And just when I thought I had finally found a simple 100% reproducible example of the bug, it turns out that we both get the black lines on the MFA, but contra only gets it on the EXE. It seems like the culprit probably isn't the software that generates the PNG either, since my stalagmite was exported by Photoshop, my birds by Toon Boom Harmony, and you said you've seen lines with graphics made in Gimp and/or Affinity Designer.

    So I fear that unless CT can isolate the bug and squash it, or at least learn more about it, it's going to keep occasionally appearing in unexpected situations. I'm not comfortable with the idea that the game might look fine on my PCs but a certain subset of my players will get big black boxes everywhere. I hope CT can get this figured out eventually, otherwise I think I have to stick with DX9 :( I guess I could release two EXEs and give players the option to switch to the DX9 version if they have problems, but that adds complication to the process.

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • How strange same on the exe mfa is fine
    What is your fusion version?
    293.2 - Windows runtime: in DirectX11 mode sometimes scaled and rotated objects could have a semi-transparent black box around them.

    I LOVE YOU! (and Yves too of course!)

    So it turns out this bug is actually fixed already in the beta! I'm still on 293.1. I did actually get the beta 293.2 a few weeks ago, but I had some problems so reverted back to the release build. (The problems turned out to have nothing to do with the beta btw)

    c4t: please tell me you're on 293.1 like me? And contra: are you on the 293.2+ beta (and that's why your MFA worked)?

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • I just installed 293.6beta and it all seems fixed :) My test MFA no longer gets the black boxes, and my game (which was getting them all over the place) is free of them too. Fingers crossed it stays that way, but looks good so far.

    Well, that was a waste of 2 days XD Sorry for wasting everyone else's time too! I'm pretty happy to learn that this is all solved though. Thanks for your help everyone, and thanks Yves & co for yet another great fix in the beta.

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!