View Full Version : Weird reflection shapes on ocean surface
02-27-2007, 10:04 AM
I'm having this weird reflection problem with the Maya ocean shader, even if I'm just using it as a displacement map on a ocean surface with a blinn shader; I keep seeing these weird shapes, they don't look like reflections at all but with the ocean shader on it they appear as strange bright surfaces on the ocean. At first I thought it might be a tessellation problem, as I'm still seeing them only as a displacement map, but when I turn off trace reflection in the oceanplaneshape or make the surface shader a lambert, it shows a smooth waved surface without those "things" on it. I tried making the environment ramp on the oceanshader all black, and even setting reflectivity on 0 in the oceanshader's specular shading, it doesn't make any difference. The through shadowing option also makes no difference. I'm rendering with mental ray. Does anyone know what causes these wierd reflection-things and how I can fix this? Turning off trace reflections does help, but it makes the rendered ocean look really ugly. I'm trying to fix this for hours now, but nothing works :(
02-27-2007, 10:23 AM
When rendered with the shader they appear like black pools within the waves. That color seems linked to the enviroment ramp color because those pools change color when i change the ramp. The rest of the waves however stay normal and reflect the sky. Those black area's also behave really glitched when the ocean is animated.
02-27-2007, 11:40 PM
If you don't see the problem in the Maya render (only in Mental) then it likely due to raytracing being on by default in mental. The displacement has a bump map for fine detail. When raytracing bump mapping can cause artifacts where the reflected ray goes under the triangle it hits. You can avoid this problem by turning off "visible in reflections" on the ocean plane. If you really need the self reflections, then increasing the tessellation on the ocean will help(the triangles would need to nearly resolve the finer bumps).
02-28-2007, 11:48 AM
please let me hijack this thread for another question about the ocean shader:
is it possible that the wave shader has a severe filter problem.. or even: no filter at all?
i find it impossible to create a regular ocean shader that does not terribly flicker in distance. bump blur does not help. if i set it high enough to solve the problem in the distance, i have no detail in the close ranges anymore.
i deleted the connection to the displacement as well to be sure that is not the problem.
if i take other textures like fractals and generate a similar looking ocean with them, the filtering works like exprected and i dont need to heavily post process the images to make them work.
02-28-2007, 12:23 PM
I can't seem to get it any better then this though(see attachment), turning off visible in reflections did help a bit. I'm really not sure how to fix this one...
02-28-2007, 07:39 PM
The black pools are simply where the reflection of the ocean goes below the half sphere you map your sky onto(env_sphere). In reality it would partially off of the ocean again and then out onto the sky, which is why black looks unnatural, especially with lots of fog scattering the light. I would just make your env_sphere a full sphere, and perhaps map a slightly darker version of the sky to the lower half.
Alexx... The bump blur on the ocean shader is a global offset (like the BumpFilterOffset on the bump node) that simply determines the separation distance of the bump samples relative to the smallest wave frequency. (bump performs extra samples per pixel to determine slope)
On the bump node the bumpFilter attribute controls this sample separation relative to the size of a projected pixel.. so points that are far away or on surfaces that slope away get a larger blur. This is similar to the way filter and filter offset work with textures that support blurring.
We should probably add a view based blur perhaps combined with a high frequency suppression on the texture to better handle horizons. I initially resisted doing this as it is not strictly accurate... the specular highlights will tend to merge and focus in the distance thus one will get better results with high antialiasing. However I see now that this is not nearly as bad an artifact as sampling the horizon, particularily with the Maya renderer. In the maya render I would recommend at least the constrast sensitive production settings.
It is possible to texture the bump blur on the ocean shader based on distance to the camera. A simple method is a projection down y of a circular ramp centering the projection on the camera position. Another method is to connect the pointCameraZ of a samplerInfo to a remap value. (the z may be always negative, if so set the inputMinMax on the remap value accordingly) You need to adjust the input/output min/max ranges to get the correct effect, and you may also wish to adjust the value gradient.
Also if you use an ocean texture, rather than an ocean shader, you can use the bumpFilter on the bump node the way it works with other textures.
03-01-2007, 08:20 AM
thanx a lot duncan for those infos.
and yes: we are still using mayas software renderer :)
03-01-2007, 09:56 AM
Thank you very much! It looks so much better now!
03-01-2007, 09:56 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.