Coder Social home page Coder Social logo

Comments (11)

finetjul avatar finetjul commented on July 3, 2024

What picture is incorrect ? do you have backface culling enabled on the incorrect picture ?

from vtk-js.

TimDeBauwReLu avatar TimDeBauwReLu commented on July 3, 2024

Backface culling is enabled on all pictures, the last picture (larger mandible with the full jawbone) is the incorrect one

from vtk-js.

TimDeBauwReLu avatar TimDeBauwReLu commented on July 3, 2024

I forgot to mention that this problem does not appear when using camera.setParallelProjection(true);

from vtk-js.

finetjul avatar finetjul commented on July 3, 2024

What's the difference between the 3rd picture and the last picture ? Only the mesh is different ?

from vtk-js.

TimDeBauwReLu avatar TimDeBauwReLu commented on July 3, 2024

The color of the bone is too dark, and you can see a big contrast between the bone and the teeth sockets (dark red vs bright red). It is supposed to be like this I believe:
Screenshot 2024-05-13 at 14 15 38

from vtk-js.

finetjul avatar finetjul commented on July 3, 2024

Gotcha.

It would be great if you could attach that STL file to the issue.
The shader code should be investigated...

from vtk-js.

TimDeBauwReLu avatar TimDeBauwReLu commented on July 3, 2024

Here are the files used to reproduce it:

Archive.zip

from vtk-js.

finetjul avatar finetjul commented on July 3, 2024

You might want to check the magnitude of your normals (maybe it is different between the teeth triangles and the jaw triangles).
Alternatively, you might also want to test without diffuse light coefficient, only ambient, and see if the problem is light related.
Finally, you might want to consider the OrderIndependentTranslucentPass code...

from vtk-js.

TimDeBauwReLu avatar TimDeBauwReLu commented on July 3, 2024

@finetjul It looks like it has something to do with the diffuse light coefficient. When I put it to zero, it looks like this.

Screenshot 2024-05-15 at 17 04 18

I guess that depending on the distance from the camera to the object, the intensity of the diffuse component changes? Do you have an idea where to investigate this issue?

from vtk-js.

finetjul avatar finetjul commented on July 3, 2024

And this blackness does not happen if it is opaque? Do you have ambient lighting?

from vtk-js.

TimDeBauwReLu avatar TimDeBauwReLu commented on July 3, 2024

Yes, it is caused because I do not have ambient lighting I believe. The blackness also occurs when the mesh is opaque

from vtk-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.