Mirror, mirror.....

Ask questions, discuss ideas, get answers
User avatar
Psycho
Posts: 125
Joined: Thu Aug 25, 2011 3:31 am

Re: Mirror, mirror.....

Post by Psycho »

Ok now i know what generating the dds files for the enviroment shader thing. it is done when you generate surface maps of course.

I made a new little test map in battlecraft to figure ot how it works. And it work fine with using BGA extracting and packing the map.

So now I have generated new material surface maps for the map I'm working on, but no luck. And the fact that even when I follow the advice to change the path in init.con to another maps ENVMAP_G_.rcm, and it still not working, tells me that some other thing in the cons somehow deactivating the shader.
I'm not so happy about sharing a unfinished map, but if that is what it takes, so be it:).
If someone here have the time and want to help me looking trough my map, maybe its possible to fix this.
I want to live in a created universe. Virtual reality, here I come.
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Mirror, mirror.....

Post by fo0k »

Try temporarily removing the lightmapshadowbits file from your map and see if it works. This file can screw up envmapping. If it works then that's your issue.
User avatar
Psycho
Posts: 125
Joined: Thu Aug 25, 2011 3:31 am

Re: Mirror, mirror.....

Post by Psycho »

fo0k wrote:Try temporarily removing the lightmapshadowbits file from your map and see if it works. This file can screw up envmapping. If it works then that's your issue.
Thanks for the advice, but it didn't work. Going true my old map versions now to see if I can find something.. But it doesen't look good.
I want to live in a created universe. Virtual reality, here I come.
User avatar
Psycho
Posts: 125
Joined: Thu Aug 25, 2011 3:31 am

Re: Mirror, mirror.....

Post by Psycho »

In no one of my older map versions the object reflection thing works, though all the files and paths are there.
I want to live in a created universe. Virtual reality, here I come.
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Mirror, mirror.....

Post by fo0k »

Can you post a link to map (pm me if you prefer)
I will delve into it.
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Mirror, mirror.....

Post by fo0k »

so if I use an original map envmap..

for your map I used

Code: Select all

ShaderManager.setTextureParam envmap bf1942\levels\Market_Garden\Textures\ENVMAP_G_.rcm
and rename the Lightmapshadowbits.lsb (LSB) (in textures folder) to bak_Lightmapshadowbits.lsb (essentially remove it..)

then your envmapping works fine. It was not working with the LSB.




Can you try again.. Use the envmap path above in init.con and remove LSB.

I'm not sure what the fix is with the LSB / envmapping issue.. somebody might be able to suggest something but from my memory is has always caused issues.. either just not working or you will see the envmapping turn on and off all the time.. (but not exactly when it should.. i.e. in the shade)

fyi, battlecraft does not 'generate' any envmaps... it just uses a few stock ones it has depending on the basic settings of your map.. e.g. europe, africa etc.
User avatar
Psycho
Posts: 125
Joined: Thu Aug 25, 2011 3:31 am

Re: Mirror, mirror.....

Post by Psycho »

That worked. But now I guess I have a new problem with that shadowbit:) On the other hand, now I know whats causing it I guess.

So when are the Lightmapshadowbit.lsb generated? When I generate the maps shadows?
Can it be caused because I used battlecraft to generate them?

So if I render it all from the beginning with some other software, maybe I get proper files?

No, when thinking about it I realize that ENVMAP_G_.rcm don't work even if I renamed the lightmapshadowbit.lsb. It's never easy... hmmm.

When I use ENVMAP_G_.rcm and the dds files from my test map that work, in my big map it won't work. And I pack the maps in the same way with the same program. So i'm sure those files are correct. It must be something more then the Lightmapshadowbit.lsb that isn't working properly.
I want to live in a created universe. Virtual reality, here I come.
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Mirror, mirror.....

Post by fo0k »

Well the LSB tells the game when you are standing in the shaded area.. and will then alter the shaders so it looks like you are darker.. This also tells the engine to stop envmapping. The problem is that an incorrect or corrupt LSB causes a big issue with the envmap.

...What I have just remembered is a standalone tool for generating terrain shadows... which in turn will spit out an LSB file..

Perhaps it is a better way to generate it.

Grab the tools here.. read the readme and expect to do a bit of system tuning ( I had issues but I think I have included anything you might need)

good luck!
BF42_Light.exe-imlist.dat_generator.rar
(1.01 MiB) Downloaded 764 times
User avatar
Psycho
Posts: 125
Joined: Thu Aug 25, 2011 3:31 am

Re: Mirror, mirror.....

Post by Psycho »

Couldn't install the files for the windows32 folder properly in windows7, so it didnt work for me.

So I solved it the hard way:).

Created a new map in the same size as the old one, and imported heightmap and materials. Then I generated surface maps and shadows with battlecraft, testing the map after every step. Then I imported relevant con's and now I have a working map.

Also I think I figured out what went wrong the first time around. I used the "copy map" option when I wanted to rename the map. That messed up the ENVMAP_G_.rcm.
I want to live in a created universe. Virtual reality, here I come.
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Mirror, mirror.....

Post by Apache Thunder »

I hardly ever get usable LSBs via the normal Battlecrap method or anything that involves the merging of terrain shadows via the game engine. What I do is create all white terrain textures, then convert the shadow textures to B&W so that shadows are all black and non shadow areas are all white. Then I merge those to the all white terrain textures via the game engine like normal and that will almost always work for me in making a good LSB file. ;)
ImageImageImage
I have cameras in your head!
Post Reply