Aller au contenu

Photo

[SOLVED] Lightmap/chunk issue


23 réponses à ce sujet

#1
Nwalya42

Nwalya42
  • Members
  • 306 messages
Hi

I have a level I have been steadily working on - managed to solve most problems with the help of the Wiki. My current problem is that the lighting seems to cause issues along the chunk boundaries, as below:

Posted Image

I have an ambient light, sunlight and numerous static lights being used to illuminate the characters and remove those pitch black shadows.

Any help would be very much appreciated - I am a bit picky about this kind of thing and am finding it hard to move on to something else until I solve this :)

Edit: Forgot to mention that this shows up in both the editor and in game.

Thanks in advance.
Nwalya

Modifié par Nwalya42, 30 décembre 2009 - 01:33 .


#2
PavelNovotny

PavelNovotny
  • Members
  • 344 messages
Are you generating your lightmaps in the Single Player module? If not, you should always run them from there.

#3
Nwalya42

Nwalya42
  • Members
  • 306 messages
Thanks for the reply - Interesting point. However, with this map I have only exported etc in single player as it has some water planes that wouldn't work unless done in single player. So yes, I do generate the lightmaps in the single player module, but this issue still occurs.

#4
PavelNovotny

PavelNovotny
  • Members
  • 344 messages
Do you have a light probe?

#5
Nwalya42

Nwalya42
  • Members
  • 306 messages
Yes - I have 3 - one over each of my water planes.

#6
BioSpirit

BioSpirit
  • Members
  • 261 messages
You can use tessellate tool to tessellate the border. After that use the smooth tool to remove sharp edges.

#7
Nwalya42

Nwalya42
  • Members
  • 306 messages
The terrain is fine - the issue is the way the light affects it. I have tried tesselating along the edges - still does the same thing.

#8
Cador

Cador
  • Members
  • 52 messages
i have the same problems.



if you look at the OC you can also see the same problem!

so it seems to be an engine problem.

#9
Andrew Farrell

Andrew Farrell
  • BioWare Employees
  • 4 messages
up the size of your lightmaps for the terrain.

its at the bottom of the area properties tab,

#10
PavelNovotny

PavelNovotny
  • Members
  • 344 messages
Also, you only need 1 light probe - multiple light probes will all show exactly the same reflection map.

#11
Nwalya42

Nwalya42
  • Members
  • 306 messages
Ok. Heres what I did this time.
  • I switched to single player and loaded the lvl file.
  • I turned off all effects (Lightmaps, Models Fully Lit, Buffer Effects etc). The lines were still there.
  • I went into the area properties and changed Lightmap Texture Size to 1024, and the vista one to 64, then saved the level.
  • I then hit generate lightmaps, got a note saying the Lightmap Texture size couldn't be that big - it auto scaled it down to 512.
  • Left it sitting there for the usual hour (it always seems to run twice on the outdoor level...) (actually, this time it took 4041 seconds - 1 hour and 7 minutes - for the first run through. The second took 1205 seconds - 20 minutes.)
  • I turned on all effects
Guess what? The issue is still there - *sigh*. Oh, and before anyone suggests it, I refuse point blank to start over again - I have done that twice already.

Next attempt is for 128 and 16 for the lightmap textures - though I am getting the feeling it has something to do with the level as opposed to the lighting (due to the fact that it appears all the time, not just when lightmaps are on).

#12
BioSpirit

BioSpirit
  • Members
  • 261 messages
I have been working a lightmap processor during the last few days. You could give it a try. If you do, set Boundry value from the configuration file to 0 to force processing chunk boundries. Also remove one extra space from the name of the configuration file to get it working. Use 64x64 lightmaps.

#13
Nwalya42

Nwalya42
  • Members
  • 306 messages
Hey BioSpirit. I will do that - have downloaded it, just waiting for my lightmaps to process again at 64x64, then I will let you know. Awesome work on that by the way.

#14
Nwalya42

Nwalya42
  • Members
  • 306 messages
Well, it fixed the black spots, but these lines are still here - but they do show up when the lightmaps are turned off, so it may not be a lighmap problem. Out of curiosity, is there any way to copy the terrain details to a new level?

Edit: Tried copying the lvl file by itself to a new location and opened it in the toolset. The lines still show up, so it must be in the lvl not the lightmap.

Modifié par Nwalya42, 29 décembre 2009 - 08:21 .


#15
BioSpirit

BioSpirit
  • Members
  • 261 messages
If the problem will appear only when the Lightmaps are turned OFF, then, there should be no need to worry about it. It's Ok. The game engine won't run a level without the lightmaps.

#16
BioSpirit

BioSpirit
  • Members
  • 261 messages
