I am very interested in applying the warp/deform effect seen in the iPhone app Wobble (it lets you define regions on a raster image and then deforms those regions as it gets input from the accelerometer or the user’s touch as if they had adopted faux soft-body physics) to a game I am making, but I’m not sure how this effect was achieved. Anyone have any advice as to how I might program an analogous effect using Corona?
As we regroup after shipping the latest Corona, we are going to prioritize features, etc and publish a road map of some sort to let you all know what features are coming up next.
Carlos [import]uid: 24 topic_id: 2091 reply_id: 6253[/import]
thinking of doing something like this using the sprite capability of corona, ie treat my image as a load of 2pix sprites stacked on top of each other, then wobble the individual sprites to make the image appear to wobble - will post code. [import]uid: 74338 topic_id: 2091 reply_id: 97187[/import]
and off course this can be easily be extended to
wobbling along the y axis by using vertical stripes,
and beyond into both horizontal and vertical
deforms by taking snaphots warping those.
in theory then it may be possible to create a full pseudo
3d texture mapped polygon environment with corona by
applying the deforms, snapshotting and saving to file.
Can I encourage you to put this on the code exchange? It is SUPERB and others, I am sure, would love to see it [import]uid: 52491 topic_id: 2091 reply_id: 100759[/import]
Open768, thank you, but the file is no longer available.
Could you please reupload it or put this on the code exchange? [import]uid: 136829 topic_id: 2091 reply_id: 108234[/import]
@jacksparrow.greg simples download the lib-wobbler, and dependent libraries from the githug, give it an image and off you go.
Then improve it and post it back.
– the hard work begins here
local oWobbler1 = cWobbler:create(“myimage”, width,height)
utility:moveToScreenCentre(oWobbler1.group)
oWobbler1.delay =20
oWobbler1:go()[/lua] [import]uid: 74338 topic_id: 2091 reply_id: 109285[/import]
Hi, open768!
How would you realize image skew by x and y axis (both directions)? I tried to make image skew by x axis by (xSkew - ySkew) angle and rotate group with sprites by ySkew. But I got image irtifact due to rotation. [import]uid: 153428 topic_id: 2091 reply_id: 115289[/import]
havent tried this but I would do one skew first (say x axis) , do a snapshot, save the image, load the new snaphot as vertical strips and skew them.
Could give some fun results but obviously this will suck performance if you do this in-process. rather prepare your animation ahead of time and load the frames of the skew animation as a spritesheet.
if I find the time in-between coding and marketing my up and coming game I’ll knock out an example. [import]uid: 74338 topic_id: 2091 reply_id: 115427[/import]