Author Topic: Blocky Rendering  (Read 5490 times)

Offline -XM-

  • Member
  • *
  • Posts: 10
Blocky Rendering
« on: May 23, 2011, 08:46:10 PM »
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!

Offline Tangled-Universe

  • Terrevangelist
  • *
  • Posts: 6183
    • CGScenery.com - Terragen Tutorials!
Re: Blocky Rendering
« Reply #1 on: May 23, 2011, 08:47:21 PM »
Can you show us an image of the issue?

Offline -XM-

  • Member
  • *
  • Posts: 10
Re: Blocky Rendering
« Reply #2 on: May 23, 2011, 10:30:10 PM »
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.
« Last Edit: May 24, 2011, 05:13:17 PM by -XM- »

Offline Blackheart6004

  • Member
  • *
  • Posts: 122
Re: Blocky Rendering
« Reply #3 on: May 24, 2011, 01:40:56 AM »
You're looking at color banding which can sometimes in a image format ( i forgot which one) that causes this.

Offline Tangled-Universe

  • Terrevangelist
  • *
  • Posts: 6183
    • CGScenery.com - Terragen Tutorials!
Re: Blocky Rendering
« Reply #4 on: May 24, 2011, 06:25:04 AM »
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.

Offline -XM-

  • Member
  • *
  • Posts: 10
Re: Blocky Rendering
« Reply #5 on: May 24, 2011, 05:12:14 PM »
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.



Offline Matt

  • Planetside Staff
  • *
  • Posts: 3518
  • I'm the crazy one
Re: Blocky Rendering
« Reply #6 on: May 24, 2011, 05:13:06 PM »
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.

Offline -XM-

  • Member
  • *
  • Posts: 10
Re: Blocky Rendering
« Reply #7 on: May 24, 2011, 05:23:27 PM »
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?

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 12955
  • Holy snagging ducks!
Re: Blocky Rendering
« Reply #8 on: May 24, 2011, 05:27:37 PM »
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

Offline -XM-

  • Member
  • *
  • Posts: 10
Re: Blocky Rendering
« Reply #9 on: May 27, 2011, 04:46:23 PM »
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!

Offline Kadri

  • Member
  • *
  • Posts: 8502
Re: Blocky Rendering
« Reply #10 on: May 27, 2011, 05:44:34 PM »

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?


Offline -XM-

  • Member
  • *
  • Posts: 10
Re: Blocky Rendering
« Reply #11 on: May 27, 2011, 07:21:54 PM »
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...

Offline -XM-

  • Member
  • *
  • Posts: 10
Re: Blocky Rendering
« Reply #12 on: May 27, 2011, 09:02:43 PM »
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

Offline -XM-

  • Member
  • *
  • Posts: 10
Re: Blocky Rendering
« Reply #13 on: May 30, 2011, 04:53:53 PM »
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.


Offline dandelO

  • Member
  • *
  • Posts: 2401
Re: Blocky Rendering
« Reply #14 on: May 30, 2011, 05:23:33 PM »
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.

 

anything