Reflection issues

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
WaspUK1966
Posts: 135
Joined: Sat Aug 09, 2014 9:17 am

Reflection issues

Post by WaspUK1966 »

I have a beach scene on the Ist level of my mod (and rivers etc). Everything was fine (you could go in the sea etc), and the reflections looked good. Today, however, when I was doing some more work on my mod, I've noticed that every time you step into the sea itself, all the water turns a light white. Then it corrects itself once you step out. I thought it might just be the editor, so I exported it to test, but the problem is still there. Any ideas? I could always just put blockers in place to stop the player entering the sea, but the game wouldn't feel right then. I do have water tiles in the sea to make the noise of walking through water whenever the player enters the ocean. Thought this could be the issue, so I removed them, but the problem hasn't gone away...

George
User avatar
Duncan1246
Posts: 404
Joined: Mon Jan 19, 2015 7:42 pm

Re: Reflection issues

Post by Duncan1246 »

WaspUK1966 wrote:I have a beach scene on the Ist level of my mod (and rivers etc). Everything was fine (you could go in the sea etc), and the reflections looked good. Today, however, when I was doing some more work on my mod, I've noticed that every time you step into the sea itself, all the water turns a light white. Then it corrects itself once you step out. I thought it might just be the editor, so I exported it to test, but the problem is still there. Any ideas? I could always just put blockers in place to stop the player entering the sea, but the game wouldn't feel right then. I do have water tiles in the sea to make the noise of walking through water whenever the player enters the ocean. Thought this could be the issue, so I removed them, but the problem hasn't gone away...

George
Perhaps you use -3 in ocean heighmap, if so, reflection underwater don't works: use -2 or above
The Blue Monastery (LOG1)
download at:http://www.nexusmods.com/grimrock/mods/399/?

Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
User avatar
WaspUK1966
Posts: 135
Joined: Sat Aug 09, 2014 9:17 am

Re: Reflection issues

Post by WaspUK1966 »

No. The lowest the height map for the ocean goes is -2. I've just tried diff height levels just to test, but the problem still persists. As soon as you step into -2 it happens. But without using -2 on the height map, the ocean doesn't work and is just flat and looks rubbish.
minmay
Posts: 2770
Joined: Mon Sep 23, 2013 2:24 am

Re: Reflection issues

Post by minmay »

This is why you don't want to use objects without looking at their definitions to see what they actually do.
beach_ocean doesn't make a water surface mesh with an underwater side like water_surface does. It's just a WaterSurfaceComponent (to update reflection/refraction maps) and a pair of models: a large rectangle mesh for the water, and another large rectangle mesh for the sandy floor. You should never allow the camera to go beneath the water mesh.
beach_ground_water isn't an underwater tile, it just has a water movement sound. It's for use on squares where the party is wading into the water but not actually becoming submerged; they can't ever become submerged unless they enter an actual underwater tile!

If you want the party to be able to gradually wade into water and become completely submerged, you will need to use actual water tiles, and you cannot use beach_ocean; you'll need to use either a WaterSurfaceMeshComponent or just make your own model. And you will need to deal with the various problems inherent to such a transition (water clipping the ground, odd behaviour of water shader when the camera is very close to it, sound, ambient track restarting every time water is entered/left, etc.). I strongly recommend that you stop wanting that in the first place, instead.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
WaspUK1966
Posts: 135
Joined: Sat Aug 09, 2014 9:17 am

Re: Reflection issues

Post by WaspUK1966 »

Thanks for that. I was aware of the limitations you mentioned, that's why I don't have the party submerging in the sea. But I've fixed the problem now. I just deleted the ocean object, saved and reloaded, then put it back on the map. Everything seems to be ok now. Don't know why it happened in the first place though! Once again, thanks for the replies. Much appreciated.

George
trancelistic
Posts: 275
Joined: Sat Jun 16, 2012 5:32 am

Re: Reflection issues

Post by trancelistic »

I had simular things in LoG1. Ofcourse not like yours. But my dungeon is acting up now as it has a mind on it own..
MOnster from floor 1.. go to other floors for no reason... plates who trigger only once. trigger endlessy... and..


my latest thing I changed in the LoG1 editor, was to randomly create a spawner who spawned a snail. It had no connections, no activate nothing.
Well guess what.. in no time there is 10000 snails on the floor and the spread to other floors/levels too:S I don't get it haha.

I sure got a buggy dungeon lol.

All in all, its try and error. Keep on trying. I fixed most of my weird behavior.. but some are still here. I'm sure others get it too.
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: Reflection issues

Post by Azel »

Using objects without looking at their definitions is my favorite pastime; highly recommended to other Modders as well :P

It's a shame that the ocean doesn't work like an ocean by default, but I did learn something new about the "beach_ground_water" thanks to this thread!

I am having some strange issues as well with the water reflection on my Selenitic Age map, but I'm gonna take the info here and review how I'm applying the height map against the fake ocean. Thanks for posting this!
trancelistic wrote:All in all, its try and error. Keep on trying.

Exactly! Although I think you mean, "trial and error," but I agree; screwing up and trying again is probably my favorite part about Modding :mrgreen:
Post Reply