three.js Stencil Buffer - Learn the WebGL Stencil Buffer

Поделиться
HTML-код
  • Опубликовано: 13 окт 2024

Комментарии • 14

  • @MsCoolskin
    @MsCoolskin Год назад +5

    Great job on your video! Your explanations were incredibly clear and your insights were both relevant and useful. Thank you for sharing your knowledge with us!🤩

  • @leondustar
    @leondustar 11 месяцев назад

    thanks for this, this was hard for me without this vid

    • @heygenka
      @heygenka  11 месяцев назад

      yeah it is hard to understand

    • @leondustar
      @leondustar 11 месяцев назад

      @@heygenka
      I'm applying stencilplanes to planes found in a glTF model.
      The issue I have is that when rendering long objects inside/behind the stencilplane, their geometry can come out of the stencilplane (towards the camera, for example a long stick coming out of the stencilplane).
      Ofcourse I can mitigate the side-effect by scaling down the object(s), but any idea to clip that as well?
      I tried fiddling with the near-property of the camera (adjusting it to the distance between the camera-position and stencil-plane position) but without any luck.
      Do you think this might be a renderOrder issue?
      Does setting the renderOrder to 0 make any difference if their parent has renderOrder 3 e.g?

  • @yubanyuban8492
    @yubanyuban8492 4 месяца назад

    thank you for your job, you are good at explanation, please keep on making more videos

  • @binoypilakkat7830
    @binoypilakkat7830 3 месяца назад

    Thank you very much for the content.

  • @andressalazar9671
    @andressalazar9671 Год назад +1

    Amazing 🤩. I have a question, how do you make the mask to be transparent, setting opacity to 0?

    • @heygenka
      @heygenka  Год назад

      You can the attribute of the mask material: 'stencilMat.colorWrite = false'

  • @javifontalva7752
    @javifontalva7752 Год назад

    Can you create a metaball effect with a few sphere? I am trying to do ot but I can't pull it off.

  • @MinecraftMarket
    @MinecraftMarket Год назад

    does this only work on meshes? could I have unique lighting for inside each face

    • @ffffoundit3198
      @ffffoundit3198 Год назад

      maybe to do that you would need to combine renderTargets with stencil 🤔

  • @Andrew-qc8jh
    @Andrew-qc8jh Год назад

    How did you come across this? I am always looking for new threejs resources to study from and just going through github can be tedious with the amount of material on it.

    • @heygenka
      @heygenka  Год назад +1

      I did exactly that, checking out examples and reverse engineering this topic. And some reading in some forums, etc ...

  • @ノーマンジェイデン
    @ノーマンジェイデン 9 месяцев назад