PDA

View Full Version : Requestng Skybox assistance


malexander
11-13-2007, 03:19 AM
I am working to create a slew of textures for a 6-sided skybox in a space game. I've got some really nice nebulae and starfields and such, and they tile seamlessly between sides, but when applied to the box in 3D there is distortion happening towards the edges and corners. I've been experimenting with Photoshop's Lens Correction filter, but it seems like it peels away from the edge too dramatically, when what I really want is a gentle gradient.

It's a standard set-up; 60 degree field-of-view rooted at the center of the box. Surely there is some kind of filter or Photoshop action I can take to correct this?

Plz?

Marcel
11-15-2007, 07:04 PM
What I usually do is make a sky texture in Photoshop and map it on a sphere in my 3D program.
Then I create 6 cameras (with a 90 degree field of view) and render out the skybox textures by hand. Once you've set it up it works perfectly...

(You might need to do some blending tricks on the sphere in your 3D program to avoid the pinching of the texture because of the UV mapping.)

ghib
11-16-2007, 04:54 PM
hi guys, I worked for a game dev company that used Valve's Source engine which required a skybox with 6 textures. I came across the same problem with the distortion at the corners and edges. It's a hard thing to visualise on a flat texture how it will distort once applied to the skybox.

That is until I discovered an amazing deceptively simple free app called... funnily enough 'Skypaint (http://www.skypaint.com/)' which allows you to rotate a camera completely around a scene then send a snapshot of the view to Painting app of choice (I used a combination of Photoshop & Painter) You do some painting in said app then simply 'send' back to Skypaint and it will project whatever you did in photoshop onto your scene. If you're familiar with Zbrush then think of it as being a little bit like ProjectionMaster & zappLink.

Once your sky has been fully painted you have a number of export options one of which being the ability to export to 6 images to be applied to a skybox.

et voila, no more distortion.

you can see some examples of the end resulting images stitched together seamlessly on my 'folio' (http://www.polymort.com). scroll down to '2d Skybox paintings' I only presented 5 images on my folio as the bottom texture was never seen largely due to being hidden under the horizon geometr and the fact that it was generally blank aside from some sloppy brush strokes.

Good luck with your painting.

kabojnk
11-17-2007, 05:47 AM
This might be helpful:

http://www.devmaster.net/forums/showthread.php?t=8702

Marcel
11-17-2007, 09:49 AM
I tried 'Sky Paint' as well but couldn't get it to work. It seems very old, like a Windows95 program or something. I managed to take a snapshot and bring it into Photoshop, but after that Skypaint went missing. It was still running, but I couldn't switch back to it.

kabojnk: The 'render cube maps' function in Max works like a treat. Saves a lot of time setting up cameras :)

kabojnk
11-17-2007, 07:22 PM
@Marcel: Agreed. I'd probably use something similar for Maya if Maya even has anything like that. If not it'd always be easy to whip up a mel script I guess.

Also, Skypaint is really old and despite the date it was last modified it was a program developed mostly for Quake 2 skyboxes (AFAIK), so I don't think it would be too helpful in running much less providing decent skyboxes for Source games--even if the technique hasn't changed much in setting up the actual skyboxes. Also Marcel is right about the look & feel. It looks like a mini Bryce2 program. ;)

My recommendation is to go with Marcel's original advice of mapping onto a sphere.

If it weren't for the fact that the skybox is supposed to be outer space, I'd suggest using Terragen (not the TG2 Tech Preview) to render the skyboxes since there's already a TG script that renders them and then process the renders in Photoshop; however, it would be fairly easy to do a space setup entirely in Photoshop as well.

ghib
11-18-2007, 09:55 PM
You guys are totally wrong about skypaint I'm afraid. ok admittedly it's an old app, but the technology behind skyboxes in games hasn't changed much at all. It is perfectly suitable for creating skyboxes even for 'advanced' engines such as Source. Just set whatever dimensions you need and you're away. Snapshot your 6 sides to photoshop > paste in your space nebulae then it's just a matter of capturing the distorted areas and copy pasting. couldn't be simpler.

Marcel - If you had installed the photoshop actions that came with Skypaint you would have been able to save and send your painting back to skypaint. This even works if you want to use Painter though the workflow is not quite as smooth.

Don't be put off by the look of the app, haven't you ever heard of the term 'don't judge a book by it's cover'? Look at Headus' UVLayout for instance (looks like a linux genetic throwback but is the most solid uv unwrap program out there). Superficially Skypaint looks like a pile of crap but it's proven itself to me in a production environment to be stable, produce very decent results and is a huge timesaver.

but... if you want to ignore this advice... be my guest :p

Marcel
11-19-2007, 09:26 AM
Marcel - If you had installed the photoshop actions that came with Skypaint you would have been able to save and send your painting back to skypaint. This even works if you want to use Painter though the workflow is not quite as smooth.

Ah ok, I didn't read the instructions (I jumped right in) so I didn't see that I had to install the actions. :)

I'll try to see if I can get Skypaint to work without crashing, I can image this workflow really being usefull.

CGTalk Moderation
11-19-2007, 09:26 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.