Anyone seen this? Weird image exporter problem.

Discussion and feedback on Construct 2

Post » Tue Mar 01, 2016 11:16 pm

Hey,

For some reason, C2 is doing things like this to images:
Image

And... I have no idea why. This only happens when exporting the HTML version on the latest stable.
NW JS works fine.

Any suggestions? I've reinstalled and restarted everything, and this is a new, sudden issue.
B
21
S
6
Posts: 77
Reputation: 1,445

Post » Wed Mar 02, 2016 7:21 am

Not sure why it would suddenly be like that, but check the project setting called "Clear background" and/or make sure the background layer is not transparent.
FREEDOM: Diegesis - Out Now for Windows! http://freedom.quicksandgames.com
B
22
S
5
G
1
Posts: 83
Reputation: 1,818

Post » Wed Mar 02, 2016 9:45 am

Quicksand wrote:Not sure why it would suddenly be like that, but check the project setting called "Clear background" and/or make sure the background layer is not transparent.

That should fix it. If it's still there and you can, try exporting it on an other machine to see if the problem is C2 releated.
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,717

Post » Wed Mar 02, 2016 11:25 am

This is by design. Presumably you have set "downscaling quality" to "high" and you are looking at a spritesheet that was exported. (It should not appear like that in-game.) Since you told C2 to maximise the downscaling quality, to guarantee optimum rendering of lower mipmap levels without bleed, each sprite is positioned in a power-of-two cell and its last border of pixels are extended to fill the rest of the cell. This prevents the empty transparent space bleeding in when the driver generates the very small mip levels, which can cause minor artefacts like faint seams between adjacent objects.

This padding also uses a lot more memory. I'd discourage the use of "high" downscaling mode unless you see such seaming artefacts. I think I even put a warning in the editor when you choose that mode.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Wed Mar 02, 2016 2:25 pm

Okay! I'll try the export again without that downscaling mode selected when home.
Will let you all know. Thank you for the feedback!
B
21
S
6
Posts: 77
Reputation: 1,445

Post » Thu Mar 03, 2016 12:31 am

Yea... even with it set to medium other image export errors happen, giving me 404s when I try to run the files.
A bunch of the images for spritesheets are missing.

Failed to load resource: the server responded with a status of 404 (Not Found)
c2runtime.js:117 Error loading image 'http://ricethin.com/beans/demobuild/images/dialogsecondpartyfaceholder-sheet0.png': Eventa.onerror @ c2runtime.js:117
http://ricethin.com/beans/demobuild/ima ... sheet2.png Failed to load resource: the server responded with a status of 404 (Not Found)
c2runtime.js:117 Error loading image 'http://ricethin.com/beans/demobuild/images/furnitureselector-sheet2.png': Eventa.onerror @ c2runtime.js:117
http://ricethin.com/beans/demobuild/ima ... sheet2.png Failed to load resource: the server responded with a status of 404 (Not Found)
c2runtime.js:117 Error loading image 'http://ricethin.com/beans/demobuild/images/mom-sheet2.png': Eventa.onerror @ c2runtime.js:117
http://ricethin.com/beans/demobuild/ima ... sheet1.png Failed to load resource: the server responded with a status of 404 (Not Found)
c2runtime.js:117 Error loading image 'http://ricethin.com/beans/demobuild/images/employeeplaceholder-sheet1.png': Eventa.onerror @ c2runtime.js:117
http://ricethin.com/beans/demobuild/ima ... sheet1.png Failed to load resource: the server responded with a status of 404 (Not Found)
c2runtime.js:117 Error loading image 'http://ricethin.com/beans/demobuild/images/supplyselector-sheet1.png': Eventa.onerror @ c2runtime.js:117

On top of that, when exporting NW JS, this all works fine :(
B
21
S
6
Posts: 77
Reputation: 1,445

Post » Thu Mar 03, 2016 1:12 am

Looking here:
https://www.scirra.com/tutorials/577/co ... imisations


This may be by design as image deduplication. However... it breaks my project since the 404 is a non-start error.

EDIT:
Deduplication was the error. I managed to fix it by just creating copies of the images and renaming them. Not much of a workaround, but it will do during development I suppose :)
B
21
S
6
Posts: 77
Reputation: 1,445

Post » Thu Mar 03, 2016 11:33 am

If the server returns 404 not found, you probably just forgot to upload some of the files? C2 should never export references to missing files, if it does please file a bug report following all the guidelines.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Thu Mar 03, 2016 2:39 pm

I'm not sure if it's a bug, but I can file it later.

The problem is that during development, some sprites ARE identical.
So, for example, I have sprite.

FurniturePlaceholder.png
and
AppliancePlaceholder.png

Both of which are 32 x 32 pink squares.
Those will be developed into art assets and inserted along the pipeline.

During deployment to a HTML5 site however, AppliancePlaceholder-sheet0.png *doesn't* get exported as an image - in the /images/ folder after export. Meaning I have to manually make a copy of FurniturePlaceholder-sheet0.png and rename it to AppliancePlaceholder-sheet0.png to make the project work - (otherwise it throws a 404).

Do you think that's worth filing?

Thanks for your help and all you do!
B
21
S
6
Posts: 77
Reputation: 1,445

Post » Thu Mar 03, 2016 4:09 pm

Definitely, the export should always work unmodified, if there are missing files that's a serious bug we absolutely want to fix.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Next

Return to Construct 2 General

Who is online

Users browsing this forum: adelwich and 18 guests