Game Development Community

TGEA Art tool request (Cube Map Related)

by Weston · in Torque Game Engine Advanced · 11/22/2006 (11:42 am) · 9 replies

Currently, building a successful cube map in TGEA involves several steps, and often quite a bit of time. In order to edit them effectively, they must be opened in photoshop, merged into a single file, and rotated into place. Once changes are made, the pieces must be selected and copied out to their original, individual files, and re-rotated into place. This needs to happen each time changes are made. Since you can't know how a cube map will really look until it's visible in-engine, many changes are often required to get the desired effect.

So I'm requesting a small utility to remedy this time sink. It would take a singe image file, made up of all the cube map sides, and pull it apart into the proper files. It would execute rotation and naming to make the files ready for use by the engine. Ideally this would be built into the engine, so developers don't have to deal with the clutter of individual files. We'd only see the merged file. Hopefully this would be extended into the material.cs definitions, so only a single file name would be necessary there as well.

Below, shown as 'layout 1', is the preferred cube map configuration. This is the way modeling suites generally layout their cube maps. For some reason TGEA requires the configuration shown in 'layout 2'. The second configuration is cumbersome for painting and just doesn't make sense given the way humans view the world.

www.ffdigital.com/Plan_Pics/CubeMapLayout.jpg
If anyone out there has the time or energy to work on this I'd greatly appreciate it. It would smooth out a large bump in the TGEA art pipeline, and make me a very happy camper. If someone is serious about getting this done, I'd be willing to compensate them with an exchange of service.

Please contact me with any questions,

Weston

weston@ffdigital.com

#1
11/22/2006 (1:20 pm)
I THINK!!!!!!!

This could probably be accomplished through a Photoshop Action.
The Action could record how you rearranged the layout.

Havnt tried it myself, but there should be a non programming way
to do this.

-Surge
#2
11/22/2006 (2:15 pm)
I've monkeyed around with trying to get photoshop to handle this. You can use slices and actions to set it up.
It's still pretty messy, and you're still dealing with all 6 files.

That fix still means that every user out there has to set up their own photoshop work around. If one programmer would set this up in the engine one time, it would save hundreds of people the hassle of doing it on the user end.

Weston
#3
11/23/2006 (6:34 am)
Good call, Weston. This is right up there with a visual material editor.
#4
11/27/2006 (2:49 pm)
I make sky maps all the time. Have you heard of a program called Infranview? It has a panorama picture assembler so you can get a view of the assembled picture. There is also a Tutorial in TDN about making sky-cubes with Bryce, which is a cheap program that can even be found for free(the old version), but It does what you need. I make sky cubes in about a half-hour, that includes rendering time. And if you really want to hand paint them hand paint the ones you import from Bryce, assemble with Infranview, and then paint with photo-shop then cut it afterwards. I hope this helps:)

PS Infranview won't put the top and bottom part in the right spots, it adds them on the ends, but at least this helps a little. contact me at lmaceleighton@msn.com for more help, I'm sure i can help you with this:)
#5
11/30/2006 (1:48 am)
I think he's taking about reflection maps rather than sky maps, although the principle is similar.
#6
11/30/2006 (4:15 pm)
I'm talking about cube maps, not sky maps. I guess there are similar issues.
Either way, if developers only had to deal with a well layed out single image, it would go a ways towards making the TGEA pipeline more user friendly.

Even with a slick photoshop script or a second party solution, there's unnecessary headache. Also anyone who doesn't have the script or the other program will end up wading through the bog of a poor art pipeline.

I'm just pointing this out as a cool opportunity for some streamlining. It's a little bit of work for a programmer that will make real refinement and polish possible.

@Adam

Good call, this isn't nearly as necessary as a visual material editor!
#7
11/30/2006 (5:01 pm)
Okay Weston, try this Photoshop script. It will take a skybox in the "good" layout and dump out the 6 sides to jpgs rotated to reflect the bad layout.

ezupa.com/gg/SkyBoxChop.zip

Put the .js file in Program Files\Adobe\Photoshop\Presets\Scripts\
Execute in PhotoShop from File > Automate > Scripts: SkyBoxChop.js

You own me now Weston. Oh wait, I still own you a couple animations.... Umm.. Dang it....
#8
12/04/2006 (7:12 pm)
@Mark,

Wow, thanks man! This will help out a bunch.

I hope you didn't go out of your way to build this. But thanks either way!

The whole point of this thread was to try to get one programmer to fix this so that hundreds of developers wouldn't have to find a run around. But this will solve my problem at least.

You're a king among men Mark!
#9
12/05/2006 (6:28 am)
I actually use a photoshop action too.

But incidentally, it would be easier if we just supported DirectX cubemaps as a format i think.. Those are .dds files that have a special layout.

Unfortunately, its NOT like your layout weston. Its kind of like a long strip of cube-map sides. They used it for Eve online though (I know because I wrote a ripper to rip thier art files so I could have a look).

Let me take a look though.. I might be able to use this myself. So might be a quickie project I can hack together.

Incidentally, the directx .dds format is essentially as you have laid out (all the horizontal sections are contigous) but with the top and bottom sections tacked onto the ends rather than above/below.

You do realize you would have to get an updated TGEA for this right? :)