New SkyLine object for T3D
by Richard Marrevee · 09/07/2015 (7:29 am) · 6 comments
Background
In my game The Master's Eye there are several missions which use the ScatterSky object combined with a TimeOfDay object. But there is the nasty problem that it is impossible to use the SkyBox object as a horizon/background (for the simple reason that this will cover the sky generated by the ScatterSky) and without this the transition from the terrain edge to the background is rather immediate (it is just from terrain to sky). You can modify the terrain or add a line of trees or somthing like that, but it is a workaround which I find quite lame.The first thing I did was adding alpha information to the cubemap images and tried to use the SkyBox with these images (material with translucency set), but this did not give the desired result, I discovered that the SkyBox object was not able to handle transparency. Dug any deeper and I saw that lighting was disabled for SkyBox materials. I enabled it and it did seem to work!:) Unfortunately, while running a debug build I got an assertion, stating that not all shaderconstants were defined for the skybox material :(. Also the lighting of this skybox was not that great at all, but okay. I decided to keep using this despite of the assertion when debugging, until I played this level, which also used the LightRay post effect, and I watched the sun sinking between the terrain and the skybox :{ and the LightRay post effect did not perform well either. At that point I decided to create some sort of a SkyBox object that could be used with ScatterSky/TimeOfDay and here it is: the SkyLine object.
The SkyLine object
The SkyLine object is basically a SkyBox object that can handle transparency (and do some other fancy tricks as well). Because of this it can be used with the ScatterSky and TimeOfDay objects; night sky cubemaps and moon are handled as one would expect (behind the skyline). The BasicClouds and the CloudLayer object both have a new option added, so they can be rendered behind the skyline (not necessary but just like the real thing). Finally the SkyLine object has an option to generate a mask that can be used with the LightRay postfx, so that the lightrays are covered by the skyline, giving a more realistic feeling. To demonstrate all of this I have a nice demo video, just take a look:I want this thing, how do I get it
In contrast to the Volumetric Fog and the DoorClass objects (which are free), I have decided that this SkyLine Object Pack is available for the reasonable price of 5 Euro (approx. US$ 5.57) and can be obtained from the R.G.S. site here.A step-by-step installation guide is included in the download as well as a sample cubemap and user manual.
Thanks for reading
Richard
About the author
Started programming in 1984 on an Oric, when time progressed switched to MSX, Amiga and finally the Windows PC with T3D. Now developing an epic fantasy game: The Master's Eye. Creator of the DoorClass pack and VolumetricFog pack @ richardsgamestudio.com
#2
09/09/2015 (12:13 pm)
Really nice Richard! Do the skybox textures have to be created specifically for it with transparency?
#3
Usually I build my skyboxes with Bryce. For the SkyLine object I set the sun at the noon position, disable all clouds and so, and set the color of the sky to an unusal color, purple or so, which is easy selectable in your paint program. Then render all the images (Front,right,back left and down (up isn't required, I just use the down image to complete the cubemap). Then in a paint program like Gimp I just select and delete the sky color so it become transparent and add a few transparent pixels at the center of the down image (which seems to be required when creating the cubemap in T3D). Save the images in a transparency supporting format (png, dxt5) and you're done. Create a CubemapData in TS (no material is required), add the SkyLine object and set the cubemap. That's all.
09/10/2015 (3:32 am)
@Scottie:Usually I build my skyboxes with Bryce. For the SkyLine object I set the sun at the noon position, disable all clouds and so, and set the color of the sky to an unusal color, purple or so, which is easy selectable in your paint program. Then render all the images (Front,right,back left and down (up isn't required, I just use the down image to complete the cubemap). Then in a paint program like Gimp I just select and delete the sky color so it become transparent and add a few transparent pixels at the center of the down image (which seems to be required when creating the cubemap in T3D). Save the images in a transparency supporting format (png, dxt5) and you're done. Create a CubemapData in TS (no material is required), add the SkyLine object and set the cubemap. That's all.
#4
09/10/2015 (12:20 pm)
Sweet, ty. Can't wait to try it out!
#5
Nice job.
Things like this could keep the engine going.
09/12/2015 (6:06 am)
This is seriously cool.Nice job.
Things like this could keep the engine going.
#6
11/17/2015 (2:13 pm)
Nice. Just purchased today. Be playing with it tomorrow. 
Torque Owner Dwarf King
Noble Games Production