social.bioware.com/project/2793/&v=discussions#discussions
No promises, no expectations, no disappointments, but something should be done so I'll start the ball rolling even if I can't finish it.
Fixing the Lightmapper?
Débuté par
ChewyGumball
, mai 27 2010 03:30
#1
Posté 27 mai 2010 - 03:30
#2
Posté 14 juillet 2012 - 10:34
Oh look, its a download!
#3
Posté 15 juillet 2012 - 01:20
finally after 2 years of development - gratz to you and thx for all the invested effort!
now i only have to install da:o and the toolset again to do some testing
now i only have to install da:o and the toolset again to do some testing
Modifié par -Semper-, 15 juillet 2012 - 01:20 .
#4
Posté 03 août 2012 - 05:46
Can't believe I missed this. Awesome work! I'm going to test it out ASAP. I hate lighting interior levels due to all the bugs in the existing lightmapper, so hopefully this one handles them better.
Can you clarify what has changed from the standard one (other than the algorithm used of course)? For example, do you still have to post from Single Player? Are transparency issues fixed? Do baked lights work properly? I'd love to finally be rid of EclipseRay, that's for sure.
EDIT: I receive the following error every time I try to render lights, and the lightmapper crashes:
http://i.minus.com/iQsLaJAMfRe9e.png
I have set things up as indicated in the readme file, though I might be making a mistake. Running Windows 7 x64.
Can you clarify what has changed from the standard one (other than the algorithm used of course)? For example, do you still have to post from Single Player? Are transparency issues fixed? Do baked lights work properly? I'd love to finally be rid of EclipseRay, that's for sure.
EDIT: I receive the following error every time I try to render lights, and the lightmapper crashes:
http://i.minus.com/iQsLaJAMfRe9e.png
I have set things up as indicated in the readme file, though I might be making a mistake. Running Windows 7 x64.
Modifié par sea-, 03 août 2012 - 06:03 .
#5
Posté 04 août 2012 - 06:24
Never mind, got it working - for some reason I had to manually select the working directory, copy-pasting it in didn't work.
Only problem is, the lightmapper is basically unusable. It does work for sure, in that it creates lightmaps and interacts well with the Toolset... but they make (most) of the level entirely blue, even without an ambient light present. Most of the static lights also failed to render at all.
Only problem is, the lightmapper is basically unusable. It does work for sure, in that it creates lightmaps and interacts well with the Toolset... but they make (most) of the level entirely blue, even without an ambient light present. Most of the static lights also failed to render at all.
#6
Posté 05 août 2012 - 10:14
Yeah I did a brief test and found that it didn't reproduce the colour of the lights, required a super high intensity compared to EclipseRay, and produced seams at mesh boundaries, as posted in the project's forum - http://social.biowar...scussion/80639/
I had assumed the blueness was a result of using purple-coloured statics, but your similar results would suggest otherwise.
I had assumed the blueness was a result of using purple-coloured statics, but your similar results would suggest otherwise.
#7
Posté 05 août 2012 - 07:02
Could you send me your level files? There are instructions in the project on which ones. If its not an ambient light issue, then perhaps the colour value is too big for the variable I am using. I may be scaling it wrong, or I may just be reading the colour of lights wrong, though I doubt it since it seems to work fine for the colour of the lights I have tested it with.
#8
Posté 07 août 2012 - 04:57
Ok, looking at darth's files, it seems that I am not doing shadow maps correctly. The lights are exported as (RGB) (0.001,0.0,1.0) even though they are clearly not that colour in the editor (0.68,0.29,0.85), so thats why its all blue. They do have a shadow colour of (1.0,0.0,0.0) though. I'm not sure what a shadow map is really for, but even then I don't see how those two colours map to the in editor colour. perhaps its because they are animated.
#9
Posté 07 août 2012 - 04:32
Shadow maps contribute to overall lighting the object receives, as documented hereChewyGumball wrote...
I'm not sure what a shadow map is really for, but even then I don't see how those two colours map to the in editor colour. perhaps its because they are animated.
Diffuse = DynamicAmbient + F(DynamicLights, DynamicShadows) + ( LightmapRGB + LightmapShadowMap * F(StaticLights , DynamicShadows) )
Where F is the function which calculates light contribution given the dynamic shadow map.
#10
Posté 10 août 2012 - 09:56
Ok, the shadow map (blue) issue should be fixed, though the seams have not. I am not sure what is causing them yet. I have updated the download.
#11
Posté 11 août 2012 - 08:45
Things have been significantly improved by your update. Colour and light intensity are both calculated correctly.

However, it seems as if the lightmaps themselves aren't being applied to the correct surfaces, and several objects are missing lightmaps entirely.

However, it seems as if the lightmaps themselves aren't being applied to the correct surfaces, and several objects are missing lightmaps entirely.
Modifié par sea-, 11 août 2012 - 08:47 .
#12
Posté 12 août 2012 - 03:45
Have you confirmed that in the area editor or the game? The level editor always mis-applies light maps after a while.
#13
Posté 12 août 2012 - 04:01
That is interesting. I have updated the download with some improvements to fix some of the seam issues. One thing I noticed, Darth, is that your lightmaps are pretty small (32x32). That exaggerates seams and pixelation so another thing to try is increasing the size.
Modifié par ChewyGumball, 12 août 2012 - 04:02 .
#14
Posté 12 août 2012 - 04:20
Run the lightmapper a few times, even without changing anything, and eventually the lightmaps will be "corrupted", inasmuch as the level editor will start applying them to the wrong models. When you post to local though and check the area editor or the game, the lightmaps are properly applied. I'm not sure what the cause is, but this has always been a problem with the level editor. Possibly it's a clash between all the various different cached maps. It helps to clean them all out regularly - http://bg2redux.stud...ngLightmapFiles
As to lightmap size, you have manual control over that? Where is that specified? I've looked in the past for that and never found anything, so I assumed the lightmapper automatically determined it.
As to lightmap size, you have manual control over that? Where is that specified? I've looked in the past for that and never found anything, so I assumed the lightmapper automatically determined it.
Modifié par DarthParametric, 12 août 2012 - 04:25 .
#15
Posté 12 août 2012 - 05:15
They are determined by the .met (I think thats the extention) files. They are xml files that eshme's tool should create. It may be defaulting to 32x32 if there are none.
#16
Posté 12 août 2012 - 06:15
Yeah metadata. Props won't lightmap without it. But there's nothing in there specifying map size that I can see, in either ones exported by Eshme's script or vanilla ones.
Edit: Whoops, I'm blind.
Might have to ask Eshme to add in some option to specify this somewhere. It seems to be variable between files, so it's not a static value. Presumably the script is deciding what to set it at somehow.
Edit: Whoops, I'm blind.
<LightmapSize> <Value> <![CDATA[64]]> </Value> </LightmapSize>
Might have to ask Eshme to add in some option to specify this somewhere. It seems to be variable between files, so it's not a static value. Presumably the script is deciding what to set it at somehow.
Modifié par DarthParametric, 12 août 2012 - 06:21 .
#17
Posté 14 août 2012 - 06:21
The new version of your lightmapper doesn't work for me. When I start rendering, it hangs pretty much indefinitely, consuming increasingly more memory (I saw 4+GB), and brings my entire system to a screeching halt. I'm also not sure but it doesn't seem to like outdoor areas or levels with lots of rooms (maybe you already knew this though).
#18
Posté 14 août 2012 - 10:58
Thats interesting. Can you send me the scene files you were using? I know that there are some model files I can't read properly, so it may be that, but I won't know without your files.





Retour en haut







