Feature request - Possible other solutions

Discussion and feedback on Construct 2

Post » Wed Jan 21, 2015 6:12 pm

Hi everyone and dear mr. @Ashely

I am working on remake for the classic adventure game, Indiana Jones and the Fate of Atlantis with a group of very talented guys, we currently in contact with Disney and working on a demo to send over.

We started working on IJFOA using WinterMute Engine and recently since i am also working on my own adventure game in C2 we switched production to C2, everything works and looks great we just have one small issue.
We are creating live shadows by drawing a flipped, skewed, with blur and tint effects duplicated instance of our actor into a paster object, all the animation were auto-cropped using C2 (there are a lot of animation and frames)

Now when i am previewing the project the shadows looks fine but after exporting when drawing the image skewed into the paster it looks like the images are cropped on the edges, i tried adding additional space around the image and it fixed it, the problem is there are thousands of frames to go through and no easy or efficient way of doing that and maintaining the previous image point location, my question is if it possible for you to add a button for expand spacing, something that can be done on all the frames like the cropping works, or even better allow the user to add an offest px number when cropping, i am guessing that even if it is possible it's not something that would happen instantly so i appreciate it if anyone has another solution to offer me.

Here are photos of preview vs export:

image1.jpg


image2.jpg



Thank You!
You do not have the required permissions to view the files attached to this post.
Image
B
80
S
30
G
12
Posts: 517
Reputation: 12,713

Post » Thu Jan 22, 2015 9:25 am

I suspect it's the graphics card aggressively mip-mapping the textures (i.e. using lower resolution versions when it thinks the texture is small). The problem is that even a single side can be small and the entire texture gets smushed into oblivion.

Your example up there is just like that - a otherwise tall image scaled down so the ratio of height becomes small and the smush is there.

I kept on running into this on my thing that also scales sprites A LOT.

Can you test if it still happens if you change your settings like this (the scaling doesn't matter I guess):

Image
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Thu Jan 22, 2015 12:14 pm

yes it solved it, thanks!
although i would rather use full quality :)

looks like it's just the downscaling that affects this, if set to low it's ok, medium or high causes this bug.
Image
B
80
S
30
G
12
Posts: 517
Reputation: 12,713

Post » Thu Jan 22, 2015 12:28 pm

Could you post a screenshot of what it looks like now? In my case some of the sprites seem extra sharp despite the Sampling being linear, but overall there's no annoying side effects like this.

[Edited since Mip-mapping is the culprit and not sprite-sheeting. But it still seems that mip-mapping doesn't work quite right, so I hope that gets looked into]
Last edited by Somebody on Thu Jan 22, 2015 12:45 pm, edited 1 time in total.
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Thu Jan 22, 2015 12:39 pm

Lof wrote:looks like it's just the downscaling that affects this, if set to low it's ok, medium or high causes this bug.


Good thing you found the offending setting. Now I found thid this on r169 Changelog:

Downscaling quality
There's also a new project property to control the rendering quality when downscaling (drawing sprites when they are resized smaller than their original image). This is important because the tradeoff is between quality and memory use, and in rare circumstances can also affect whether display glitches can occur due to spritesheeting. You may wish to read about how mipmaps work, since they are used to improve downscaling quality; also note we can only control mipmaps ourselves in WebGL mode - in canvas2d it's up to the browser. The three modes are:

Low quality: mipmaps are disabled (reducing memory use), but downscaling sprites can look blocky or pixellated even with linear sampling. Use this to save memory if you don't care about downscaling quality.
Medium quality: mipmaps are enabled, which adds about 1/3rd extra to the memory use, but downscaling sprites looks much better. Since the spritesheet after export is closely packed with images, in some circumstances unrelated images "bleed" together at low mipmap levels, causing display artefacts in downscaled sprites post-export.
High quality: mipmaps are enabled, but the spritesheet after export spaces and aligns images to power-of-two positions. This negates the memory saving of using a spritesheet, but guarantees that low mipmap levels never bleed separate images in to each other, ensuring glitches never appear. However there is a high cost in extra memory usage.


So I guess my question is - what triggers mipmaps? Is it C2 that does this? And if yes, then why does it trigger mipmaps when only one side is smaller than a threshold (causing terrible artifacts). I had submitted a report on this previously, but wasn't aware of which setting was responsible. Perhaps it needs some fixing so we can have best of both worlds (mip mapped when it makes sense and proper high res when it doesn't).
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Thu Jan 22, 2015 1:49 pm

The "Paster" object is not an official plugin so I cannot vouch for its correctness, rendering quality, respect for C2's settings, etc.

If you can reproduce the problem using official features only then file a bug report and I'll take a look.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Thu Jan 22, 2015 2:15 pm

@Ashley - Paster is at no fault here. Here's the requested bug report: viewtopic.php?f=151&t=123216
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Fri Jan 23, 2015 3:22 am

This is why some sort of canvas / paster object would be really useful!
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,245
Reputation: 46,464

Post » Fri Jan 23, 2015 7:31 am

Colludium wrote:This is why some sort of canvas / paster object would be really useful!


Yup. My #1 item on the C2 wishlist. It's just crazy awesome all the stuff you can do with Paster.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Fri Jan 23, 2015 8:34 pm

I guess it may be graphics card specific? I don't see quality reduction on my machine.
You do not have the required permissions to view the files attached to this post.
B
94
S
33
G
113
Posts: 5,356
Reputation: 73,273

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 17 guests