Page 1 of 1

2D distortion : flag, wave, accordion

Posted: Tue Jun 24, 2008 2:51 am
by eddy
A little image tool. :lol: ( Sprite3D + TransformSprite3D + trigo )

Image

Re: Sprite 3D Deformation : flag, wave, accordion

Posted: Tue Jun 24, 2008 8:55 am
by Rings
nice effects.
would also be nice to have the snippet to use
that in own code.

Posted: Tue Jun 24, 2008 11:47 am
by eddy
yeah, I will release a snippet soon

Posted: Tue Jun 24, 2008 12:21 pm
by Derek
I had the impression that it would make static images so that came as a surprise, really fast too.

Will be interesting to see the code.

Posted: Thu Jun 26, 2008 6:27 am
by eddy
-beta 2-
:arrow: Download : http://www.datafilehost.com/download-dfc1ed9a.html

- detect alpha channel
- can change sprite grid resolution
- new layout mode
- stretch fx

Image

Posted: Thu Jun 26, 2008 12:48 pm
by zxtunes.com
And where button Save? (or even Render to AVI) 8)

There is no still button Reset to Default.

Why you do not use interpolation?

Because of it in a picture seams and even holes are appreciable.

Posted: Thu Jun 26, 2008 2:09 pm
by eddy
holes
Could you post a screenshot ?

It's a kind of mesh, so perhaps it's normal if your amplitude X or Y is too high

Posted: Fri Jun 27, 2008 10:54 pm
by eddy
I tested it with my old graphic card 'geforce 2 MX' (last driver and last directX9 version) ... And I saw some holes inside the grid.

Perhaps it does not support this filter #PB_Sprite3D_BilinearFiltering

A good solution would be to use a true mesh grid.

Posted: Sun Jun 29, 2008 11:22 pm
by zxtunes.com
eddy wrote:I tested it with my old graphic card 'geforce 2 MX' (last driver and last directX9 version) ... And I saw some holes inside the grid.

Perhaps it does not support this filter #PB_Sprite3D_BilinearFiltering

A good solution would be to use a true mesh grid.
I advise you to use HGE. 8)

There is fair present distortion mesh and any deformations are accessible.

A theme and examples here: http://www.purebasic.fr/english/viewtopic.php?t=32139

Posted: Mon Jun 30, 2008 3:50 pm
by eddy
I need a cross-plateform lib
So I will continue to use the PB engine.

Posted: Fri Jul 25, 2008 6:35 pm
by Michael Vogel
Hmm,

I'll try to receive a google map for a certain area, convert it to an image and... (now comes the tricky part :x)...

...display it (as a ground map together with a sporting track above it) in pseudo 3D. I'd like to respect the perspective, so the rectangle image will have to be transformed (hopefully fast enough) into an area of an irregular rectangle.

:?: Would you be so nice to tell me how fast this can be done? Is there any chance to transform a screen sized map into any rectangular in some milliseconds? :idea: Or do I have to expect longer calculation time that realtime rotation wont be possible?

Maybe there are some code snippets for me :roll:

Posted: Fri Sep 05, 2008 11:18 am
by Michael Vogel
Michael Vogel wrote:... I'll try to receive a google map for a certain area, convert it to an image and... (now comes the tricky part :x)...
Maybe I can give you a better imagination of what I'll try to do...

I try to add a geographic map to a 3D viewer (http://mr.vogel.googlepages.com/GPS) written in PureBasic.
The program displays a sport track in 3D (see below) and the geographic map should be loaded from Google Maps and be displayed instead of the ground rectangle of the track.

Image

Therefore I need a VERY FAST routine which distorts the image into the ground shape (in real time?!)

Are you able to give me a hint how to do this?

Thanks,
Michael

Posted: Fri Sep 05, 2008 12:28 pm
by eddy
My 2D transformations are fast because I used Sprite3D. (accelerated by GPU)

For your project, you could use some 3D commands to do that.
1- generate 3D mesh from Google datas
2- rotate your 3D track map

It could be a good idea for a PB opensource project. "a google map generator" :wink:

Posted: Sat Sep 06, 2008 8:12 am
by Michael Vogel
Thanks eddy,
I'll have a look for Sprite3D now...
Done :lol: