ozRocker Posted December 21, 2016 Share Posted December 21, 2016 I seem to get dirty looking areas on surfaces facing at an angle from the light source. It literally looks like dirt or grease has been smeared on the model. I've attached an image which shows it on the top of the arms, forehead and bridge of the nose. I've never seen this kind of effect in any other 3D editor. I've been playing around with lighting trying to fix this problem. I'm not sure what I'm doing wrong. I've put up a playground here http://www.babylonjs-playground.com/#19K1J2#10 (for some reason I cannot move the camera in the playground) Quote Link to comment Share on other sites More sharing options...
Sebavan Posted December 21, 2016 Share Posted December 21, 2016 This comes from the way the ambient is managed in the shader. The greasy looking area should be in shadow but only enhance by ambient. I can also notice that you already have shades in your diffuse so the light is almost not usefull in your model as it it is like a fully baked one. you can then push only the diffuse and disable the light to speed up the rendering. http://www.babylonjs-playground.com/#19K1J2#11 adam 1 Quote Link to comment Share on other sites More sharing options...
ozRocker Posted December 21, 2016 Author Share Posted December 21, 2016 3 minutes ago, Sebavan said: This comes from the way the ambient is managed in the shader. The greasy looking area should be in shadow but only enhance by ambient. I can also notice that you already have shades in your diffuse so the light is almost not usefull in your model as it it is like a fully baked one. you can then push only the diffuse and disable the light to speed up the rendering. http://www.babylonjs-playground.com/#19K1J2#11 isn't this the same as making emissiveColor (1,1,1) ? That means there is no lighting effect at all. Yes there is some light baked into the texture from a light source from above going down. You can see it on the neck and between the legs. But I still wanted to add some dynamic lighting so you can see the topology. But anyway, I don't think those baked shadows are related to the grease/dirt effect Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 21, 2016 Share Posted December 21, 2016 something to play around withhttp://www.babylonjs-playground.com/#19K1J2#15 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted December 21, 2016 Share Posted December 21, 2016 yep same as making emissive white. Nope the issue does not come from the baked shadow, nor the lighting but the mix of baked information and lighting. The issue is also more visible with the use of the bump map. Without it, it still looks weird: http://www.babylonjs-playground.com/#19K1J2#12 The shaded area seems pretty blue like the top of the forearm for instance but this is also in the diffuse texture itself. You would need to add lighting on top of it either to extract the information and split the textures or use some color curves setup and at last a post process if the rest is not in your plans. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted December 21, 2016 Author Share Posted December 21, 2016 3 minutes ago, Sebavan said: yep same as making emissive white. Nope the issue does not come from the baked shadow, nor the lighting but the mix of baked information and lighting. The issue is also more visible with the use of the bump map. Without it, it still looks weird: http://www.babylonjs-playground.com/#19K1J2#12 The shaded area seems pretty blue like the top of the forearm for instance but this is also in the diffuse texture itself. You would need to add lighting on top of it either to extract the information and split the textures or use some color curves setup and at last a post process if the rest is not in your plans. That sounds about right. Thanks for the tip! I'll have a play with some extra lights. @Nabroski made a cool playground for me to try out so hopefully that will help. I noticed that Blender also has the same dirty effect when using a point light. Nabroski 1 Quote Link to comment Share on other sites More sharing options...
ozRocker Posted December 22, 2016 Author Share Posted December 22, 2016 On 21/12/2016 at 2:44 PM, Sebavan said: Quote Link to comment Share on other sites More sharing options...
ozRocker Posted December 22, 2016 Author Share Posted December 22, 2016 (pls ignore previous post, damn editor won't let me delete quoted text) I've settled for this http://www.babylonjs-playground.com/#19K1J2#17 I think it looks reasonable. Thanx for the help fellas! adam 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.