Sign in to follow this  
Exx2xxO

Bend sprites around a point ?

Recommended Posts

Hey everyone !

 

So if you didn't get the title's hint  :D : Is there a way to bend, fisheye like, straight sprites around a given Point so it appears to be round? The Problem I'm facing is:

 

I want to generate a more or less random planet surface, but for that I want to use a tile set so I can just put them in a row like a plain area and then with some magic *pow* --> a planet...

 

...well maybe not magic but some phaser power :D So is there a way to trick the player with some fisheye camera technique or some sprite bending power?

 

Thanks :)

 

Exx

Share this post


Link to post
Share on other sites

You're going to build a sprite as bitmap data, looping through the different bands and save it to the cache and then apply some maths to it and make it into a sphere. 

You can do that the hard way (like finding an external library) or by just writing a stupid approximation — like looping through columns to make each pixel column a different height to create the illusion of a bulge? Then you'd save it as a sprite.

I found some stuff that might give you an idea of the differences between the easy and hard way.

http://stackoverflow.com/questions/1927145/how-to-simulate-fisheye-lens-effect-by-opencv
http://www.user00.com/my2iu/workshop/fisheye/fisheye.html

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.