javascript - Define transparent material in JSON Model format 3.1 -


i ask, how define transparent material in json model format 3.1. have tried following json without success:

 {     "metadata": {             "formatversion" : 3      },     "materials": [{         "dbgcolor" : 15658734,         "dbgindex" : 0,         "dbgname" : "dummy",         "illumination" : 2,         "opticaldensity" : 0.5,         "transparency" : 0.5,         "colorambient" : [ 0.9, 0.1, 0.1 ],         "colordiffuse" : [ 0.1, 0.7, 0.1 ]     }],     "vertices": [0,0,0, 100,0,0, 100,100,0, 0,100,0 ],     "normals": [],     "colors": [1,0,0, 0,1,0 ],     "uvs": [],     "faces": [67, 0,1,2,3,0, 1] } 

i have tried play different values illumination, optical density , transparency, no luck.

thanks jan

you need set transparent: true , transparency: 0.5. latter maps opacity.

"materials": [  {     "dbgcolor" : 15658734,     "dbgindex" : 0,     "dbgname" : "dummy",     "transparent" : true,     "transparency" : 0.5,     "colorambient" : [ 0.9, 0.1, 0.1 ],     "colordiffuse" : [ 0.1, 0.7, 0.1 ] }], 

three.js r.60


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -