World position instead of UV - non triplanar method

Sdílet
Vložit
  • čas přidán 6. 05. 2023
  • triplanar mapping

Komentáře • 31

  • @robinj6997
    @robinj6997 Před 12 hodinami

    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

  • @addmix
    @addmix Před rokem +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.

  • @AgnisNeZvers
    @AgnisNeZvers Před rokem +1

    I love such optimization breakdowns. Amazing!

  • @friendlyfox2189
    @friendlyfox2189 Před 10 měsíci +1

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

  • @solitary200
    @solitary200 Před rokem

    Wow thank you! Can’t wait for more!

  • @ThapakornTantirattanapong
    @ThapakornTantirattanapong Před 10 měsíci +1

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

  • @gashtepolice5798
    @gashtepolice5798 Před měsícem

    very good. functional explanation.

  • @SonicTheCat
    @SonicTheCat Před 10 dny

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

  • @KENISEG
    @KENISEG Před 6 měsíci +2

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

  • @vojtastruhar8950
    @vojtastruhar8950 Před rokem +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  Před rokem +1

      Thanks

    • @wojtsterna
      @wojtsterna Před 11 měsíci +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 Před 8 měsíci +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 Před 4 měsíci +1

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

  • @linuxrant
    @linuxrant Před 7 měsíci +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  Před 7 měsíci

      Take a look at this tutorial this is one of the use cases of this method:
      czcams.com/video/_-UmK6KAc4M/video.html

  • @franciscomenezes4308
    @franciscomenezes4308 Před rokem +1

    Conhece o BigLinux baseado no Manjaro? Da uma conferida.

  • @rminnovaciones
    @rminnovaciones Před 4 měsíci

    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".

  • @oiltanker7332
    @oiltanker7332 Před 3 měsíci

    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 Před 3 měsíci

      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; }

  • @Sorshx1
    @Sorshx1 Před 5 měsíci +1

    What is the benefit?

    • @mohsenzare2511
      @mohsenzare2511  Před 5 měsíci

      As this use less texture function it has a higher performace

  • @Paokann
    @Paokann Před 5 dny

    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;

  •  Před rokem +2

    Thank you, Mohsen!