About Store Forum Documentation Contact



Post Reply 
Choppy Lighting
Author Message
XeonXT Offline
Member

Post: #1
Choppy Lighting
Hi!

First of all, thanks for implementing high-precision blurring...they have made my terrains exponentially nicer to look at smile

Now, a small lighting problem:
[Image: 91415732.jpg]
[Image: 68136978.jpg]

Notice the choppy lighting on the landscape, where you can clearly see adjacent faces shaded radically differently. I did call mesh.setNormals() when the procedural terrain was finished...why does the lighting still look bad?

Thanks!
01-20-2010 02:45 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Choppy Lighting
Hi,

I'm not really sure what could cause this

you could try:
-enabling D.hpRt
-calling mesh::setVtxDup before calling ::setNormals

if this won't help you could try posting here your codes for terrain creation
01-20-2010 03:06 AM
Find all posts by this user Quote this message in a reply
XeonXT Offline
Member

Post: #3
RE: Choppy Lighting
Esenthel,

As usual, thanks for the speedy response smile

I tried the suggestions and neither seemed to alleviate the problem.

I noticed, however, that this chopiness dissapears if I set the detail map to have only 1 mipmap. Of course, this creates unbearable pixel artifacts at high distances without any mipmaps, but, oddly enough, seems to fix the shading problem. Any ideas? Are mipmaps shaded differently?

I'm afraid that the code probably wouldn't be very enlightening..it's rather large, and the actual process used to create the mesh/texture objects is mostly the same as in Terrain.cpp, it's just the procedural algorithms that I have added to give more realism.
01-20-2010 03:58 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Choppy Lighting
can you attach here the mesh with materials+textures so I can test them manually?
01-20-2010 04:42 PM
Find all posts by this user Quote this message in a reply
XeonXT Offline
Member

Post: #5
RE: Choppy Lighting
Esenthel,

I was unable to attach the files on the forum, it keeps giving me: "Error Attaching File: The type of file that you attached is not allowed. Please remove the attachment or choose a different type."

So I uploaded them to my FTP. Also, I am unsure if these extensions are correct, I simply did a binary save on each file and am unsure what the actual extensions are, but they are all binary saves of their respective types (two images and a mesh). Here are the files:

Terrain Mesh
Terrain Diffuse Map
Terrain Detail Map

The strange effect can be seen on this mesh when it is scaled up significantly (to a true landscape size) and when the detail map is set to "2" mipmaps. Setting the detail map to no/1 mipmap(s) virtually removes the effect. Also, scaling the landscape down removes the effect. Unfortunately, I need the landscape to be quite large, and I need mipmaps as well.

Thanks!
Ah, forgot the material.
Terrain Material
(This post was last modified: 01-21-2010 02:10 AM by XeonXT.)
01-21-2010 02:07 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Choppy Lighting
the problem is in detail map

please use for that Material::importDetail method

because for detail map the GFX needs to be processd in a special way which only the method can do, and please make sure that all mip maps are generated (not just first/second)
01-21-2010 03:08 AM
Find all posts by this user Quote this message in a reply
XeonXT Offline
Member

Post: #7
RE: Choppy Lighting
Esenthel,

Thanks very much, that seemed to work.

I suppose a minor request for future updates would be direct access to call this "special" processing on an image so that saving/loading can be avoided smile

Thanks for the excellent help.
01-21-2010 04:23 AM
Find all posts by this user Quote this message in a reply
Post Reply