Weird lightmapping problem

Blitz3D Forums/Blitz3D Beginners Area/Weird lightmapping problem

puki(Posted 2006) [#1]
Right, firstly I tried to video this - uploaded it to:
http://rapidshare.de/files/10803640/blitzcc_2006-01-10_20-35-39-95.avi.html

But it doesn't seem to download.

Anyway, I was having a go at lightmapping a model - that already had a premade lightmap:

newhouse=LoadMesh(buildingmodelpath$+"house1\house1.b3d")
newhouselmap=LoadTexture(buildingmodelpath$+"house1\house11_lm.bmp")
TextureCoords newhouselmap,1
EntityTexture newhouse,newhouselmap,0,1


Now, the end effect is a greyscale house that has 2 weird problems:

1: There is a kind of gauze/filter effect on the object that moves with the camera - as though the camera has a gauze on it - the effect is like having a dusty/dirty camera lens. The effect is static to the game camera though and dynamic to the object, so when I mouse-look around the object the gauze effect which has some noticeable features (such as a sort of circular patch to it) appears to stay in the same place on the game camera (the blitz camera - about 2 inches northeast (up/right)) of the centre of the screen).

So, the texture is clearly mapped to the .b3d, yet is like it is mapped to the camera.

Also, when I mouse-look around, the .b3d file darkens and lightens. It seems to lighten when I mouse-look up and darken when I mouse-look down. So, let's suppose a wall directly opposite you is sort of light grey - it will darken as you mouselook down and lighten as you mouse-look up.


Is this a known effect?

It is sort of cool-looking, but I didn't intend to create it. I hope I have explained this in enough detail.

This probably won't show up too well in screen-shots, which is why I tried doing the video of it.


jhocking(Posted 2006) [#2]
Okay, number one is really bizarre. Are you sure that is due to the house? I know that's kind of an obvious question, but I'm really finding that one hard to believe. If you comment out just those four lines, and instead CreatePlane(), do you still see the gauzy effect?

As for the other issue, it may be due to surface properties and real-time lights, perhaps shininess on the surface. Make sure any lightmapped geometry is set to fullbright so that lights don't affect it.

I wish I could view the movie. I don't know if it's too big, but you could yousendit to yourself and then post the download link.


puki(Posted 2006) [#3]
Well, the house is one of many houses in the scene - when inside or outside the house, the effect is applied to the house. So, if I stand outside the house - in the street - the gauze effect is still tied to the camera, but only over the surface of the house.

EDIT:
I'll try hosting it elsewhere - will try your suggestion.

EDIT:
I just created a cube inside the house and can see the effect on that too???

EDIT:
erm, I think I solved it.

Um, it would appear to be caused by the surface of my TFT screen.

Um, you see I would not normally look around in a grey-scale environment - normally textured stuff and games don't produce this effect.

Because when I lightmapped the house, it turned grey-scale and I noticed the weird effect.

Um, the reason why I noticed it on the video was coz I was playing it back full-screen - meaning the effect was being recreated (as it is on the monitor screen itself).

Um, I did actually, clean the monitor screen - it appears to be a case of the surface of the monitor is not completely flat, so it has *normally* unoticable blemishes that came to light when viewing the grey-scale image.

This effect is not noticeable when viewing statice images - like when using windows and wordprocessors, etc - just moving ones such as greyscale buildings which were not previously greyscale, yet turn greyscale when you try to lightmap them.

Um - I'm not taking the entire blame for this.