GI Settings and Cube maps

Started by venteras, April 27, 2009, 03:28:21 PM

Previous topic - Next topic

luke

I also purchased terragen 2 exclusivly for making skyboxes. Firstly I was pretty frustrated that there wasn't a built in way to automat the export of sky boxes, especially when creating sky boxes and light probes is a highlighed feature in the marketing.

Anyway, being a coder, I was happy to notice the .tgd format is easily editable xml, so I wrote a quick tool to automated the process for me.

However, then this seems problem appeared with a sky box with a low sun above think clouds. Interestingly it is only the bottom of the box that has seems. No idea why. Then I read that the best way to fix seems is to turn GI off. That didn't really seem acceptable to me. I'm glad I found this thread so I to stop me spending ages messing with settings to try fix the issue.

Anyway, I didn't want to compmarise on GI if I could avoid it so I decided to leave GI on, so I tried a method to smooth out the seems. I doubled my render out resolution for each face and set the field of view to 126.86989 degrees (calculated from arctan(2.0) if you know your trig). Texture coordinats 0.25 to 0.75 then gives the box face. The texture outside that is the border used to smooth the seems. I just render each face of the skycube in opengl one by one adding the border, alpha blending from 1 at the center to 0 the edges. The results look good to me. I havn't noticed any seems or artifacts. Now I just need to render out and save each direction then I have a normal seemless sky cube.

The only problem is, I had to double the resolution in my terragen renders, which I assume it means it will be 4 times slower to render. Lucky I only need fairly low res images. I really don't want to complicate my export pipeline like this, if a fix apears, I will be happy, however my current work around looks like it will work for me.

neuspadrin

This would be the kinda feature that would be made with a plugin or something probably. It would be interesting to see if someone could make a cube map plugin once they get that out.

Tangled-Universe

Thanks for the headsup on this Luke. Seems time-consuming, but at least it's a workaround. I'll try this myself soon.

Cheers,
Martin

Falcon

If it's any help, I use the attached clip to render cubemaps, and so far I'm fairly free of seams. I've had two cases but I suspect that in both the mistake was on my side (not updating all camera settings after moving the camera a tiny bit).

Tangled-Universe

Thanks a bunch Falcon!

Cheers,
Martin

luke

It wouldn't be too hard to make and release a little program to do this, but personally, I'm not quite generous enough to donoate my time for that. My quick and dirty code is working well enough for me now and is integrated into my tool chain. Don't mind providing some code to anybody else who wants to try... but really its not that hard.

Would be nice if somebody did it and spend a bit of time working out the minimum amount of overlap nesessary (Not just doubling the images and hoping for the best like me). Don't even need to render every image double sized because you only need to overlap in one direction. Need to put a bit more effort then just stopping at the first thing that worked like I did. Also maybe make it configurable so you can reduce overlap for seems that arn't so bad. Maybe even add super sampling options. Make it work with all image formats. But it ends up being a lot of work after all that.

But ideally terragen 2 would just have an output cube map option that worked with GI.