World position instead of UV - non triplanar method

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

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

  • @robinj6997
    @robinj6997 6 месяцев назад +1

    man... your tutorials are unbeatable. They contain the right amount of technical depth. Not just how we do things, but why it works and what errors we would see without proper methods

  • @suchaaverygoodartist
    @suchaaverygoodartist Месяц назад

    this was an absolutely wonderful video. I knew nothing about triplanar mapping, and now I feel like I can go in Godot and experiment with it.

  • @addmix
    @addmix Год назад +2

    I definitely wouldn't have thought to simplify the texture queries like that. Definitely useful for some cases where you don't want blurred textures.

  • @ehmprah
    @ehmprah Месяц назад

    This is incredible! I have been trying to do just this for days. Thank you

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

    I love such optimization breakdowns. Amazing!

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

    Bro. You just saved me from a massive headache! Thanks. ❤

  • @SonicTheCat
    @SonicTheCat 6 месяцев назад +1

    Interesting idea, how does it look with a rock texture on the terrain?

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

    You save my life! This is what I am finding! Thanks you so much!

  •  Год назад +2

    Thank you, Mohsen!

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

    Could you make a showcase of this on some real world case scenarios? can I use this method to use normal maps more efficiently? Can you show scenes, where the typical normal maps are replaced with your method of projection to create more efficient fake geometry?

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

      Take a look at this tutorial this is one of the use cases of this method:
      ruclips.net/video/_-UmK6KAc4M/видео.html

  • @gashtepolice5798
    @gashtepolice5798 7 месяцев назад

    very good. functional explanation.

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

    That's a really cool idea!
    However, I'm convinced that 3 texture reads are not a performance bottleneck. The simplest postprocessing shader for outlines starts on 4 reads of screen texture per pixel and modern hardware manages it just fine.
    Still a cool optimization idea! I learned something today :)

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

      Thanks

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

      There is a significant difference between taking 4 samples from *the same* texture (as you would do in outlining) and 4 samples from *four different* textures (as you would do for terrain blending). Plus, in terrain blending you not only have a single property/attribute like albedo, but also normal, specular, AO, etc.

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

      Naw, triplanar mapping can be expensive.
      Texture fillrate is a common a bottleneck on PC games. Texturing a pixel often involves blending of many textures, and many PBR maps per texture used, and sometimes complex smoothing and samples of dirt, mud, scuffs, and decals. Doing math on floats is easy nowadays, total FLOP output is rarely the bottleneck.
      On RTX 3080, texture fillrate is only ~4x pixel fillrate. So texture fillrate bottlenecks way before pixel fillrate.
      And on Integrated Graphics / Mobile, texture fillrate turns into a memory bandwidth bottleneck as well, which is killer.
      Postprocessing edge detection isn't the same comparison; you don't have overdraw and the 4 reads are adjacent (ddx() and ddy() are often considered quite cheap).

    • @ShrikeGFX
      @ShrikeGFX 10 месяцев назад +1

      Fetching a sample is one of the most expensive things you can do in a shader

  • @KENISEG
    @KENISEG Год назад +2

    thanks a lot!
    I use this info for make my visualshader

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

    Conhece o BigLinux baseado no Manjaro? Da uma conferida.

  • @rminnovaciones
    @rminnovaciones 10 месяцев назад

    Greetings.
    "sampler2D screen_texture : hint_screen_texture" I would like to take the capture but only of a specific "MeshInstance3D" which the camera is focusing on, do you know how I can do it. Actually making a "dash" of a "MeshInstance3D".

  • @Sorshx_1
    @Sorshx_1 11 месяцев назад +1

    What is the benefit?

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

      As this use less texture function it has a higher performace

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

    Wow thank you! Can’t wait for more!

  • @oiltanker7332
    @oiltanker7332 9 месяцев назад

    I arrived to this myself, using a little less efficient method, but I can see you have same problem, as in in exact places where there is transition between x-y-z planes there is an artifact line.

    • @oiltanker7332
      @oiltanker7332 9 месяцев назад

      I actually like more how my method looks:
      float yDot = abs(lNorm.y);
      float zDot = abs(lNorm.z);
      vec2 uvCords = lVert.yz; float sDot = abs(lNorm.x);
      if (yDot - sDot > 0.001) { uvCords = lVert.xz; sDot = yDot; }
      if (zDot - sDot > 0.001) { uvCords = lVert.xy; sDot = zDot; }

  • @Paokann
    @Paokann 6 месяцев назад

    Is this possible in Godot 3.5?
    Version 3.5 dont have MODEL_NORMAL_MATRIX in spatial shader...
    UPD:
    oh, in 3.5 i can use render_mode world_vertex_coords;

    • @mohsenzare2511
      @mohsenzare2511  6 месяцев назад

      Yeah the same concept can be applied there