Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How to deform a Sprite / a texture?

Author
Message
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 18th Sep 2019 12:27
I saw this video


The software is not available for the PC. We have tweens and so on in App Game Kit and I know, that some texture deforming is showing on some 3D models.
Is it possible and how would it be done in App Game Kit, to deform a texture?

Shader? Or would I have to create a 3D mesh in memory with vertices and move them around? How these weight points would be done?
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 18th Sep 2019 13:46 Edited at: 18th Sep 2019 13:50
I would go for the 3D mesh, but use a terrain mesh as its split into several sections(or make it via memblock) use the orthographic projection and a vertex(or pixel) deformation shader.
Maybe use a texture for the deformation direction, like a flow map for rivers.

I guess deforming the vertices is a tiny bit faster but the pixel shader has better quality obviously.
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 18th Sep 2019 17:46
Quote: "I saw this video... The software is not available for the PC. "

Interesting.


I am currently working on spine based 2d animations for a little tool I need.
I had not considered manipulating the image other than placement and rotation based on spine movement.

This technique is very interesting.
However, I can see their limitations in the actual accelerators and how adding them would end up with a thousands buttons with each button have multiple buttons and sliders.
Limit the options, and the animations suffer the same limitations, and then only the basics motions are covered restricting it to only cartoon style, which could be good or bad depending.
Seems like this may be spun off from some popular speaking animation software, since it uses similar methods to make mouths speak.
So, the limitations on accelerators is still great stuff for simple animations like cartoons and speech.

Using the image stretching and manipulation on top of spine based animations would bring endless possibilities.
Even just a torso experiment for an idle breathing animation seems be too tempting to not try.

It should be possible using memblocks, which I recently mentioned in another thread ...

Quote: "

...Something you can play with when using the image/memblock commands...

CreateMemblockFromImage( memID, imageID )

CreateImageFromMemblock( imageID, memID )
"


In that thread we were talking about Alpha Blending, but manipulation of every pixels is possible with these commands accessing the bytes for the RGBA values.
They seem a bit too taxing to use every frame, but once your images have been created, then the playback of the animation would be like any other.
A buffer would be needed for on the fly processing/streaming of lengthy animations, but building the frames procedurally from the base parts should be much smaller storage wise than traditional methods. So, with the right processors, this could be key to a new streaming compression method for cartoons.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 19th Sep 2019 01:40 Edited at: 19th Sep 2019 02:08
Just did a quick test in the tool I am working on, and found that just changing the width of the sprite gave me a nice breathing torso.

Have a FPS selector from 2 to 32 fps already built in, and added a breathing accelerator easy just by running a timer based on the FPS setting.

Used a preset amount of range for the sprite's width, but a slider for that would be easy too.

Quote: "The software is not available for the PC. "

Similar software created with AppGameKit could be available for PC.

Using separate images for the body/item parts as with traditional vector art would be compatible with many available art assets as opposed to drawing all your own and then lassoing the parts to accelerate. In other words, I think the AppGameKit made software for PC could be better than what is shown in the video.

Pre-programming the spine and accelerators with interchangeable parts would be nice. (even just 2D)

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 19th Sep 2019 05:44
What could I imagine?

spillint an image into 9 sections, "cloning" and "rotating" the "middle" multiple times on a path. The Rotation of the middle-section-sprite would be the same as the angle of the path-tangent.
With to pathes, we could tween between these pathes and so we also would know the new angles for the Sprites.

I guess, with some of these could come handy

"Some usefull 2D and 3D tools effects and snippets"
https://forum.thegamecreators.com/thread/222027
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 19th Sep 2019 06:50
do you mean like Slice Wise https://npgames.itch.io/ can be played there in browser
or you could go to the thread https://forum.thegamecreators.com/thread/214143
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 19th Sep 2019 09:12
@fubarpk not exactly, more like a wave or warp shader, or wave-effect

But nice game, didn't know about it yet. And you disctrued me from work
Thx a lot
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 19th Sep 2019 15:34
Quote: "spillint an image into 9 sections, "cloning" and "rotating" the "middle" multiple times on a path. The Rotation of the middle-section-sprite would be the same as the angle of the path-tangent."

The path is a series of bones in a sense, but yes, that is most interesting.
Seems this may have been the method for the tail wag,

Sounds like you want to use the tweens for framing in between the key frames.

I hadn't gotten that far, and was just placing bones for each frame, building a new frame off the current frames positions and then slightly modifying that before adding the next frame.
Working in a series in an old school method, with the advantage being the interchangeable part and not trying to shortcut on the animation control.
Once the animation is done, then it can be skinned quickly to generate the animations for the new character(s), but this is completely different.
My tool was to just have the basic animations.. idle, walk, run, jump, slide, climb, swim, attack, defend, throw, etc... ready for any new character done in the parts.
It is just a shortcut for generating traditional PNG sprite sheets for new characters, and not anything for creating animations for cartooning short stories.
I will be adding some of these for my simple little tool, but I feel a new App would be needed to generate customs animations using these techniques for non-stock work.
I will leave that to you for your project, because my project will not be using any shaders, just direct sprite manipulation to create the frames for single animations.
I can still add some simple things like that breathing effect to the idle animation, and some squash/stretch effects for the jump and slide etc. , but I doubt that I get too elaborate to start with.
This would definitely be fun to work on though, and pretty much an endless project, so I will keep my sights set low as to not get wrapped up in it or carried away.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1

Login to post a reply

Server time is: 2024-04-23 16:47:43
Your offset time is: 2024-04-23 16:47:43