Extern 2D-Library

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
fcloud
Posts: 5
Joined: Sun Oct 12, 2008 8:47 am

Post by fcloud »

BlindSide wrote:How bad is the deformation? Can I see a screenshot?
Oh, e.g. when a CSprite of rectangle rotatoins, the result looks a rhombic.
[img]file:///E:/002.JPG[/img]

Sorry, I can't paste an image.

origin:
---------
| |
---------
result:
______
\ \
---------
:lol:

Can you work out this explanation?
OK, The tested picture is media/001shot.jpg. Please you do a test like this. The rotation's degree is 5.0f.
Last edited by fcloud on Fri Feb 20, 2009 2:47 pm, edited 3 times in total.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

No local files, you have to upload it somewhere :lol:
fcloud
Posts: 5
Joined: Sun Oct 12, 2008 8:47 am

Post by fcloud »

hybrid wrote:No local files, you have to upload it somewhere :lol:
Hello, hybrid.
It's very inconvenient that we can't upload images directly. Save the storage's space? :)
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

SF doesn't allow for direct uploads, but the possible abuses would make it pretty dangerous anyway.
geckoman
Posts: 143
Joined: Thu Nov 27, 2008 11:05 am
Location: Germany
Contact:

Post by geckoman »

Ok the problem is that with rotating the image it deforms because the aspect ratio does NOT rotate.
I did not recognize it coz I use it just as a Background.
fcloud
Posts: 5
Joined: Sun Oct 12, 2008 8:47 am

Post by fcloud »

rotate 0.0f
Image

rotate 5.0f
Image
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Huh, it's just rotated, I don't see the problem! Rotation always results in this kind of distortion unless you anti-alias.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
geckoman
Posts: 143
Joined: Thu Nov 27, 2008 11:05 am
Location: Germany
Contact:

Post by geckoman »

Not Rotated see its widescreen:

Image

Rotated 90.0f, it should be higher than wide, but its not.

Image
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

I see now, yeah I guess it's the aspect ratio.

You can see I am zeroing out the view matrix:

Code: Select all

 driver->setTransform(irr::video::ETS_VIEW, matrix4()); 
Where infact I should create one with 0,0,0 position and 0,0,1 target and 0,1,0 up vector and set a proper aspect ratio in respect to the resolution given by driver->getCurrentRenderTargetSize.

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

I updated the CSprite thing to get rid of aforementioned problems and added some helper functions that allow setting the vertex colors/alpha for tinting, etc.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply