Jump to content

Not everything is shiny, e.g. human skin


Recommended Posts

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?


Link to comment
Share on other sites

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. 






Its not so easy to set up :) But you can see that a specular map could help you alot.

Link to comment
Share on other sites

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




Feel free to try them out.


It looks like this on my preview program :




Edit: I am not so good with specular map art. I really love pbr since that feels more natural in designing shaders.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. 




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 


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 year later...


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! ;)

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...