1 registered members (3s05bmmc),
745
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Sky/spacecubes
#341592
09/18/10 13:01
09/18/10 13:01
|
Joined: Oct 2004
Posts: 4,134 Netherlands
Joozey
OP
Expert
|
OP
Expert
Joined: Oct 2004
Posts: 4,134
Netherlands
|
Hey all, I've been pondering around with creating environment skies. After many tries on manually painting cubemaps and unwrapping all sorts of spheres for skydomes I was still left unhappy with the results (stretched textures on various parts of the sky, or having an obvious seam visible). Finally, I created a photoshop action that maps a cubemap out of a tiling scene, which came with pretty okay results (spare my paint skills :P): Above examples are scaled down thumbs. Size of the original scene is 4096*2048 final cubemap is 6144*1024. Sometimes there are still tiny seams visible (and 3dgs often shows a pixel edge) but this is as good as I can do. Download spacecubes (.rar, 16MB) View spacescene1View spacescene2If anyone wants to convert his scene to a cubemap post it here. But beware that your scene has to be a size of 4096*2048 or lower, else you will lose quality. The top and bottom parts are generated from 1/4th height of the top and bottom resp. of the original image, merged into a square. The middle of these parts still have a little seam but can easily be covered manually after conversion. Regards, Joozey
Last edited by Joozey; 09/18/10 15:50.
Click and join the 3dgs irc community! Room: #3dgs
|
|
|
Re: Sky/spacecubes
[Re: Joozey]
#341617
09/18/10 17:08
09/18/10 17:08
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
I like the colours very much!
Could you please post an in-game screen shot?
EDIT: That's weird, I've just tried to use the first skycube in my game, it displays correctly in WED but I just get a very blurry blue background. (I must admit that I don't have much experience with sky cubes or skies in general).
Last edited by Superku; 09/18/10 17:19.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: Sky/spacecubes
[Re: Superku]
#341642
09/18/10 22:48
09/18/10 22:48
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
Nice work, tis a shame about the seam. Could you please post an in-game screen shot? Easier said than done with skies. try this
#include <acknex.h>
#include <default.c>
#define PRAGMA_PATH "Images\\Skies"
ENTITY* ent_sky;
void sky1(){
ent_morph(ent_sky, "spacecube1+6.bmp");
}
void sky2(){
ent_morph(ent_sky, "spacecube2+6.bmp");
}
void main(){
on_1 = sky1;
on_2 = sky2;
video_screen = 1;
video_mode = 9;
wait(1);
level_load(NULL);
ent_sky = ent_createlayer("spacecube1+6.bmp", SKY | CUBE, 1);
}
Obviously change the path they're in
|
|
|
Re: Sky/spacecubes
[Re: MrGuest]
#341647
09/18/10 23:56
09/18/10 23:56
|
Joined: Oct 2004
Posts: 4,134 Netherlands
Joozey
OP
Expert
|
OP
Expert
Joined: Oct 2004
Posts: 4,134
Netherlands
|
I couldn't get it properly working in WED applied on a cube (just tiled wrong) but it works fine in-game. MrGuest's code should work, I always initiate such things through code myself, and I got it working (A7 Pro). Well, I think it needs the SHOW flag too . SKY | CUBE | SHOW. I think I'll paste a video later here if I got a little game up and running. Here is a picture from some astronomy site converted to cubemap within a minute, so not realistic as space doesn't wrap around there in real life . Works great, just a bit pasting on the edge to make it seamless. LARGE FILE! 18MB http://www.joozey.nl/3dgs/contribs/skycubes/spacescene3+6.bmpOriginal: http://blog.deepskycolors.com/archivo/2010/09/17/andromeda-M31-versus-Triangulum-M33.html
Last edited by Joozey; 09/18/10 23:59.
Click and join the 3dgs irc community! Room: #3dgs
|
|
|
Re: Sky/spacecubes
[Re: Joozey]
#341648
09/19/10 00:34
09/19/10 00:34
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
Well, I think it needs the SHOW flag too . SKY | CUBE | SHOW. Strangely, though probably not as with most of GS, you don't need to pass the SHOW flag, as the entity is drawn when created as with world entities. Also, the SHOW flag isn't even used for view entities, and to hide and show them you could set and reset INVISIBLE as with world entities. Unless, just for conitec to confuse everyone even more, SHOW, SKY and CUBE are all used for flags2 and not flags, so you'll need if you want to hide the entity this way. In summary, use:
set(ent, INVISIBLE);
reset(ent, INVISIBLE);
or
ent.flags2 |= SHOW
ent.flags2 &= ~SHOW;
try not to mix them Nice 3rd sky btw
|
|
|
Re: Sky/spacecubes
[Re: MrGuest]
#341650
09/19/10 00:52
09/19/10 00:52
|
Joined: Oct 2004
Posts: 4,134 Netherlands
Joozey
OP
Expert
|
OP
Expert
Joined: Oct 2004
Posts: 4,134
Netherlands
|
I had a blue standard background when I don't SHOW it. If I set VISIBLE then it is visible but all the models in the level are clipped away unless approached very closely (independent from camera.clip_far), but SHOW worked.
Now testing again, it works without SHOW :\. Sometimes, I don't get 3dgs. The manual is not agreeing with you, and uses SHOW anyway.
Last edited by Joozey; 09/19/10 00:53.
Click and join the 3dgs irc community! Room: #3dgs
|
|
|
|