3D World Generation: #5 (Texturing): Triplanar Mapping/Infinite Splatting/Blending/Bombing

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ม.ค. 2025

ความคิดเห็น • 50

  • @simondev758
    @simondev758  4 ปีที่แล้ว +11

    Like & Subscribe, thanks!

    • @Nakasasama
      @Nakasasama 4 ปีที่แล้ว +1

      Done will you also look into doing this vimeo.com/264317585 and also maybe a unity 3d version?

    • @simondev758
      @simondev758  4 ปีที่แล้ว +1

      Sorry, didn't see this. Wow this is great, will have to think about how to approach it.

    • @FlummoxTheMagnificent
      @FlummoxTheMagnificent ปีที่แล้ว +1

      @@simondev758Did you reply to the wrong comment?

  • @embiem_
    @embiem_ 2 ปีที่แล้ว +5

    I love all your videos. Can't stop watching, cloning & tinkering then on to the next one. So much to learn. Going to get your course after I've watched all the content on this channel.
    Would love to see your channel growing more. Your content is pure gold.

    • @simondev758
      @simondev758  2 ปีที่แล้ว +1

      Awesome, thank you!

  • @stefanguiton
    @stefanguiton 4 ปีที่แล้ว +6

    What a gem of a channel, great content! Looking foward to more

    • @simondev758
      @simondev758  4 ปีที่แล้ว +1

      Appreciated! Anything you think you wanna see?

    • @stefanguiton
      @stefanguiton 4 ปีที่แล้ว

      @@simondev758 Not anything in particular, just enjoying to watch along the process. This is great stuff!

  • @culpritdesign
    @culpritdesign 3 ปีที่แล้ว +5

    This is the best series on the internet

  • @boot-strapper
    @boot-strapper 3 ปีที่แล้ว +7

    Just found your channel and I freakin love it. thank you for creating these!

  • @Chadderbox
    @Chadderbox 4 ปีที่แล้ว +6

    This is awesome! I can really step up my landscapes with this. I had never heard of texture bombing before and I think that would be great.

    • @simondev758
      @simondev758  4 ปีที่แล้ว +1

      No worries, let me know if I you need help integrating it! I just wrote the glsl but if you're bringing it into Unity it shouldn't be hard to translate.

  • @treym2k
    @treym2k 4 ปีที่แล้ว +3

    This has been very useful in the creation of my game thank you, and figuring out how to implement this with c++ and UE4 has been fun

    • @simondev758
      @simondev758  4 ปีที่แล้ว +1

      That's awesome, do you have any screenshots or videos you can share?

    • @treym2k
      @treym2k 4 ปีที่แล้ว

      @@simondev758 I also work full time as a .NET dev so progress has been slow, but I am in the process of implementing quad trees currently. This is what I have so far. Not much yet but your videos have been invaluable. gyazo.com/05325bcf8444908cbf9bbe079b0d903d

    • @simondev758
      @simondev758  4 ปีที่แล้ว +1

      Neat effect, kinda looks like layers of rock.
      Happy my videos are helping, if you need more explanation or have ideas on what I should work on next let me know.

    • @treym2k
      @treym2k 4 ปีที่แล้ว +1

      @@simondev758 Thank you, as far as ideas not really a video idea but you should make a discord server. Somewhere for people to pop in with a question. Besides that man keep up the great work. I can defiantly see you blowing up soon.

    • @treym2k
      @treym2k 3 ปีที่แล้ว +1

      @What Game unfortunately my schedule has not permitted much progress.

  • @ZylannMP3
    @ZylannMP3 2 ปีที่แล้ว +3

    There is a problem with your `_TerrainBlend_4` function. I'm assuming `samples[i].w` contains input weights, and that they are computed as `samples[i].w = heightInTexture * splatWeight`. Imagine all samples have weight zero, except one, which has a height 0.1 in some pixels. The maximum of all weights will then be 0.1. So `ma` will be -0.1. Next you do `max(samples[i].w - ma, 0)` to compute final weights, but for a sample that had weight 0, it will result in `max(0 - (-0.1), 0.0)`, which gives 0.1 for textures that should never have showed up...

  • @michaelschlachter8865
    @michaelschlachter8865 ปีที่แล้ว +1

    Awesome vid.

  • @quis7659
    @quis7659 5 หลายเดือนก่อน

    Thank you for your awesome video series! Ive already watched most of your videos and learned a lot for my own game dev journey. I have a question regarding the shader code: I noticed that in the _TriplanarN_UV function, the texture_UV function is used for texture access. If I understand correctly, two normals are being combined like color values. Actually, there should be some kind of reoriented normal map blending performed here to avoid distorting the normals or am i missing something?

  • @roarc0
    @roarc0 3 ปีที่แล้ว

    wow you deserve millions of subscribers :D

  • @LuccDev
    @LuccDev ปีที่แล้ว

    Isn't the triplanar normal mapping technique that you showcase looks very different from the Ben Golus article. Now, I'm not good at that math, so I can't exactly check if it's any different.

  • @bob-ji7ks
    @bob-ji7ks 3 ปีที่แล้ว

    amazing video man

  • @theninedivides6851
    @theninedivides6851 5 หลายเดือนก่อน

    1:36 looks like mountains in WoW classic lol which I know was made way back when but still lol

  • @sdfsdfs13
    @sdfsdfs13 3 ปีที่แล้ว

    I want a Unity shader that will work in a normal mesh that I can just input like 4 color textures and 4 masks each masking the coordinate of color texture. Like Unity terrain shader but for a normal mesh, because the Unity terrain sucks and I want to sculpt a terrain in Blender and import the mesh into unity. If you know of anything like that...

  • @Hunter-jj3ud
    @Hunter-jj3ud 4 ปีที่แล้ว +1

    It would be cool if you made voxel terrain for this. Perhaps using marching cubes

    • @simondev758
      @simondev758  4 ปีที่แล้ว +1

      Marching cubes is on my project list, will try to incorporate it into this series :)
      I do have a quickie minecraft clone if you want to check it out, which does have voxel terrain.

  • @zeon3d755
    @zeon3d755 4 ปีที่แล้ว +1

    How would you place roads and buildings?

    • @simondev758
      @simondev758  4 ปีที่แล้ว

      You'd need to build out a more robust tool for painting the type onto the terrain. Roads have orientation which kinda complicates things, I'd have to try to go mock something up.

    • @zeon3d755
      @zeon3d755 4 ปีที่แล้ว

      @@simondev758 IDK if this is how it needs to be done but seems very complex. sci.utah.edu/~chengu/street_sig08/street_sig08.pdf

  • @animationspace8550
    @animationspace8550 4 ปีที่แล้ว

    I've looked for every LOD method I could but I still haven't found not even one way to implement voxek destruction and physics. Anyways to get at this?

    • @simondev758
      @simondev758  4 ปีที่แล้ว

      Nah sorry, have given that zero thought. I'd have to do some research on current techniques and get back to you.

  • @GarronArgentina
    @GarronArgentina 3 ปีที่แล้ว

    I find hard isolate the texture splatting functionality from the github repo. I assume it is because I am not so familiar with shaders.

    • @simondev758
      @simondev758  3 ปีที่แล้ว

      The splatting code is broken into several components, there's the shader code that supports the indexed 2d texture arrays, the texture-splatter.js class that uses noise to determine splat contributions, and then the terrain-builder-threaded-worker.js that has a horrible chunk of code that loops over the verts and creates the weights. The code for that is specifically here: github.com/simondevyoutube/ProceduralTerrain_Part8/blob/master/src/terrain-builder-threaded-worker.js#L162
      I kinda wrote it quickly about a year ago at this point, so I don't remember exactly how it works. The general idea is that you need to keep weight indices within a triangle exactly the same, since interpolation across the verts will screw things up. But you'll have to read it carefully to get the details :)

  •  3 ปีที่แล้ว +1

    This shader is awesome! If you had a Unity version of this shader then it would be nice.

    • @simondev758
      @simondev758  3 ปีที่แล้ว

      I'll get around to a unity version one of these days :)

  • @ChrisTharpArt
    @ChrisTharpArt 4 ปีที่แล้ว +2

    Getting closer to no man's sky.

    • @simondev758
      @simondev758  4 ปีที่แล้ว

      Just a few more years of development and I can have a really cheaply done clone! :)

  • @luuuuuuuuuuuul
    @luuuuuuuuuuuul 4 ปีที่แล้ว +1

    Hello!
    As I promised, I tried making my own minecraft clone. Managed to generate some random terrain using Math.random haha. Tho, in your video, you said you used a technique called "instancing with cubes" to reduce lag... How'd you make that work? I also got a LOT of trouble trying to make the FirstPersonCamera module work, using OrbitCamera rn (im using threejs as well) do you think you could point out some clues? Completely new to threejs btw haha.
    cheers :)

    • @simondev758
      @simondev758  4 ปีที่แล้ว

      Nice work! Got any screenshots or videos you can share?
      About the instancing, I don't think there's a specific name for the technique, I just used instancing and happened to use cubes. Just get familiar with what instancing is. The relevant code is in the github repo here: github.com/simondevyoutube/MinecraftClone/blob/master/src/voxels.js#L76 and here github.com/simondevyoutube/MinecraftClone/blob/master/src/voxels.js#L162.
      You'll see a loop about halfway through _RebuildFromCellType that collects info about every voxel, and then stuffs them into instancedBufferAttributes. Pretty much all the voxel rendering is done in this class.
      About the FirstPersonCamera module, you're welcome to just take the one I wrote, or at least go through it to see how it works: github.com/simondevyoutube/MinecraftClone/blob/master/src/controls.js

    • @luuuuuuuuuuuul
      @luuuuuuuuuuuul 4 ปีที่แล้ว

      @@simondev758
      here's what i've got so far: cdn.discordapp.com/attachments/707042885522030693/712494766440579170/minecraft.mp4
      And also thanks for the tips man, I will hopefully start making my terrain generation decent!

  • @AnthonyPortelli-m3d
    @AnthonyPortelli-m3d ปีที่แล้ว

    Is the code still available for this?

    • @simondev758
      @simondev758  ปีที่แล้ว +1

      Yep, its on github

    • @AnthonyJPortelli
      @AnthonyJPortelli ปีที่แล้ว

      @@simondev758 Sorry for just barging in with a request, I was on a trip and I stumbled across your video quite late :-) really good work! I am looking into some experimenting but I couldn't find the code to look at. Apologies if I am just blind!

  •  3 ปีที่แล้ว +1

  • @gwenaeloppitz3972
    @gwenaeloppitz3972 4 ปีที่แล้ว +2

    I wish I could infinite recursion subscribe