Hello,
Fist thanks for this tool, i just begin and already am charming by the results of my little tests.
Here is the question:
Can someone point me the direction to make love print panoramic images with this kind of images:
http://en.wikipedia.org/wiki/File:Globe_panorama03.jpg
http://en.wikipedia.org/wiki/File:Stere ... _Paris.jpg
(the images are extracted from here:
http://en.wikipedia.org/wiki/Panorama
http://en.wikipedia.org/wiki/Stereographic_projection)
Does the love API permit distortion of images to render this kind of image adequately (if yes can you point me to it. A search in the web site and the forum did not help me)?
If not maybe another module need to be build? In this case i'm afraid there will have some code to write in C or C++, and need some knowlege in math ... Despite it look far out of my competence, where should I start if one day I decide to building such a module? For example, is there an existing module that can be used as template or extended to draw such an images?
Thanks a lot
ddbx
Render spherical /stereographical /panoramicimages in löve
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: Render spherical /stereographical /panoramicimages in lö
Right now you would have to preprocess it with something like this: http://www.youtube.com/watch?v=k5vDgVBTTgg
You should be able to do it with 0.8.0's pixel effects (fragment shader) though.
You should be able to do it with 0.8.0's pixel effects (fragment shader) though.
Re: Render spherical /stereographical /panoramicimages in lö
Hi, thanks for your responce, I did not understand your response. My concern is to view the images I show you in my previous message in a love application. It should look like the olds Mysth or Atlantis series of game.
cordialy
ddbx
Does this mean that it will be possible to view these images in a future release without touching any C code, and indeed, it is not actualy possible?You should be able to do it with 0.8.0's pixel effects (fragment shader) though.
cordialy
ddbx
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Render spherical /stereographical /panoramicimages in lö
I think it would help if you defined a bit more what you understand by "view in LÖVE". There are too many ways to "view" those images in love.
Describe what the screen should show, or better, make a mockup screenshot if you can.
Describe what the screen should show, or better, make a mockup screenshot if you can.
When I write def I mean function.
Re: Render spherical /stereographical /panoramicimages in lö
ha. Here is a flash application that produce the effect I would want to see:
http://www.360cities.net/
And google street view:
http://maps.google.com/help/maps/streetview/
Here it is atlantis an adventure game:
http://www.youtube.com/watch?v=JYlzsZcuVkY
In my idea, the player move between multiples environments like these.
http://www.360cities.net/
And google street view:
http://maps.google.com/help/maps/streetview/
Here it is atlantis an adventure game:
http://www.youtube.com/watch?v=JYlzsZcuVkY
In my idea, the player move between multiples environments like these.
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: Render spherical /stereographical /panoramicimages in lö
Ah, hey, I hate to say it, but the images linked to in the original post AREN'T panoramic. Nor are they stereographical. These terms mean different things.
What those two (awesome, by the way) pictures show is a Polar Transform. Look it up in your graphics app, it should have it. Basically, you're transforming your image's coordinates from a cartesian to polar coordinate system (or the other way around, I forget).
EDIT) Yeah, it's a cartesian to polar. You may have to flip your image upside-down first, if your ground is wrapped around the edges of the image instead of the middle, though.
I suppose you could recreate the effect with pixel shaders (have to wait for 0.8.0) or with ImageData:getPixel and ImageData:mapPixel (would be trickier, but could plausibly be done right now).
What those two (awesome, by the way) pictures show is a Polar Transform. Look it up in your graphics app, it should have it. Basically, you're transforming your image's coordinates from a cartesian to polar coordinate system (or the other way around, I forget).
EDIT) Yeah, it's a cartesian to polar. You may have to flip your image upside-down first, if your ground is wrapped around the edges of the image instead of the middle, though.
I suppose you could recreate the effect with pixel shaders (have to wait for 0.8.0) or with ImageData:getPixel and ImageData:mapPixel (would be trickier, but could plausibly be done right now).
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Re: Render spherical /stereographical /panoramicimages in lö
There's a bunch of weird and cool stuff coming up in 0.8, isn't there?
Re: Render spherical /stereographical /panoramicimages in lö
Uhm, Globe_panorama03.jpg and Stereographic_projection_of_Paris.jpg are stereographical projected panoramic photos. At least if you go by the definitions from wikipedia.Taehl wrote:Ah, hey, I hate to say it, but the images linked to in the original post AREN'T panoramic. Nor are they stereographical. These terms mean different things.
And yeah, projecting in realtime is something for the PixelEffects in 0.8.0. The source photo doesn't have to be stereographical projected though.
Shallow indentations.
Re: Render spherical /stereographical /panoramicimages in lö
Yes it is stereographical images. I put spheric and panoramic in the subject in case someone have a similar question.
Thanks to all for your replys
Ok i will wait for the 8 to try this.
And yeah, projecting in realtime is something for the PixelEffects in 0.8.0. The source photo doesn't have to be stereographical projected though.
Thanks to all for your replys
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: Render spherical /stereographical /panoramicimages in lö
Most of this is Boolsheet's code:
Cartesian -> polar
Cartesian -> polar
Code: Select all
float pi = 3.14159265;
float norm = 0.70710678118654752440084436210485; //0.5^0.5
vec4 effect(vec4 global_color, Image texture, vec2 texture_coords, vec2 pixel_coords)
{
float radius, theta;
vec2 shifted = texture_coords - vec2(0.5, 0.5);
radius = 1 - (sqrt(pow(shifted.x,2) + pow(shifted.y,2)) / norm);
theta = atan(shifted.y, shifted.x);
vec2 pos = vec2(theta/(2*pi)+0.5, radius);
vec4 color = Texel(texture, pos);
return color;
}
Who is online
Users browsing this forum: Google Adsense [Bot], zingo and 5 guests