High Resolution Canvas Snapshot ?

Get help using Construct 2

Post » Tue Jan 27, 2015 7:55 am

Hello, is there a way to produce a snapshot of the canvas at higher resolution than the screen?

For example I would like to produce an screenshot from my game that can be printed to A4, but it gets pixelated when creating a snapshot from say a 480x800 mobile phone resolution.

Any tricks or plugins or work-arounds?

Thanks
B
6
Posts: 16
Reputation: 282

Post » Tue Jan 27, 2015 8:05 am

Look into R0J0's excellent Paster plugin - it has some hangups with opacity and shaders, but you can place that bad boy in your scene, set a resolution and go wild (within the constraint's of the max texture size of your graphics card).

You could probably even make a system that uses a loop to sequentially move the object around the screen and take several snaps of fairly high-res to be combined into a huge one.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Tue Jan 27, 2015 3:42 pm

Thanks @somebody - I am not sure I understand how Paster then exports itself into a snapshot. While it can load textures from URL or from the entire canvas, it doesn't seem to have any action that extracts its texture back into an URL like Scirra's "System>take snapshot of canvas" action does. Am I missing something?

As for the idea of sequentially moving the object and taking snaps, it does sound like it could work but would require a server-side script to combine the snaps, and I was hoping to avoid that.
B
6
Posts: 16
Reputation: 282

Post » Tue Jan 27, 2015 3:45 pm

Easy as pie!
Image
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Tue Jan 27, 2015 6:54 pm

ha! thank you @Somebody (and @R0J0hound for making the plugin)! it's producing the file, but it's blank, although I tried to do "Paster>Load texture from canvas" before invoking the imageUrl. I supposed that would copy the entire canvas into the Paster (an equivalent of System>save canvas snapshot, but resolution independent) - is that not the case?
I will mess around more with it and share the capx if I can't figure it out. If am wrong about what to expect from the Load texture from canvas action, please tell me how it should be used.
+++
B
6
Posts: 16
Reputation: 282

Post » Wed Jan 28, 2015 7:49 pm

Got it to work, but not really as expected.

I was very happy to see your wonderful StuffGen @Somebody - beautiful interface and indeed quite fun to use. I am myself also doing an app, not a game, so was encouraged by how neat yours is. I particularly salute the way you've used paster to export the designs.

I was wondering if you could help me in figuring out how to do the inverse of what you did, you see you are taking a large canvas and exporting parts of it, generally to same or smaller resolutions, to be used on screen.

In my app, I need to do the opposite, namely I need to create PNGs that are at a higher resolution than the screen to be printed (hint: am making a kind of paper-art design app).

I have managed to create larger-than-screen PNGs but the image pasted is just scaled up from the screen resolution without any gain in detail, quite the opposite.

The original sprites are larger than the pixels they appear on screen at. For example, the object could be 512x512, but would be scaled down on some screens to appear say 128x128px in size. But i needed to be printed at 5x5cm at 200dpi, which is around 400x400px.

Using the setup in @R0J0hound's paster_loadCanvas.capx: a backdrop Paster1 that loads the canvas, then a front Paster2 that pastes Paster1, and exporting Paster2.imgURL, the resulting image is large, but bad.

Attached are two ways of producing the image, one with the built-in CanvasSnapshot, so same resolution than screen, and the other is with Paster, at custom resolution almost 7x Screen.

Is it a built-in limitation that loadCanvas is essentially just passing CanvasSnapshot into Paster, at screen resolution?

scirra CanvasSnapshot.png

R0J0 paster.png
You do not have the required permissions to view the files attached to this post.
B
6
Posts: 16
Reputation: 282

Post » Wed Jan 28, 2015 8:19 pm

@icepam - thank you for the kind words. In fact my system already does the upscaling, it's just not available in the public version - but normally the designs are exported at 200%. The trick is this - if you capture the canvas the sprites are already there and upscaling only makes the pixels larger. In my case all the designs are the same sprite so it's easy to use the "Paste sprite onto paster" command. And this is where the magic happens - as you have a higher resolution paster then the separate objects are pasted into it at the highest possible resolution. I'm not sure how your system is set up, but perhaps you could try to add all the active objects to a family and paste that or just set up a series of sequential pastes.

Good luck, do share the results.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Thu Jan 29, 2015 8:32 pm

Message: icepam is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
hahahaha it works! thank you so much @Somebody!
btw, are you using @cranberrygame's amazing SquareBoard/Grid plugin? or something similar for StuffGen?


download.png
You do not have the required permissions to view the files attached to this post.
B
6
Posts: 16
Reputation: 282

Post » Thu Jan 29, 2015 8:38 pm

@icepam - wow, quite the resolution you got there! What's your graphics card if you don't mind sharing? Just be wary that not all users will be able to have such large images and there is a small risk of a crash if that is the case. You may want to put in some contingency plan, perhaps export a smaller image first and then try a bigger one. In StuffGEN I can afford to experiment since it lets you save and load things, but in a closed system it might be a risk.

And StuffGEN is basically all done by hand, it doesn't use any plugins except for Paster so far (and some of my shaders).
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Thu Jan 29, 2015 10:40 pm

yes, it does crash on me every other try. In reality I need half this resolution so it should be ok in practice. My laptop has an Nvidia GEFORCE with 2GB vram.
thanks again and kudos for SG.
B
6
Posts: 16
Reputation: 282

Next

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, David181, fens, rekjl and 10 guests