Coder Social home page Coder Social logo

Comments (4)

fenomas avatar fenomas commented on August 28, 2024

Hi,

I think two separate properties are overlapping here. When you register a material, you specify a hasAlpha to tell whether that material's should have transparency. The engine only uses this for deciding what kind of (babylon) material to create.

Separate from that, when you register a block type you specify whether it's opaque. This is the setting that determines whether stuff underneath the block gets culled at the meshing stage. From looking at the image, I think all you need to do is make the leaf blocks not [edited] opaque, and it'll do what you expected.

(Note that blocks also have a property solid - this one is for physics, and has nothing to do with rendering.)

Let me know if this works!

from noa.

Nesh108 avatar Nesh108 commented on August 28, 2024

I will try now. But yeah, I was a bit confused with the difference between opaque, solid and so forth.

So:

  • Opaque: is whether you can see through it or not
  • Solid: is whether you can go through it or not
  • Fluid: is basically the opposite of solid (but will be extended when we implement the fluid functionality)

Correct?

If so, shouldn't the leaf not be opaque?

from noa.

fenomas avatar fenomas commented on August 28, 2024

Yes, you have it right, and the leafs should not be opaque (that was a typo 😬 ).

Basically they're all really single-purpose properties. I mean, it probably won't make any sense to have a block that's fluid but solid, or that's opaque but has alpha, but the engine looks as each property in different ways so I have them all separate for now.

from noa.

Nesh108 avatar Nesh108 commented on August 28, 2024

Sweet, I just set opaque: !hasAlpha and that works like a charm!

from noa.

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.