Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Sky-sphere generator

Author
Message
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 19th Apr 2011 15:00 Edited at: 20th Apr 2011 18:48
OpenSky

I thought I'd share this tool I made with everyone. You give it a single image of a background you want and it will convert it into a sky-sphere with very little distortion.

The only constraint on the image is that it is fairly large, and is twice as wide as it is high. (4096x2048 is best) It doesn't need to be seamless.

Example input (click for larger version):


Example output:


EDIT:

New features:
- Support for skyboxes
- Speed increase
- Convert multiple images at once
- Browser programs to view the results included
- Example source code included
- Huge image support

You can download it here.


How it works:
First the image is divided up into the following regions:


The green areas are left as they are. The orange area of each side is smoothly blended into the blue area of the opposite side, so at the inner circle it will be completely blue, and at the middle circle it will be half-way between blue and orange. Everything outside the middle circles is then discarded.

Next, the two circles are mapped onto the top and bottom of a sphere. Imagine you draped a piece of circular cloth over the top of a sphere. That happens for both the top and bottom of the sphere. Thanks to the blending in the previous stage, the edges of these two sides will match up at the middle.

Finally, the sphere is unmapped back into a texture based on the default UV coordinates of a sphere in DBPro. (So the top of the image is the north pole and the bottom is the south pole)

The whole process uses antialiasing, so the image you get back should be perfectly smooth.

[b]

Attachments

Login to view attachments
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 19th Apr 2011 21:05
@ Diggsey - does this created an altered texture for a geosphere or for the sphere you can make with inherent DBPro commands?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 19th Apr 2011 21:33
Looks pro!!!

Are the skyboxes that we make with it free for commercial&non-commercial use? (Forgive me if there is a license in the file, it's still downlading)

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 19th Apr 2011 22:48 Edited at: 19th Apr 2011 22:49
It works for spheres made with the "make object sphere" command.

You can use textures made with it however you like.

[b]
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 19th Apr 2011 23:33
Quote: "You can use textures made with it however you like."


So nice .

I already tested it, produced me a beauty sky sphere

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 20th Apr 2011 00:04
Out of curiosity - do you need to distort on the original image on a geosphere like one attached?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Attachments

Login to view attachments
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Apr 2011 00:06
The shape of the sphere is not important, it is the UV coordinates which matter. If the UV coordinates are such that the top of the image is at the north pole and the bottom is the south pole, then the image should work.

[b]
Super Clark
FPSC Reloaded TGC Backer
13
Years of Service
User Offline
Joined: 4th Apr 2011
Location:
Posted: 20th Apr 2011 03:20
Hi nice little tool my friend just wondering how you get the
image to work in fpsc. I output the image fine, but i have no
idea what to do from that point. Im very new to fpsc still testing
all the goodies. Any chance you could make a small TuT for us
newbies?

Thanks
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Apr 2011 03:54 Edited at: 20th Apr 2011 14:06
Hi. Unfortunately, I don't know how FPSC handles skyspheres, so I can't answer your question. Maybe someone else will know?

For DBPro, the example code below is the code which lets you view the skysphere when it's been created:



I've just ported the code to C++ making it about 10x faster and able to exceed the image size limit of the graphics card, and I'm going to hopefully add support for skyboxes too, so you can save on polies.

[b]
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Apr 2011 18:40 Edited at: 20th Apr 2011 18:47
New version released! (Download link in first post updated)

The program is now called OpenSky.

New features:
- Support for skyboxes
- Speed increase
- Convert multiple images at once
- Browser programs to view the results included
- Example source code included
- Huge image support

[b]
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Apr 2011 13:59
Nice work as usual Diggsey.

This is a really handy tool, thanks!

Vent
FPSC Master
15
Years of Service
User Offline
Joined: 3rd Apr 2009
Location: BC
Posted: 28th Apr 2011 04:04
Cool program, nice work.

Quote: "Super Clark"


FPSC uses sky boxes, if you want to use a sky sphere make a large model of a sphere and put it over the map.

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 28th Apr 2011 18:36
@VENT
This program generates skybox textures as well as a sky sphere texture

[b]
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 28th Apr 2011 21:39 Edited at: 29th Apr 2011 05:04
I only use skyboxes so I will check this out very soon, as I have need of one that isn't in the skymatter packs. Thanks Diggsey!


[EDIT]
Oh no! Undone by the Win7SP1 problem with "unknown parameter"! Please compile OpenSky with 7.7rc7!


A 3D marble platformer using Newton physics.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st May 2011 16:07
It won't run for me, it opens up and immediately closes, I get no error messages or clues as to what happened

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 22nd May 2011 12:13
You have to drag the image(s) you want to convert onto "OpenSky.exe" for it to work. (README.txt)

If that wasn't the problem I apologise!

[b]
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd May 2011 14:45
No, I don't get anything at all. Just a quick flash of something and then it's gone.

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 23rd May 2011 12:14 Edited at: 23rd May 2011 12:17
Are you sure it hasn't just finished quickly? Is there a new folder in the same place as the image with the same name plus an underscore?

If not there are a few things you can try:
- Go to the OpenSky subfolder and open the properties of the OpenSky.exe there. If there is a message saying something like "This file came from another computer and might be blocked to help protect this computer" and an "unblock" button is there, click it and try again.

- If you are on vista or windows 7 try running in compatibility mode.

- If that doesn't work move the contents of the OpenSky subfolder into the main folder overwriting OpenSky.exe and try again.

[b]

Login to post a reply

Server time is: 2024-04-18 21:38:15
Your offset time is: 2024-04-18 21:38:15