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

  Рет қаралды 25,655

SimonDev

SimonDev

Күн бұрын

Пікірлер: 50
@simondev758
@simondev758 4 жыл бұрын
Like & Subscribe, thanks!
@Nakasasama
@Nakasasama 4 жыл бұрын
Done will you also look into doing this vimeo.com/264317585 and also maybe a unity 3d version?
@simondev758
@simondev758 4 жыл бұрын
Sorry, didn't see this. Wow this is great, will have to think about how to approach it.
@FlummoxTheMagnificent
@FlummoxTheMagnificent Жыл бұрын
@@simondev758Did you reply to the wrong comment?
@embiem_
@embiem_ 2 жыл бұрын
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 жыл бұрын
Awesome, thank you!
@culpritdesign
@culpritdesign 3 жыл бұрын
This is the best series on the internet
@stefanguiton
@stefanguiton 4 жыл бұрын
What a gem of a channel, great content! Looking foward to more
@simondev758
@simondev758 4 жыл бұрын
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!
@boot-strapper
@boot-strapper 3 жыл бұрын
Just found your channel and I freakin love it. thank you for creating these!
@Chadderbox
@Chadderbox 4 жыл бұрын
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 жыл бұрын
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.
@ZylannMP3
@ZylannMP3 2 жыл бұрын
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...
@treym2k
@treym2k 4 жыл бұрын
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 жыл бұрын
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 жыл бұрын
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 жыл бұрын
@@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 жыл бұрын
@What Game unfortunately my schedule has not permitted much progress.
@quis7659
@quis7659 4 ай бұрын
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?
@michaelschlachter8865
@michaelschlachter8865 Жыл бұрын
Awesome vid.
@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 4 ай бұрын
1:36 looks like mountains in WoW classic lol which I know was made way back when but still lol
@roarc0
@roarc0 3 жыл бұрын
wow you deserve millions of subscribers :D
@Hunter-jj3ud
@Hunter-jj3ud 4 жыл бұрын
It would be cool if you made voxel terrain for this. Perhaps using marching cubes
@simondev758
@simondev758 4 жыл бұрын
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.
@luuuuuuuuuuuul
@luuuuuuuuuuuul 4 жыл бұрын
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!
3 жыл бұрын
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 :)
@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...
@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 :)
@ChrisTharpArt
@ChrisTharpArt 4 жыл бұрын
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! :)
@zeon3d755
@zeon3d755 4 жыл бұрын
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.
@AnthonyPortelli-m3d
@AnthonyPortelli-m3d Жыл бұрын
Is the code still available for this?
@simondev758
@simondev758 Жыл бұрын
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 жыл бұрын
@simondev758
@simondev758 3 жыл бұрын
:)
@gwenaeloppitz3972
@gwenaeloppitz3972 4 жыл бұрын
I wish I could infinite recursion subscribe
@simondev758
@simondev758 4 жыл бұрын
lol
Atmospheric Scattering (and also just faking it)
6:33
SimonDev
Рет қаралды 25 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
3D World Generation #2 (Perlin Noise)
8:37
SimonDev
Рет қаралды 41 М.
3D World Generation: #3 (Quadtree & LOD)
7:12
SimonDev
Рет қаралды 58 М.
3D World Generation: Heightmap Tutorial
9:11
SimonDev
Рет қаралды 50 М.
Ray Marching, and making 3D Worlds with Math
6:28
SimonDev
Рет қаралды 259 М.
The ONE Texture Every Game NEEDS
9:00
SimonDev
Рет қаралды 251 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН