Page 102 of 396
Re: Ask a simple question, get a simple answer
Posted: Wed Nov 25, 2015 2:20 pm
by AndakRainor
Yes, to avoid flooded stairs you would then need water tiles instead of the ocean object... Unless you make a custom 3D mesh with a hole in the middle of the size of your island ?
Re: Ask a simple question, get a simple answer
Posted: Wed Nov 25, 2015 8:54 pm
by minmay
The water shader fades out when outside the boundaries of a 32x32 map, regardless of the model(s) it's attached to. Using more models, moving the models, enlarging the models, or changing the geometry of the models doesn't change this behaviour. Increasing the size of the map beyond 32x32 doesn't change this behaviour. There is no way around this that I know of.
Re: Ask a simple question, get a simple answer
Posted: Wed Nov 25, 2015 9:13 pm
by petri
This sounds a little weird.. for example in the Shipwreck Beach the water extends well beyond the grid. Maybe I'm misunderstanding what you mean, but I think there should be no problem?
Re: Ask a simple question, get a simple answer
Posted: Wed Nov 25, 2015 11:06 pm
by Isaac
petri wrote:This sounds a little weird.. for example in the Shipwreck Beach the water extends well beyond the grid. Maybe I'm misunderstanding what you mean, but I think there should be no problem?
A few months back I made a map that used two Ocean models, back to back (with the seam in the middle of the map), and placed two shipwrecks on the beach, and the seam was effectively invisible.
Another time after, I made total Ocean map (with a mountain on the horizon ~well past the edge). It initially used an arrangement like this:
(This works, and it's easy, but the waves oppose at the seams.)
The better way (as far as appearance goes), is to have the (3) West & East Ocean objects facing the same direction [East/Right in this case] , and using script to move one of the West Ocean objects 90 units further out [West/Left] past the edge. This way the waves match at the East & West seams across the map.
The result is that the player cannot see the seams unless they are right on top of the North or South edge.
(Of course the other option ~once one starts moving the objects in script), is to place several Ocean objects exactly end to end, and have the waves all aligned.
One could (I suppose) define a custom Ocean with several beach_Ocean models pre-offset in the onInit hook; (I've not tried it).
Re: Ask a simple question, get a simple answer
Posted: Wed Nov 25, 2015 11:44 pm
by minmay
petri wrote:This sounds a little weird.. for example in the Shipwreck Beach the water extends well beyond the grid. Maybe I'm misunderstanding what you mean, but I think there should be no problem?
My mistake: it appears to fade based on the camera's position rather than map boundaries.
The best way I can explain what I mean is with a series of screenshots.
Screenshot 1 - This scene mostly looks okay near the camera, but further away the water appears to fade out.
Screenshot 2 - If you view the level from the opposite side, you see a similar effect: the water seems to fade out somewhat near the shore, producing a weird strip below it.
Screenshot 3 - Moving the camera further away makes the effect clear. You can see the boundaries of the water model, and you can see that the water pretty much disappears near the shore. Most obvious is the red and black sphere: the places where the water is in front of it are almost exclusively showing the skybox and foam, because of the party's distance making the rest of the water shader (including the non-sky reflection and refraction) fade out.
Screenshot 4 - This is how the reflection/refraction of the red and black sphere look if you move closer.
Screenshot 5 - This is a similar view to the one in screenshot 3, but the water has been upscaled by 400%. The model is much larger now but the fading effect is still the same.
Note: I don't show it in the screenshots, but changing the FOV of the camera doesn't change the behaviour, only changing the position of the camera does.
Re: Ask a simple question, get a simple answer
Posted: Thu Nov 26, 2015 10:21 am
by petri
Oh, I think what's going on. In the main campaign when you look at the ocean you always look at the horizon (and never towards the beach from far away). (except in the main menu background which is a special case). I remember I made a tweak in the shader that fades out the water surface based on distance from the camera. This makes the ocean-sky intersection in the horizon look much better (the fade out tries to mimic the haziness that appears in the real world).
Unfortunately I can't think of any way to disable this behavior...
Re: Ask a simple question, get a simple answer
Posted: Fri Nov 27, 2015 12:46 am
by Eleven Warrior
I try that out Isaac thxs for the help
Re: Ask a simple question, get a simple answer
Posted: Fri Nov 27, 2015 1:04 am
by minmay
petri wrote:Oh, I think what's going on. In the main campaign when you look at the ocean you always look at the horizon (and never towards the beach from far away). (except in the main menu background which is a special case). I remember I made a tweak in the shader that fades out the water surface based on distance from the camera. This makes the ocean-sky intersection in the horizon look much better (the fade out tries to mimic the haziness that appears in the real world).
Unfortunately I can't think of any way to disable this behavior...
I never meant to imply it was a bad thing.
Re: Ask a simple question, get a simple answer
Posted: Sat Nov 28, 2015 12:51 am
by Isaac
How [exactly] is AnimationComponent:crossfade(name, length) used in the game, and in user script?
Minimal info online that I've found suggests an LOD dissolving fade.
Also: What are the acceptable strings for Champion:showAttackResult(any, string)
*And what's "any"?
Re: Ask a simple question, get a simple answer
Posted: Sun Nov 29, 2015 3:22 pm
by AndakRainor
TimerComponent:getTimerInterval(number)
What is the number parameter there ?