I have noticed that sometimes an edge of two different levels of tessellation can cause exactly the same kind of effects as in the screen shot. Usually a change in nearby tessellation will fix the problem.

#17
Nwalya42

Nwalya42
  • Members
  • 306 messages
Updated photo: (same area, different angle with tesselations showing)

Posted Image



Also, this is happening all over the level - not just this one section (see below):

Posted Image

Modifié par Nwalya42, 29 décembre 2009 - 09:07 .


#18
BioSpirit

BioSpirit
  • Members
  • 261 messages
It looks like the entire chunk is much darker/lighter than the other chunks. It's not just the edge. It must be something related in light sources. What will happen if you disable all static/animated lights ? So that only one ambient light and the sun light remains.

#19
PavelNovotny

PavelNovotny
  • Members
  • 344 messages
I find that I don't have any of these chunk boundary problems when using only sunlight (and an ambient light for shadows plus one light probe) on outdoor levels. Could be that your lights don't play well with sunlight.

#20
Nwalya42

Nwalya42
  • Members
  • 306 messages
Ah ha - turned off all lights (just turned off the group actually) and the sunlight and they went away. Sunlight works fine by itself... By turning lights on/off I found that my static lights are causing the problem - not the ambient or the sunlight, they are fine.

My static lights are in 6 groups of 3 spread in a even pattern over the level. Turning off each group fixes the lines in each chunk that is closest to the light. Each light has the following poperties:
Affects Characters : True
Affects Level : True
Can be occluded : False
Color : .99,.87,.54
Color Intensity : 1
Light Type : Point - Static (lc)
Point Radius : 100
Light Size : 0.0
Num Samples : 1

Just a thought, I'm going to try changing them all to only affect characters - the goal of them was to remove the pitch black characters. That fixed it in the toolset - now to see how it looks in game - wish me luck :)

Note: This also dropped the time it takes the lightmapper to do its thing from 4000 seconds to 750 :)

Modifié par Nwalya42, 30 décembre 2009 - 12:48 .


#21
Redunzgofasta

Redunzgofasta
  • Members
  • 52 messages
To get rid of the pitch black character "all" you need to do is to do all local posts for your level from the "Single Player" module and copy/paste all relevant files to the correct module.

Have a look at http://social.biowar.../8/index/219061 for more info on this.

#22
Nwalya42

Nwalya42
  • Members
  • 306 messages
Problems fixed! Thank you all very much!

#23
Bibdy

Bibdy
  • Members
  • 1 455 messages
I'm having this problem on my map as well, only thing is, I WANT to use static/animated lights for some torches. Here's a screenshot of the issue:



Posted Image



And the chunk boundaries:



Posted Image



I'm not quite sure what I need to do to fix this. If I move the torches around, across the boundaries, sometimes it shows the light properly when its directly over the boundary, but then the effect occurs on DIFFERENT boundaries, so I fix one, only to shift the problem to a different place on the level.



One workaround is to only put these torches directly in the middle of the chunks, so that there obviously wouldn't be a boundary issue if the light doesn't extend that far, but then that limits my placement of them (I don't want to have to a torch slap-bang in the middle of a road...).



Any ideas? I've noticed getting several error messages at the start of lightmap rendering, stating



"Unable to find lightmap for terrain chunk"



and a whole ton of error messages like:



"The same source texture (lmhav100n_xx_x_xxx) occurs in more than one atlas"



where the x's are a bunch of random letters and numbers.



It seems to be similar to an issue I had with an interior level where static lights sitting right next to a wall wasn't lighting it up until I increased either the colour intensity, or the radius of the light, and I was able to fix it easily by just doing that (since it's a big cave, I don't have to worry much about making large-radius static lights). Only I can't do it on this exterior level, because having the bulk torch light reach 100m away would be really weird-looking.



So, anyway, suggestions?

#24
Bibdy

Bibdy
  • Members
  • 1 455 messages
So, with a lot of testing and rendering lightmaps yesterday at 30 minutes a pop, it seems like the rule is you can only have 1 animated/static light generating lighting on the terrain area of a chunk at a time. By increasing the radius or colour intensity of one light, to get it to show over the chunk border, I was basically brute-forcing the other lights in that chunk into submission, causing their light to disappear to allow the current light to display on the terrain.

Not sure if this is intended, or a bug, but that seems to be the way things work.

So, word to the wise: If you want to use a lot of static/animated lights in an exterior level make sure that you keep in mind you need to

A) Make a lot of chunks during level creation (not sure you can edit this after the fact)
B) Avoid putting static/animated lights in the same local area. Stick to one static/animated light source per chunk i.e. you can't put 2 animated light sources for 2 torches next to one another - you have to create 1 light and use that to generate the light for both torches.