Page 1 of 1

Strange Water Behaviour

Posted: Sat Dec 30, 2006 12:30 pm
by Phex
Hello,

I nearly finished my plugin, but today, during the last check, I realized that there is a very strange water behaviour in one of the maps. :evil: It seems as if the water isnt there but yet it is. Well, it seems strange indeed and I cannot really explain it, therefore I uploaded a picture:
Image.
The units are really standing under water, but they are rendered as if they werent below the water's surface. There are also no spashes in the water when they walk. And their reflection is flying around somewhere. I think have set up everything correctly: a working type of media and a correct height of the water level (-3.00).

When I try to export the reflection map, loathing crashes.

Can anybody help me please? This cant be so complicated...

regards,
Phex

Posted: Sun Dec 31, 2006 10:31 am
by Zeph
are you using this map twice?

if you duplicate a map and modify the terrain on one of them and if they both use the same collection, it won't work. I've had that problem on my Axis vs Allies map. On smaller teams version of the map there were no barricades and on big teams I placed those barricades, what happened is that in smaller teams were shadows of models placed around the map on weird spots.

It also happened when i modified clash in the cloudspine by removing the fortress without duplicating the original collection. In normal view everything looked fine but in fast, i had invisible walls of terrain where models once stood.

Posted: Mon Jan 01, 2007 7:53 am
by Phex
Zeph wrote:are you using this map twice?
No, only once. But I duplicated it a few times during development and deleted the duplicates afterwards. Maybe that caused the bug, I have absolutely no idea.

For the release I replaced the small lake with a dry riverbed and it worked. Its not really what I wanted but better than nothing.

Still I would like to know what's happening here.

Posted: Mon Jan 01, 2007 7:20 pm
by Pyro
While working on a plugin I recently found that I have the same or at least similar water bug. It only happened in the edge of the water in one location. After trying a few things I found a way to solve it today.

Go to Loathing... Mesh... Set All Media Heights... and place a value that will look right. A bit of trial and error will do. For me I placed a value of -2 and it looked just like before without the water bug. The problem lies in the water level of the mesh. It had a few spots wrong.

maps..

Posted: Tue Jan 02, 2007 4:23 pm
by Point
exporting displacement map, water level map and terain map shouldn't crash.. so there must be an error...

If it was me I would create a new mesh from your maps... then go into fear and change the reference to the new color map from the old one and see if crashes when you go to export... I used to change them in hex edit though seems to work as easy in fear... all your unit setups etc.. will stay... just the color map etc... would change i think...

Posted: Sat Jan 06, 2007 3:16 pm
by Graydon
As Pyro has said here, it all has to do with your Media Map height actually. There's nothing buggered with your Rmap or anything. When you lowered your water to -3, you never recomputed the mesh Level of Definition it would appear. Sometimes when you adjust media heights, they dont adjust for whatever reason. A simple cmd+R has fixed such problems in the past for me (unless of course i've got my terrain set to -3, and the media map is still at 0, in which case it wont work).

Hope that makes some sense.

Posted: Sun Jan 07, 2007 4:57 am
by Phex
Good hints, but they all do not work. The surrounding terrain has the exact height of -3:
Image

When I set my water level > -3 it looks like this:
Image

When I set my water level < -3 it looks like this:
Image

I also recomputed the mesh LOD, as you said, but without an effect. Objects still do not disappear below the water's surface.

And yes, I am using the newest (I hope :roll: ) version of loathing, 1.5.2.

Posted: Sun Jan 07, 2007 5:45 pm
by Pyro
Well that's is the only think you can do to fix this issue. Mess around with it.

Posted: Sun Jan 07, 2007 6:42 pm
by ozone
May I ask? Did you use the loathign tool for painting reflection?

Posted: Sun Jan 07, 2007 7:38 pm
by Phex
May I ask? Did you use the loathign tool for painting reflection?
yes

...

Posted: Mon Jan 08, 2007 5:30 am
by TheHelmet
I did this a couple of times, mainly to smoothen out the imported reflection map since mine always come out really jagged.

Did you make sure that the reflection map exactly mirrors the terrain map? I think I had a problem in the beginning where painting the reflection map wouldn't automatically turn the terrain into media and I had to go over it piece by piece making it the different depths..

That's the only thing I can think of.. That solved my problems at least. :?

Posted: Mon Jan 08, 2007 10:53 am
by ozone
personally I stay away from that tool as it has caused me problems in the past.

Posted: Wed Jan 10, 2007 9:52 pm
by Graydon
Yea, that tool isnt even ON the mac version of loathing, mainly cause it's a buggy piece of crap.

Here's the way you should go about it; Open your colourmap in Photoshop, and turn on the 'grid' (View----->Show-----> Show Grid....[and it might be a good idea to select 'snap to grid' here too]...), and set up in Photoshop's prefs for the grid size to be 8x8 pixles. This effectively makes your grid squares into 1 World Unit sections.

Now use the polygonal lasso tool, and perfectly outline the 'water' cells, essentially creating a selection around your water, and only your water.

Now that the selection is a closed polygon, go under 'Selection' i think it is, and go 'Modify Selection---->Expand' and set in an expansion rate of 2 pixles.

Now you've got your modded water selection, create a new layer and fill said water selection with solid Black. Create another layer _behind_ the black layer, and fill the page with white. Now you've got a black and white reflection map, that follows your grid pattern perfectly. Index it, save it, and import it into loathing. Repeat the process of editing your media levels and you should be sailing.

If any of this was unclear, or you want me to do it for you.... let me know.

...

Posted: Thu Jan 11, 2007 8:53 am
by TheHelmet
ozone wrote:personally I stay away from that tool as it has caused me problems in the past.
Yeah, I think people adviced me not to use it but you know, desperate times and all that :wink:

I'll probably go with Gray's solution then, the one I use doesn't follow my specs nearly as well as I want it to..

PS. Gray, did you fall off MSN? 8)

Posted: Thu Jan 11, 2007 9:00 pm
by Graydon
No man, I've seen you on there a few times, just really havent had a long enough period of time to stop and say hi :o

I'll be at home tonight I reckon... maybe I'll catch you then.