JCPalmer Posted November 13, 2015 Share Posted November 13, 2015 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? Quote Link to comment Share on other sites More sharing options...
²Digitalgames Posted November 13, 2015 Share Posted November 13, 2015 Hello, besides the coding part, do you have normalmap or specular maps generated to use ? I guess it would be hard to archieve a nice skin shader without textures controlling the values. A fresnel could also improve the skin shader visual. Greetings Edit : I quickly testet some skin material. http://materialeditor.raananweber.com/ mat_694104 Its not so easy to set up But you can see that a specular map could help you alot. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 13, 2015 Author Share Posted November 13, 2015 No this is coming from MakeHuman via MHX2 / Blender. There is only diffuse for this material. Even if you do a human skin shader, I think this would force skeleton processing to the CPU. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 13, 2015 Share Posted November 13, 2015 Hey why not just turning specular off on the skin material and keep it on the eye material? just set material.specularColor = BABYLON.Color3.Black() to turn spec off JCPalmer 1 Quote Link to comment Share on other sites More sharing options...
gryff Posted November 13, 2015 Share Posted November 13, 2015 Jeff, the skin material that comes with a MH model does have a specular component - a grey colour. Try reducing the intensity of the specular to 0. Here is an example of "suzanne" -only difference between the materials is is one has a specular intensity of 1 the other 0. suzanne cheers, gryff JCPalmer 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 13, 2015 Author Share Posted November 13, 2015 Black worked. Yea. Gryff, will look for this specular material. Is it a file? If so, maybe MH 1.1 or MHX2 no longer does this. I checked the MH export textures directory, see nothing. Black does most of the job. Quote Link to comment Share on other sites More sharing options...
²Digitalgames Posted November 13, 2015 Share Posted November 13, 2015 Hm i thought make human had a normal map and a specular. I haven´t found the specular. Anyway, i quickly made this textures from MHX2 https://drive.google.com/folderview?id=0B8Kq9XFiF6gxaW0tU0J1UkNwVFU&usp=sharing Feel free to try them out. It looks like this on my preview program : http://www.pasteall.org/pic/show.php?id=95279 Edit: I am not so good with specular map art. I really love pbr since that feels more natural in designing shaders. JCPalmer 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 13, 2015 Author Share Posted November 13, 2015 Thanx, 2DG. I already think I am good. Reason being the picture above gets really close @ 0 cost. As this is being geared for Gaming, bang for the buck is very important. The diffuse make human skin textures are already big both from a file standpoint, like 3.7 mb to 4.4 mb, but more importantly 2048 by 2048 in resolution. The file size can be reduced by changing to .jpg with little effect, but the resolution will max out tablets & PC with wimpy graphics, or a least contribute more than its worth. If I was making art, then it would be different. I am actually thinking about options in the exporter to produce jpg's with lower resolution. Quote Link to comment Share on other sites More sharing options...
²Digitalgames Posted November 13, 2015 Share Posted November 13, 2015 Yeah its quite difficult to get very small texture sizes. Kkrieger was one of the 128 kbyte Demos- it showed how much can be done with programming. http://www.theproduct.de/ But thats kind of offtopic. You can reduce the texture as much as you want - i thought i give you full quality so that you can downgrade the texture if needed.Beside that, Makehuman models can have a lot of polygones that aren´t so good for realtime apps. You can export a lowpoly model on the newer version,but its so reduced that it looks bad because of the reducing. What do you want to achieve with the Make Human Model? For skin shading, look what is possible just with the right shading on the texture - and low polygones https://s-media-cache-ak0.pinimg.com/736x/99/31/78/993178756108b65fc4d69e1dbdd0a04e.jpg Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 13, 2015 Author Share Posted November 13, 2015 I found the actual problem when I tried to transfer the specularColor to the Blend file. The TOB exporter was not writing specular color (it was a dark grey). The .babylon variant should be ok. After fix, I think get something better than black, still 0 additional cost. Oh My! 2DG, everything is relative. I was using a high poly mesh in this voice sync tool, using shape keys, not an actual game. It was the only thing in the scene & always going to be on a desktop, so splurging. I should try with a low poly (hold on for a while). I like MHX2 always puts the high poly, called Base, in the export. If you select an alternate topology in MH 1.1 (Female1605 or Male1591), it puts both "Base" & it in export. On import, you can pick, saves time. I think everything is relative on a given platform. If that's the best a tablet can do at the moment, do not think MH is going to be worse than others. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 13, 2015 Author Share Posted November 13, 2015 Here is, with Female 1605. Not terrible. As hardware improves, this will lessen the need to use, or provide multiple versions of the game (without major dev problems). Quote Link to comment Share on other sites More sharing options...
pichou Posted October 30, 2017 Share Posted October 30, 2017 Hello, this topic is quite old but I have the same issue with MultiMaterial. I tried to set the specularColor to BABYLON.Color3.Black() on one of the subMaterial but it doesn't work for me as I also need to apply a specularTexture on this subMaterial. SO I was wondering, Is there a way to have a specularTexture without the shiny effect or is it the purpose of the specular to be shiny? (I am using DirectionalLight for the light of me scene if it can help) PS : @JCPalmer, your Female 1605 should brush her teeth! Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted October 31, 2017 Share Posted October 31, 2017 I think your specularTexture overwrite specularColor. You probably need to edit your texture (make it darker if you want less spec intensity). However you still have access to specularPower. 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.