2D distortion : flag, wave, accordion

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

2D distortion : flag, wave, accordion

Post by eddy »

A little image tool. :lol: ( Sprite3D + TransformSprite3D + trigo )

Image
Last edited by eddy on Thu Jun 26, 2008 6:26 am, edited 4 times in total.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

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

Post by Rings »

nice effects.
would also be nice to have the snippet to use
that in own code.
SPAMINATOR NR.1
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

yeah, I will release a snippet soon
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post 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.
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post 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
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
zxtunes.com
Enthusiast
Enthusiast
Posts: 375
Joined: Wed Apr 23, 2008 7:51 am
Location: Saint-Petersburg, Russia
Contact:

Post 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.
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post 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
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post 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.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
zxtunes.com
Enthusiast
Enthusiast
Posts: 375
Joined: Wed Apr 23, 2008 7:51 am
Location: Saint-Petersburg, Russia
Contact:

Post 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
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

I need a cross-plateform lib
So I will continue to use the PB engine.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
Michael Vogel
Addict
Addict
Posts: 2846
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Post 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:
User avatar
Michael Vogel
Addict
Addict
Posts: 2846
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Post 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
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post 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:
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
Michael Vogel
Addict
Addict
Posts: 2846
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Post by Michael Vogel »

Thanks eddy,
I'll have a look for Sprite3D now...
Done :lol:
Post Reply