Author Topic: Re: Green water in 3d mode?  (Read 3696 times)

Offline Avenger_teambg

  • Planewalker
  • *****
  • Posts: 399
Re: Green water in 3d mode?
« on: May 28, 2004, 03:06:55 PM »
Erm, that was me. I just tend to forget to log in.
DLTCEP is able to convert bg1 overlaid areas into bg2 compatible one.

Offline Ghreyfain

  • PPG
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: Green water in 3d mode?
« Reply #1 on: May 30, 2004, 04:24:17 PM »
Is there any way to do this via a .BAT or something?  If not, how much effort would it be to just cannibalize the specific code for the tileset conversion and make it .BATable?

Would be nice to be able to do the conversion on the fly, and stay true to Tutu's nature (and small download size).
Earn Money Sleeping.

Offline Avenger_teambg

  • Planewalker
  • *****
  • Posts: 399
Re: Green water in 3d mode?
« Reply #2 on: June 03, 2004, 01:37:43 PM »
I don't have time to implement a commandline tool, but it is quite possible.

I did the following in code:
If there was an overlaid tile (tile flags & 1 ^ overlaynum) != 0 then cloned the tile (and set alternate tile to this clone).
I've removed the transparent color from the original tile (i made the transparent pixel take one of its neighbours color, future improvements could base the color selection on all neighbours).
If dithering removal was also enabled, i've made all orphaned pixels transparent in the cloned tile.

Some terms
orphaned pixel: a non-transparent pixel with all neighbours transparent
transparent color: it is the 0. palette index
tile flags: they exist for all tile, if a tile is overlaid,  the overlay is marked by setting the overlay's bit to 1. The first overlay's bit number is 2  (1<<1), because the main overlay (the area graphics) is the first.

I hope this helps.

I'll soon update the DLTCEP sources on the gemrb site too, so one can see the C source.

Offline Ghreyfain

  • PPG
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: Green water in 3d mode?
« Reply #3 on: June 04, 2004, 12:57:58 AM »
Sounds sweet to me.  As soon as you put that source up, maybe someone can go about making a command-line version of it, so it can work with on-the-fly installations.  Nice work Avenger, and thanks. :)
Earn Money Sleeping.

Offline Evange

  • Planewalker
  • *****
  • Posts: 27
Re: Green water in 3d mode?
« Reply #4 on: June 06, 2004, 12:01:11 AM »
Er...so is there any solution an average gamer like me can do to solve the 'green water' prob? All this command line thingy is making my head spin....

Offline Ghreyfain

  • PPG
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: Green water in 3d mode?
« Reply #5 on: June 06, 2004, 12:40:17 AM »
Nothing so far.  If we can convince someone to write a command line tool to do this, you can expect to see it as a fix or something.  Eventually.  Possibly. :)

For now, just turn off 3d animations.
Earn Money Sleeping.

Offline Avenger_teambg

  • Planewalker
  • *****
  • Posts: 399
Re: Green water in 3d mode?
« Reply #6 on: June 18, 2004, 06:05:21 PM »
Sounds sweet to me.  As soon as you put that source up, maybe someone can go about making a command-line version of it, so it can work with on-the-fly installations.  Nice work Avenger, and thanks. :)
It is already up. WedTile.cpp (ongreenwater) and mos.cpp (saturatetransparency), are the most important files to check out.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: