Search the Community
Showing results for tags 'specular'.
-
I have been having a problem showing materials in a scene, where some are shiny & some not. Usually, you might not notice everything being a little shiny, by default BJS scenes are a little shiny, but my material is human skin. It is very important it not look too shiny. It will look like a doll that was just in the bath tub. People will pick up on that immediately. It seems that there are many different angles to handle specular. One way is to turn it off at the light source. Skin looks good, but nothing else in the scene will. I also do not want to resort to special lights for skin using layer masks. The default specular of a light is 1,1,1. Let's stick with that for now. Here is what my character looks like: The eyes & teeth look ok. The shirt is actually shiny, just not in the part showing. Here is the code generated that make the skin material: material = new BABYLON.StandardMaterial("VoiceSync.Clothed_ponytail:Female1605:Young_caucasian_female", scene);material.ambientColor = new BABYLON.Color3(0.302,0.302,0.302);material.diffuseColor = new BABYLON.Color3(1,1,1);material.emissiveColor = new BABYLON.Color3(0,0,0);material.specularPower = 256;material.alpha = 1;material.backFaceCulling = true;material.checkReadyOnlyOnce = true;texture = new BABYLON.Texture(materialsRootDir + "young_lightskinned_female_diffuse.png", scene);texture.hasAlpha = true;texture.level = 1;texture.coordinatesIndex = 0;texture.coordinatesMode = 0;texture.uOffset = 0;texture.vOffset = 0;texture.uScale = 1;texture.vScale = 1;texture.uAng = 0;texture.vAng = 0;texture.wAng = 0;texture.wrapU = 1;texture.wrapV = 1;material.diffuseTexture = texture;If I control it by turning off specular at the light, I like the skin, but everything else looks dead, see eyes. I played with some of the source above by hand, but things like setting specularPower to 0, just turned the skin bright white. I am hoping this is just an education problem on my part. Is there something that can be done?
-
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!
-
https://www.babylonjs-playground.com/#9HEBCE#27 When you turn ti the right you see a reflection on the floor. How can I set the specularColor in a customMaterial to reduce the amount of specularity?
-
In my application I am loading a mesh using SceneLoader.ImportMesh. The mesh has StandardMaterial with specular color set to (0.05,0.05,0.05) If I load this using babylonjs 3.0 the specular value loads properly If I load this using babylonjs 3.1 alpha the specular value is set to (1,1,1) Unfortunately I am unable to reproduce this in the playground. In playground the specular value loads properly. So I am assuming the mesh specular value is being effected by some other setting in my app I tried changing light type, light color, scene clear color, scene ambient color, shadow on off, skybox on off. No luck Can't figure out what. Anybody any idea ?
-
Сan be assigned to show diffuse texture to the model if it is to apply PBR? I founded in the documentation, only examples of pre-set: metal, plastic, glass and wood. For example: var scene = new BABYLON.Scene(engine); var camera = new BABYLON.ArcRotateCamera("Camera", -Math.PI / 4, Math.PI / 2.5, 200, var hdrTexture = new BABYLON.HDRCubeTexture("textures/room.hdr", scene, 512); var hdrSkybox = BABYLON.Mesh.CreateBox("hdrSkyBox", 1000.0, scene); var hdrSkyboxMaterial = new BABYLON.PBRMaterial("skyBox", scene); hdrSkyboxMaterial.reflectionTexture = hdrTexture.clone(); hdrSkyboxMaterial.disableLighting = true; hdrSkybox.material = hdrSkyboxMaterial; material = glass; glass.refractionTexture = hdrTexture; glass.reflectionTexture = hdrTexture; ???? material.diffuseTexture = new BABYLON.Texture("/path", scene);
- 6 replies
-
- babylon.js
- pbr
-
(and 3 more)
Tagged with:
-
For everyone who needs a NormalMap Generator for Windows, Mac, Linux and whatever...: I have build an online in-browser free normal map generator. http://cpetry.github.io/NormalMap-Online/ Screenshot: Please give feedback, post ideas or problems you encounter. Greetz, Christian