3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1] 2

Author Topic: sky2rad v0.2 Skybox Import Tool  (Read 4643 times)

« on: September 23, 2010, 12:27:07 PM »
*Update*

sky2rad v0.2 is out!

What's it for?

sky2rad is a piece of software that bridges the gap between the Frecle Sky Panorama Tool and 3DRAD.

The frecle tool creates skybox cube images. 3DRAD makes use of skyboxes. sky2rad takes the frecle image format and exports it to the necessary directories of 3DRAD. No need to resize, convert, copy, paste or cuss any longer!

Code: [Select]
------ Changelog - v0.2
-
- added png and jpg import file support
- added last open location memory to open dialog
-
------

------ Initial Release - v0.1
-
- Imports panorama skybox images of the following sizes:
-   - 1536x256   (.bmp)
-   - 3072x512   (.bmp)
-   - 6144x1024  (.bmp)
-   - 12288x2048 (.bmp)
- Exports skybox into 3DRAD directories.
- Preference panel allows you to save the default location of your 3DRAD installation.
- Open dialog to navigate to the image you wish to import.
- Built-in checks prevent export of incompatible images.
-
------

Application is attached!
Also attached is a small sampling of images made with the frecle tool to test sky2rad with.
« Last Edit: September 28, 2010, 12:25:59 AM by deebee »
« Reply #1 on: September 23, 2010, 12:58:08 PM »
looks good so far...
will this also work with selfmade pictures? (other resolutions)
new forum search:
http://www.google.com/ site:www.3drad.com searchword  ( <-- copy )
3DRad is now in the same Brain-Area like my old C64 and Amiga Memories!
« Reply #2 on: September 23, 2010, 01:04:38 PM »
looks good so far...
will this also work with selfmade pictures? (other resolutions)
Not in the first version, but I think I can integrate that later (if the image is in a six panel panoramic configuration)

Maybe I'll also look into the cross configuration too, if time permits! ;D

jestermon

« Reply #3 on: September 23, 2010, 03:32:48 PM »
Great minds think alike. Looking forward to seeing this tool in action.
I used Pygame to manipulate the image surfaces directly. What are you using to split your images?

Steps I used, if it can contribute anything to your project
1.. Split on 512 steps
2.. Increased size of frames to 1024x1024
3.. Rotated frame 5 by 90
4.. Rotated frame 6 by -90
5.. Frame save sequence pz px nz nx py ny
You've probably got this figured out already though :)

« Last Edit: September 23, 2010, 03:41:09 PM by jestermon »
« Reply #4 on: September 23, 2010, 10:00:07 PM »
Great minds think alike. Looking forward to seeing this tool in action.
I used Pygame to manipulate the image surfaces directly. What are you using to split your images?

Steps I used, if it can contribute anything to your project
1.. Split on 512 steps
2.. Increased size of frames to 1024x1024
3.. Rotated frame 5 by 90
4.. Rotated frame 6 by -90
5.. Frame save sequence pz px nz nx py ny
You've probably got this figured out already though :)
Does pygame's upsize look better then rad's?

Rad can display 512x512 automagic on the skybox AFAIK which i figure could save on some video memory and load time.  But if you get better sampling upsizing with pygame, i guess it could be worth it.

Do you have some side by side examples?
« Last Edit: September 24, 2010, 04:35:40 AM by deebee »

jestermon

« Reply #5 on: September 24, 2010, 05:44:43 AM »
There is no need to resize, I just prefer larger textures, so I do it from habit. PYgame uses the SDL 2D game engine, which has all the bells and whistles. It has a smoothScale function which I use. So it wont be much use unless written in Pygame.
If Rad displays the texture fine, then 512 is great.
I also picked up a logic error in my approach. Not so much a logic error, as an assumption. The actual save sequence should be px nz nx pz py ny, then you don't have to rotate py and ny. I am used to thinking in z=forwards, so automatically started with the sequence at pz. The cubemap is generated by skypanorama for px as the first frame, so you don't really have to worry about manipulating the images.
« Reply #6 on: September 24, 2010, 10:48:24 AM »
Thanks for the tips, jess.  ;)

This is gonna take a little longer than I thought as this is my very first attempt at coding an app!
Every day I work on it, I learn something new as to how it could have been more efficient or organized!  Because of this I'm finding myself redoing a good majority of my code.  It's still a lot of fun, however so I'm sure I'll finish it!  ;D

I'm coding the entire thing in LiveCode for it's uber high-level, newb friendly language structure!

jestermon

« Reply #7 on: September 24, 2010, 01:55:17 PM »
The joy is in the journey, and the learning experience itself is always satisfying.
Looking forward to what come out of your mind :)
« Reply #8 on: September 26, 2010, 06:28:36 PM »
will this also work with selfmade pictures? (other resolutions)
Made some progress this weekend.
Added some image dimension checking so it will export from images 256, 512, 1024, or 2048 in height  so long that the initial image format is a 6-panel panorama (px nz nx pz py ny).
« Reply #9 on: September 27, 2010, 02:04:52 PM »
The actual save sequence should be px nz nx pz py ny, then you don't have to rotate py and ny. I am used to thinking in z=forwards, so automatically started with the sequence at pz. The cubemap is generated by skypanorama for px as the first frame, so you don't really have to worry about manipulating the images.
Actually I've found the sequence is nx, pz, px, nz, py, ny (left, front, right, back, up, down), for those who want to make them by hand!

Also, updated first post.  Please test it out for me! Thanks!  :)
« Last Edit: September 27, 2010, 03:06:29 PM by deebee »
« Reply #10 on: September 27, 2010, 02:24:50 PM »
 Great Job deebee!
Very comfortable with prefs and preview.

Thanks for sharing! ;D

edit: keeping the import folder (in prefs) would be easy?!

 
« Last Edit: September 27, 2010, 02:28:27 PM by 3DSimulant »
new forum search:
http://www.google.com/ site:www.3drad.com searchword  ( <-- copy )
3DRad is now in the same Brain-Area like my old C64 and Amiga Memories!
« Reply #11 on: September 27, 2010, 02:34:23 PM »
Great Job deebee!
Very comfortable with prefs and preview.

Thanks for sharing! ;D

edit: keeping the import folder (in prefs) would be easy?!
Thanks 3DSim!  This is my first attempt at programming anything so I'm sure there's tons of stuff that needs to be better!
When you say import folder, are you talking about the location that opens for the choose image button??
« Reply #12 on: September 27, 2010, 02:44:45 PM »
the load requester starts always from my 'user folder', so I always need to click all the (very long) path to my skypanorama folder.

other import image types would be nice.

new forum search:
http://www.google.com/ site:www.3drad.com searchword  ( <-- copy )
3DRad is now in the same Brain-Area like my old C64 and Amiga Memories!
« Reply #13 on: September 27, 2010, 03:03:50 PM »
Plan on adding support to import png and jpg soon.  Will also change default import folder to "the last known open folder."Busy week ahead tho, so it will take some time!

jestermon

« Reply #14 on: September 27, 2010, 06:45:54 PM »
If you need a command line file converter, just shout :)
Pages: [1] 2