Jump to content
Sign in to follow this  
K4thos

[solved] Differences in BG2:EE TIS/WED support compared to BG2

Recommended Posts

Up until now we knew that BG2:EE and vanilla BG2 engine had the same problems with dithered water. With a recent release of tile2ee tool we can now extract PVRZ based files back to TIS format and try to fix water problem when porting dithered water to BG2:EE using additional tis2bg2 tool (for example used by BGT and EasyTutu Degreenifier).

 

But it looks like there are 2 more problems with BG2:EE when it comes to supporting BG1 areas even if converted to use stencil water:

 

1. Interior areas have strange corner transparency issues (shows up in every interior area when ported from BG:EE, doesn't matter if in TIS format or PVRZ format):

 

Baldr001.jpg

 

It seems to be related to zooming feature, as it can look different when viewed in Window and Fullscreen mode. Here is how it looks in BG:EE.

Probably it's some kind of undocumented WED setting that need to be tweaked for interior areas. The only new thing in WED format that we know about is previously unused 'movement type' field in every overlay header. It's not documented on IESDP but according to Avenger we can set this layer flag to:

0 - default

1 - disable rendering

2 - alternate BGEE rendering

 

Changing it to either of these 3 values doesn't fix above or below mentioned problem. In case someone would like to test this new flag you can use DLTCP or following weidu code:

COPY_EXISTING ~nameofThe.WED~ ~override~
    READ_LONG 0x8 ovr_count
    READ_LONG 0x10 ovr_offset
    FOR (index = 0 ; index < ovr_count ; index = index + 1) BEGIN
        WRITE_SHORT ("%ovr_offset%" + 0xe + (0x18 * "%index%")) "2" //0- default, 1- disable rendering, 2- alternate BGEE
    END

2. BG2:EE engine has problem with showing up not only dithered water (that is expected) but also stencil water that is fully supported by vanilla BG2 engine

 

This is how water looks like in BG:EE (dithered water), BGT (stencil water), EasyTutu (with degreenifier - stencil water):

 

e9Op9kR.jpg

 

same area in BG2:EE shows up like this:

44KX775.jpg

 

It doesn't look that bad on screenshot but when you see it in game with animation it looks absolutely awful.

If anyone want to test it here are all files from clean BGT installation related to AR9200 Shipwreck's Coast and TIS file used as water there (direct copy from BGT, just with cleaned out junk from ARE to not crash BG2:EE). Use CluaConsole:MoveToArea("AR9200") and see yourself that it looks like in second screenshot in BG2:EE. Now paste these files to clean BG2 installation (or just use BGT if you have it installed) and teleport to the same area. You will see correctly rendered water like in first screenshot.

 

-------

 

Any information how to resolve both issues would be appreciated. Proper TIS/WED format differences documentation on IESDP for BG2:EE engine will be useful for all modders working with areas.

Edited by K4thos

Share this post


Link to post

K4thos: 1: We had a clipping bug where when you zoomed out, it would still clip based off the unzoomed rectangle, and clip off the left most tile.

 

2: The Wind Speed variable was unused on the code side, so a single byte there was re-purposed to control the alpha on the stencil water so we can have more or less transparency there. If you set it to 0, (0x0052) then the water should be appropriately 50% transparent. If you set it to any other number, it will be that transparent. It's 1 byte, so setting it to 128(or 0x80) you'll have the same as the default of 0

Share this post


Link to post

2: The Wind Speed variable was unused on the code side, so a single byte there was re-purposed to control the alpha on the stencil water so we can have more or less transparency there.

Seems to work. Don't use smaller numbers, however, to avoid graphical echoes during time stop.

Edited by argent77

Share this post


Link to post
K4thos: 1: We had a clipping bug where when you zoomed out, it would still clip based off the unzoomed rectangle, and clip off the left most tile.

Awesome. I was planning to open a new topic in bug section to report it. Good to hear that it's a known bug. Looking forward for next patch :)

 

2: The Wind Speed variable was unused on the code side, so a single byte there was re-purposed to control the alpha on the stencil water so we can have more or less transparency there. If you set it to 0, (0x0052) then the water should be appropriately 50% transparent. If you set it to any other number, it will be that transparent. It's 1 byte, so setting it to 128(or 0x80) you'll have the same as the default of 0

I can confirm that zeroing wind speed value (50% transparency) in ARE files indeed makes the water look exactly the same as in BG1 and BG2 engine.

 

---

 

Thank you very much Blaze for sharing this information on IESDP forums. It will be useful for many modders for sure.

Edited by K4thos

Share this post


Link to post

Has anyone found a way to properly import EE TIS/WED files that contain water to BGT?

Problem is that the water is completely buggy, and I suspect that the .WED file is responsible for this, but I have no idea what I could change to get rid of the green.

Attachement related.

Screenshot (1395).jpg

Share this post


Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...