Page 1 of 1

GUI for editing sky files

Posted: Fri May 24, 2013 2:08 pm
by Fiodis
A few years ago I was working on a GUI for editing sky files. That died when I stumbled on a problem in the OpenGL wrapper which I didn't have the coding expertise to fix. Later, for the ZE terrain tools (which are still being worked on, by the way), I moved on to C++, so there's no OpenGL wrapper needed. I recently got access to the old PC I was coding on two years ago and managed to recover the old sky gui code. It's in C# rather than C++, but I could still get some useful snippets from it.
The old GUI:
Hidden/Spoiler:
Image
Now that final exams are over and summer started with, I've decided to spend twenty days or so cleaning up the old code, slapping together some new stuff, and releasing it. The original idea was that it was annoying making changes to a sky file and have to munge the world and start up BF2 to see what they looked like. The plan was to create some kind of GUI to visualize a sky file and make changes to it on the fly. To that end, I've spent a couple hours a day since Monday making the different recovered code snippets play nice with each other, and writing a few new ones. The result:
Hidden/Spoiler:
Image
Hidden/Spoiler:
Image
Hidden/Spoiler:
Image
Sky file loading, saving, and all the editing features work. All that's left is the 3D preview.

Not sure how useful it'll be, but I didn't want semi-useful code to go to waste. Once the ZE terrain tool progresses a bit more, I'll probably merge this tool's functionality with that one's, so that you can easily make directional lighting match up with sun position and stuff like that.

Re: GUI for editing sky files

Posted: Fri May 24, 2013 2:41 pm
by THEWULFMAN
Seems pretty awesome as always, Fiodis. :)

Re: GUI for editing sky files

Posted: Sat May 25, 2013 2:16 pm
by Locutus
Now that's pretty handy! :D

Re: GUI for editing sky files

Posted: Sat May 25, 2013 2:28 pm
by Marth8880
Looks absolutely magniflorious! :thumbs: I'd make the text boxes black and the text box text color white, though, or alternatively the text boxes black, the text box text name color white, and keep the text box text color yellow.

Re: GUI for editing sky files

Posted: Sun Jun 23, 2013 1:45 pm
by Fiodis
Fiodis wrote:I've decided to spend twenty days or so cleaning up the old code, slapping together some new stuff, and releasing it.
I never did say they'd be consecutive. :P

Anyway, the downtime's gone into rewriting the code for loading MSH files, from scratch. I was using code ripped right out of my terrain tools project, which was written almost six months ago. I've gotten a much better understanding of OpenGL and MSH files since then, and rather than try to figure out how to get my horrendous old solution to work (I'd left myself almost no comments) I just started over.

Result: old code was over 1,000 lines spread among five different source files. The new code's down to 300 and tidily packaged up in a nice "Mesh" class. And it still runs faster and wastes less memory. :)

So stuff's still happening! Geonosis skydome:
Hidden/Spoiler:
Image
EDIT - Oops! UVs on the v axis are flipped upside down, there. Fixed.

Re: GUI for editing sky files

Posted: Sun Jun 23, 2013 1:58 pm
by THEWULFMAN
Looking good. :o

I vote to call it the SkyGooey. Phonetic pronunciation rocks. Samantha Traynor for the win.

Re: GUI for editing sky files

Posted: Sun Jun 23, 2013 3:10 pm
by Marth8880
Absolutely magniflorious! :thumbs:

(I vote for SkyGooey as well - LOL.)

Re: GUI for editing sky files

Posted: Sun Jun 23, 2013 3:14 pm
by Eggman
I really like this idea! One of my biggest frustrations with the SWBF modding process was that you could never really see your changes in "real time." I've been getting back into playing around in ZE lately, so if you release this at any point in the summer, I'll try it out! :thumbs: