12573: Display objects - shear/skew - Feature request

Ticket: 12573

Shearing takes very little performance. Even without using matrices.

USE:
Shearing is great to use to make fonts italic. Or to make great wobble animations on sprites. It can also be used with sprites that are rendered as an object tilted into perspective to allow for “fake” 3D Without any extra performance toll on the gfxcard.

It open ups som much possibilites for animation and playing with fake 3D

TECH:
http://cs.fit.edu/~wds/classes/cse5255/thesis/shear/shear.html

IMPLEMENTATION:

object.skewX = value
object.skewY = value [import]uid: 37802 topic_id: 22733 reply_id: 322733[/import]

can be plausibly done with sprites:

http://developer.anscamobile.com/forum/2010/09/17/how-might-i-deform-raster-images-wobble [import]uid: 74338 topic_id: 22733 reply_id: 100735[/import]

Yes that’s a very neat tech-tech effect. Really like it :slight_smile: Did some stuff like that on the old Commodore Amiga 20 years ago with changing raster offset :slight_smile:

But this creates a lot of extra code and on top of that a hell of a lot of spriteobject = extra performances.

If I wanten a object that had a height of 200 pixels that would result in 100 sprites if I wanted it smooth. Not to mention all the extra unneeded definition for the spritesheet.

I simple put want for object/sprites the option to add a skew to the matrix.And control this through LUA and the displayObject definition.

As Corona uses OpenGL and if I am not totally crazy matrices to rotate the draw polygonquad.
If you read the link i supplied it explains how it works. And this has no GPU performance impact what so ever and no extra CPU calculations. (apart from changing the property in Corona via LUA.
So with your technique:

  • It can be done now
  • Creates a lot of more sprites
  • Extra Code
  • Extra memory consumption
  • Extra Polygons for the GPU to draw
  • Extra CPU hit for still needing to send the matrices to OGL.
  • Result is worse overal performance
  • Extra spritesheet definition

So I really like this stuff, You can also use this to make 3D by scaling each sprite also. But, and this is the big but. this demands a lot of sprites.

How do you think the performance will be when having say 100 of those objects on screen.

So no, this is not an option to Skewing I am afraind.
[import]uid: 37802 topic_id: 22733 reply_id: 102125[/import]

boo! :frowning:

never said this would perform - just a proof of concept.
There are other better tools out there for 3d. - eg shiva3d.

[import]uid: 74338 topic_id: 22733 reply_id: 102177[/import]

Nooo it WAS a very good effect. Nothing to boo a all. Loved it!

For nice effects (and some game element, like the other guy did with the road in his game) its wonderfull. But then it’s coded for a special case.

Just explained the reason for the feature request. I did not want to achieve something LIKE skewing. I want proper polygon-based skewing as it has zero, zill, null, nada impact on the performance and still open ups more ways to make effects (like the one you did here)

When I do a feature request for general properties I want included in the sprite/object API, of course it needs to be very flexible AND very fast. Otherwise there is no point in requesting it. If it has big impact on performance it’s no deal.
I want skew / taper to be included so it can be used for general purpose AND special cases
(As an example you just used spritesheets to achieve this effect. You could have done it even without it by creating unique textures/object for every two rows but that would have been a hassle, and have rather big performance toll would’t it? More general API functionality with good performance in mind gives us better tools to build new effects on top) Thats all :slight_smile:
I did not want 3D (and if I would, I for sure would go for more Industry standard software like Unity or UDK) I simply want skewing for sprites/displayobjects to be able to use this for secondary-animation effects.

[import]uid: 37802 topic_id: 22733 reply_id: 102186[/import]