Blocky Rendering

Started by -XM-, May 23, 2011, 04:46:10 PM

Previous topic - Next topic

-XM-

Hey guys, been using the free version of Terragen 2 to design some skyboxes for a game of mine.... I was rendering them in 500 x 500 and they looked amazing until I turn on full screen mode. The bottom half of it still looks great, but as the colors start to fade into black towards the top of each picture, the image is really blocky looking in game. My game is running in 1280 x 720.

My first thought was that I need to render the images at a higher resolution, so I tried making them 800 x 600, but that did nothing to solve this problem. Now I am thinking maybe I need to utilize the anti-aliasing option or something like that to fix this problem? I didn't want to purchase the full version without knowing how to fix this.

Thanks!

Tangled-Universe

Can you show us an image of the issue?

-XM-

#2
Sure thing! I've attached a picture to this post...

If you zoom in a bit you can see how the background is blocky looking and not very consistent. This is with the 500 x 500 tiles, but like I mentioned earlier the 800 x 600 didn't change this at all, which made me wonder if maybe anti-aliasing would help.

Blackheart6004

You're looking at color banding which can sometimes in a image format ( i forgot which one) that causes this.
My DeviantArt Profile - http://blackheart6004.deviantart.com/

Tangled-Universe

I tend to think that too...
It would be a bit more useful and easier if you could post the direct output from TG2 instead of a screendump from your game.

-XM-

Here is the right tile, I did some googling and I definitely think color banding is the problem. If you look closely at this image you can see the problem in the back, just not as major as in the game screen:

http://i51.tinypic.com/11jxi7p.jpg

I'm actually rendering them in bmp and converting to jpg in Photoshop, but the bmps still have the color banding in the back. I'm sure the jpg format doesn't help any though haha.



Matt

It looks like colour banding, which might be due to the 8-bit image format or it could be due to compression e.g. JPEG compression.
Just because milk is white doesn't mean that clouds are made of milk.

-XM-

Ughhh that was the bmp but tinypic coverted it because of size.

How do you know it is 8-bit? I rendered all tiles at a Bit Depth of 24... unless tinypic changed that when it did the jpg conversion, it should still be 24.

Is there something that I could switch on in Terragen to fix the problem? Or do I just need to try and render higher formated images?

Oshyan

8 bits per channel, 24 bit total (8 bits for Red, Green, Blue channels). In subtle gradients even 24 bit images can still show banding. The problem here is the image is being stretched in your game engine and, being fairly low resolution to begin with, you see the flaws much more easily. Make the JPG export as high quality as possible, or if your game engine supports it, use some other image format with lossless compression or no compression.

In TG, if you're seeing the banding in direct BMP output, check to make sure you haven't reduced Sample Jitter in the Atmosphere node Quality Tab below 1.

- Oshyan

-XM-

Hey again guys, I am still trying to fix this problem but still haven't had much luck.... I still see color banding in the direct bmp output from terragen. Sample Jitter in the Atmosphere node is at 1. Is there anything else I could enable/disable that would help the issue?

Also, would it help if I uploaded my terragen project file for people to look at?

Thanks for the help!

Kadri


Render and save as an EXR file in TG2 .
Load it in an EXR supporting Photo editor and export as a normal BMP , TGA etc. file.
Try different converting methods with dither-noise etc. if you have to.

There are many topics on this if you search the web.
It is a common problem in some situations (like a sky with little or no other objects and a gradient)  and not only in TG2.
If you look at the EXR file you directly saved from TG2 there are no banding or very little at all.

Try to use a lower contrast in the image etc.
Use some dithering or-and noise to break the banding.

Just one question -XM- are your game engine adding anything to the banding ?
Does the render look better outside your engine?
And can you add some noise-dithering to the image yourself , in your game engine to break the banding?


-XM-

I'm re rendering them into EXR format now, I'll let you know how that goes.

The render looks better for the most part in my game engine, but there are parts that look horrible no matter where they are. I've noticed that I only see this on the sky gradient, like you mentioned.

I'm going to try various things and see what I can do. Terragen doesn't have a dithering option or anything like that right? I'll see what I can do in Photoshop...

-XM-

Noise has done the trick I think! It had no effect on the old images, but it cleared the banding up with no problem on the EXR images... I think this is going to do the trick!

Thanks for all your help guys

-XM-

Well, I'm back for one last time....... does anyone know of a plugin for Photoshop that will let me save EXR as any type of standard image format? I've googled and googled and haven't found anything that works well.


dandelO

Simply 'save as' in the file menu of PS will let you save as any standard image format, from a drop-down list in the save dialogue, as long as the image is flattened, i.e. it has only one layer.
To flatten an image to one layer; Right-click any layer in the 'layers' list(default view for this is located bottom-right in the PS window) and set 'flatten image'. After that, you can save as any file type that PS supports through the 'file' menu in the top-left main program menu.