Hi
I’m a beginner of three.js. I need help about a glTF model effect.
Except the lights and shadows the model shows up very different in my demo and in third person program.
I don’t know where to start to find my problems please help thanks a lot
Will need more information, or ideally a way to reproduce the problem. Can you share your code? The model? By “other people with WebGL” do you mean a specific device, or a different viewer? If so, which?
I cann’t share my code now but i can say I’m using three.js very basic way and I’m a beginner.
I’m not using special lights shadows post processing
I just load a glTF model in to web with three.js
The model files are large cann’t be up loaded here but I can send the files to you
Thanks
It also looks like the beard is using transparency, and should be using only alphaTest. You can test that:
var model = gltf.scene;
model.traverse( function ( o ) {
if ( ! o.isMesh ) return;
o.material.transparent = false;
o.material.alphaTest = 0.5;
o.material.needsUpdate = true;
} );
If that’s not solving the problem, @1116 please share much more detail. If you’re not willing to do the work of providing detail – say exactly which differences you mean, and how you have set up your code – then it is unfair to expect others to spend time guessing for you.
I really like to share my code and I thought there are many UI logic make things more complicated so I said I can not share my code but I really don’t not mean that
At first I thought maybe someone with much three.js experience can see the differences from pictures and I was wrong. I’m so sorry for that
my problems is:
1:beard/hair/brow looks bad even with your code o.material.alphaTest = 0.5; maybe some special shaders or settings need to be set ? transparent material error?
2:the lights part or maybe the material parts
ClayViewer loading same model looks shinny, bright and more real. My demo looks ster and no reflection
I tried with lights and shadows but not wok
for me It is like fishing for a needle in the ocean。 I really don’t know where to start and there are too many possibilities. I tried lights/HDR/some postprocessing and failed
Here is my main code and sorry again for my poor english
1:the beard part is transparent and not showing correct
2: clayviwer load the same model looks more shining and feels better. my english is poor and I don’t know how to express it