Download

Specular for translucent material

Please fix the specular for translucent surfaces material! Right now it does not work!

I wrote something similar in the answershub a day ago and I absolutely support that. This is crucial. And I was surprised this is not possible at the moment.

Is it not possible to render the translucent material in a separate forward render pass? I really have no idea.

Well, then just fix it, at least, for forward rendering. :wink: It is better than nothing.

A bit of trolling :smiley: http://gyazo.com/82f24d94b7effe29284d4c99a4cdfcdf

If you really need specular on your surface, you can use a fake method with manual light vector calculation.

How did you make that?

I’ve just defined LightVector as parameter, set it to approximate sun position, and calc specular based on Phong model.

P.S. - can show source if you need.

Please. :slight_smile:

I’ve separated specular calculation here: http://gyazo.com/9bb0925c909e94096a90e4f59b2b86a2

HLSL code for custom node:


float3 reflected_eye_to_pixel_vector;
float specular_factor;

reflected_eye_to_pixel_vector=-pixel_to_eye_vector+2*dot(pixel_to_eye_vector,microbump_normal)*microbump_normal;
specular_factor=fresnel_factor*pow(max(0,dot(pixel_to_light_vector,reflected_eye_to_pixel_vector)),SpecularPower);

return specular_factor;

The specular calculation is pretty easy to do manually for point and directional lights, and there are quite a few variations, but it’s a pain that you have to pass it in as a set of parameters (meaning it’s basically dynamic, and handling multiple lights or large scenes is a complete ball-ache).

For a ocean water, just having the Sun it is good enough.

Thanks for sharing it.