Aerion Posted October 2, 2017 Share Posted October 2, 2017 Is there any reason why the back ( face ) of my leaf texture is shining with specular when I turned off specular for the leaf texture? I circled in the color black, the leaf that is shining with specular white that should be off. As you can see, the front ( face ) of the leaves are fine. Here is the Source Code : meshTask.onSuccess = function ( task ) { task.loadedMeshes [ 0 ].position = BABYLON.Vector3.Zero ( ); // Decrease specular or what is called shine in the thread // Mat 94 - Bark Texture scene.getMaterialByName ( "Mat94" ).specularColor = BABYLON.Color3.Black ( ); // Mat 910 - Leaf Texture // Disable culling or what is called seeing half the leaves in the thread scene.getMaterialByName ( "Mat910" ).backFaceCulling = false; } Thanks! Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 2, 2017 Share Posted October 2, 2017 Hi, As always, it is much better to actually see it that to see a picture of it. Check your emissive texture and color, try to use the disableLighting flag and see if there is any effect. Also - you are changing the specular color of the bark, but not of the leaves. Your circle is around a leaf. Maybe try playing with the leaves-material? But again - reproduce it on the playground if you want a quicker solution. Quote Link to comment Share on other sites More sharing options...
Aerion Posted October 2, 2017 Author Share Posted October 2, 2017 @RaananW http://babylontesting.epizy.com/loadentity/ http://babylontesting.epizy.com/loadentity/models/deciduous/01/deciduous01/deciduous01.mtl meshTask.onSuccess = function ( task ) { task.loadedMeshes [ 0 ].position = BABYLON.Vector3.Zero ( ); // Decrease specular or what is called shine in the thread // Mat 94 - Bark Texture scene.getMaterialByName ( "Mat94" ).specularColor = BABYLON.Color3.Black ( ); // Mat 910 - Leaf Texture // Disable culling or what is called seeing half the leaves in the thread scene.getMaterialByName ( "Mat910" ).backFaceCulling = false; } Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 2, 2017 Share Posted October 2, 2017 You have the diffuse texture defined as specularTexture as well. You can either set the specularPower to be a very hight number, disable the lighting (as suggested before) or simply remove the specularTexture and see what happens. Make sure your specularColor is set on the right material (as also suggested). Quote Link to comment Share on other sites More sharing options...
jerome Posted October 2, 2017 Share Posted October 2, 2017 not sure this effect is related to the material specular did you try to set the light specular to black ? http://doc.babylonjs.com/classes/3.0/light#specular-color3-classes-3-0-color3- Quote Link to comment Share on other sites More sharing options...
Aerion Posted October 2, 2017 Author Share Posted October 2, 2017 @jerome i just did, but to no avail... http://babylontesting.epizy.com/loadentity/ meshTask.onSuccess = function ( task ) { task.loadedMeshes [ 0 ].position = BABYLON.Vector3.Zero ( ); // Decrease specular or what is called shine in the thread // Mat 94 - Bark Texture scene.getMaterialByName ( "Mat94" ).specularColor = BABYLON.Color3.Black ( ); // Decrease specular or what is called shine in the thread scene.getMaterialByName ( "Mat910" ).specularColor = BABYLON.Color3.Black ( ); // Mat 910 - Leaf Texture // Disable culling or what is called seeing half the leaves in the thread scene.getMaterialByName ( "Mat910" ).backFaceCulling = false; } Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 2, 2017 Share Posted October 2, 2017 You know, I test each and every one of my suggestions before posting them. You have a specularTexture, that once removed, removes the shininess effect on your leaves. And, as also suggested in a different thread, disable the offline support, as it prevents you from actually seeing changes made in your resources. Set the offline mode when you are happy with the result. Quote Link to comment Share on other sites More sharing options...
Aerion Posted October 2, 2017 Author Share Posted October 2, 2017 @RaananW how can i turn the lights off of the specular texture? i rather like that nice, bright texture. but without the shine of specular. p.s. manifest has been disabled. Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 2, 2017 Share Posted October 2, 2017 material.disableLighting = true But I am not sure this is the effect you are looking for. Remove the specularTexture and see if it solves your issue Quote Link to comment Share on other sites More sharing options...
Aerion Posted October 2, 2017 Author Share Posted October 2, 2017 i tried the darker texture earlier, but it too had the same problem. if you like zoom out, then rotate it quickly, it looks like the leaves are still shining. Quote Link to comment Share on other sites More sharing options...
Aerion Posted October 2, 2017 Author Share Posted October 2, 2017 @RaananW scene.getMaterialByName ( "Mat910" ).disableLighting = true; seems to have done it. check it out & tell me if when rotating, you see it still flashing like glass on the leaves : http://babylontesting.epizy.com/loadentity/ If it worked, then I will mark this as solved. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 2, 2017 Share Posted October 2, 2017 All about the specular for me. You can mark as solved. 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.