Painting a Terrain in Blender

Фильм және анимация

Have a terrain mesh and need to apply textures to it? This video walks you through using multiple masks to blend textures together to make a complex textured terrain without using an overly huge texture.
Help support the channel:
Patreon: / markmckay
Blender Market: blendermarket.com/creators/ki...

Пікірлер: 73

  • @vixiliannebrightsun81
    @vixiliannebrightsun81 Жыл бұрын

    This tutorial is EXCELLENT, very detailed and easy to follow and you’ve got an excellent voice as well, very Bob Ross like! I love it, thank you so much

  • @crystaltigeranimations4949
    @crystaltigeranimations4949 Жыл бұрын

    You're a godsend! I'm making a TF2-Themed map for my friends, and I really needed to figure out how to texture stuff in Blender and this tutorial was extremely helpful. You don't ramble on about stuff that doesn't matter, and you actually explain what you need to, and the instructions are clear and concise. I was easily able to extrapolate the information I needed as I'm not doing quite the same thing as you, since I need a few more textures to blend, but you taught it well enough that I was able to understand exactly how I should do it without needing another tutorial for it. Your teaching made it make sense! Thank you so much.

  • @Grandalf3004
    @Grandalf3004Ай бұрын

    This still works for terrains with overhangs and holes too!! it just means your final texture will be more slightly more bloated in size from unwrapping and flattening, but in modern systems that have so much memory its barely noticeable, even phones.

  • @jernejcebasek8369
    @jernejcebasek83694 ай бұрын

    You don't know how much you have helped me with further understanding how to create better ground terrain. Thank you so much for this tutorial and i wish you all the best in life! :)

  • @nobanan838
    @nobanan838 Жыл бұрын

    I've been looking for a tutorial like this for a very long time, thanks !

  • @IndigoArcadia
    @IndigoArcadia Жыл бұрын

    This is exactly the video I was looking for. thank you!

  • @rakdos5371
    @rakdos5371 Жыл бұрын

    Fantastic tutorial, thank you so much!!!

  • @theshadowgamedev61
    @theshadowgamedev61 Жыл бұрын

    You helped me a lot. Thanks!

  • @danielvillalba5375
    @danielvillalba5375 Жыл бұрын

    This helps a lot.

  • @AlexValder
    @AlexValder Жыл бұрын

    I had trouble with exporting my terrain into Godot Engine, but it turns out you can save mask images as separate files, and then you can recreate with VisualShader all the setup. Some nodes are named differently, but as long as you remember that colors and textures and also vectors, you'll figure it out. There has to be similar solution for Unity and/or Unreal (though they should be having built-in terrain editing tools)

  • @Cris-Alencar
    @Cris-Alencar Жыл бұрын

    Awesome and very useful tutorial, thank you very much for sharing your knowledge! :) Would you know please if it's possible to paint in real time in the rendered preview too?

  • @GalaxyPedlar

    @GalaxyPedlar

    Жыл бұрын

    In Blender the interactive texture paint doesn't update in real time in Cycles. It does work in Eevee, though. You can try painting in either hardware renderer or Eevee to get realtime feedback.

  • @Cris-Alencar

    @Cris-Alencar

    Жыл бұрын

    @@GalaxyPedlar thank you very much for answering. :)

  • @maschlarea5172
    @maschlarea517211 ай бұрын

    Excellent, I can't add anything what hasn't been already stated. Since I never really made friends with nodes: I have a large Terrain with several different types of ground, among which is grass, so I need an underlying grass material, since it'll be rendered from the top. I have 3 ready made materials I want to use - I copied & pasted them all into 1 new material (mixed BSDF & Displacement also in a mix node), added the mix nodes between the materials (after the BSDF/Disp mix nodes) , masks, but I can't seem to get the masks to work. It seems like I'm always painting on the wrong image, even though I select the appropriate image node. Nothing ever happens 😅 When I switch to shaded mode, I see the white strokes, but they don't have an influence. Going into the Texture slots, I saw I was actually painting a scattering mask. Weird!

  • @GalaxyPedlar

    @GalaxyPedlar

    11 ай бұрын

    Blender's system is not the easiest to use and it can be easy to select the wrong mask to panit into. You might want to go through the tutorial a second time just to be sure you got everything.

  • @maschlarea5172

    @maschlarea5172

    11 ай бұрын

    @@GalaxyPedlar The mask was correct, I had the UV scale way up, so the area was tiny and tiled all over the mesh, so I couldn't see it. Most of the time, the following day and fresh eyes bring the solution 😀

  • @DAST_3D
    @DAST_3D2 жыл бұрын

    how do you export this to the game engine? baking the texture or is there some other way? Nice video. Thanks for sharing this content

  • @GalaxyPedlar

    @GalaxyPedlar

    2 жыл бұрын

    You could bake it, but that's not recommended because you'll end up with a huge texture. A better way will involve writing a custom shader that can load all your texture and mask images individually and mix them in the game engine. Some game engines have a shader node system similar to Blender, so you can build the same network in the game engine and load your textures in that way.

  • @ninikiki7039

    @ninikiki7039

    Жыл бұрын

    @@GalaxyPedlar how to write texture and mask info to mesh fle like fbx?

  • @GalaxyPedlar

    @GalaxyPedlar

    Жыл бұрын

    @@ninikiki7039 I don't know about fbx. However, this is a custom node setup and you will need most likely need to create a custom shader for it in whichever program you are importing it into. So you should probably be importing the map files themselves instead of relying on fbx to do it for you.

  • @ryandracuscodesgames8418
    @ryandracuscodesgames8418 Жыл бұрын

    After applying the scaling and the other transforms, how do I save that image texture as an image file? The UVs don't translate to the original image used once we scale it. Is there a way to save the new one?

  • @GalaxyPedlar

    @GalaxyPedlar

    Жыл бұрын

    You can save both the mask and terrain texture as separate images. The two images are using different UVs. When you import your model to your game engine, make sure you're using a shader that uses one uv set for the mask and the other uv set for the texture.

  • @ryandracuscodesgames8418

    @ryandracuscodesgames8418

    Жыл бұрын

    @@GalaxyPedlar Hmm. How would I go about saving that file? I'm not using a game engine. I'm using my own 3d software renderer where I just read the vertex, uv, and face values from the obj file as a text file, and I import it to my own classes for use.

  • @ryandracuscodesgames8418

    @ryandracuscodesgames8418

    Жыл бұрын

    @@GalaxyPedlar A better question for me to ask is, is the scaling applying to the uv's where it will divide or multiply all the uv's by that set scale or the image size itself? If it's the uv's is it dividing? I'm not sure what transformation is being done in blender.

  • @GalaxyPedlar

    @GalaxyPedlar

    Жыл бұрын

    @@ryandracuscodesgames8418 The obj file won't save the details of the shader's Mapping node, so you won't see it in the file. You'll need to find another way to export this data or maybe even just copy it by hand. Then in your program you'll need to create a matrix which does the same transform as the Mapping node and then for every uv coordinate, multiply it by this matrix (or perhaps the inverse of this matrix - I don't recall which at the moment).

  • @ryandracuscodesgames8418

    @ryandracuscodesgames8418

    Жыл бұрын

    @@GalaxyPedlar I appreciate the assistance to a stranger. I created and applied a scale matrix, it didn't have to be inverse luckily enough, to all the uv's by my factor, and it came out like it did in blender in my software renderer. Thanks!

  • @AleksandarPopovic
    @AleksandarPopovic Жыл бұрын

    Nice idea, ans ypu can bake difuse textture, an,go with more texture....

  • @GalaxyPedlar

    @GalaxyPedlar

    Жыл бұрын

    I've put together another tutorial which shows a more advanced version of this technique. kzread.info/dash/bejne/n52Jo8WYk6fTcdI.html

  • @rileycantsleep
    @rileycantsleep Жыл бұрын

    super helpful, ive referenced this video a few times now. would you or anyone else that stumbles on this comment know of a shader that supports this for unity that isn't the built in terrain system? or maybe something similar. preferably free if possible

  • @GalaxyPedlar

    @GalaxyPedlar

    Жыл бұрын

    I haven't used Unity in a while, but maybe I could do that in a future video.

  • @rileycantsleep

    @rileycantsleep

    Жыл бұрын

    @@GalaxyPedlar woah i didn't expect a response, thank you!! that'd be awesome in the future. im still looking for one someone else made but im mostly an art/graphics person than a techy/coding type so ive been lost on where to search haha. i appreciate your reply a lot though!

  • @julliannur2717
    @julliannur271711 ай бұрын

    Bingo thankyou

  • @GIOCONNO
    @GIOCONNO4 ай бұрын

    Is it possible to bake all the painted textures in one texture to export as image texture? i'm trying it but i get always black images :(

  • @GalaxyPedlar

    @GalaxyPedlar

    4 ай бұрын

    It is possible, but you'll probably get a huge texture. Setting up texture baking can be tricky - practice on a smaller model before trying with the terrain shader.

  • @GIOCONNO

    @GIOCONNO

    4 ай бұрын

    i reealy need to learn how to bake and export terrain shader, i don't mind if it's a huge texture, because it a single texture only for terrain :D @@GalaxyPedlar

  • @GalaxyPedlar

    @GalaxyPedlar

    4 ай бұрын

    @@GIOCONNOThere are lots of baking tutorials on KZread. They should give you a good idea of how to set this up.

  • @GalaxyPedlar

    @GalaxyPedlar

    4 ай бұрын

    @@GIOCONNOI've put together a video that goes over the basics. kzread.info/dash/bejne/lmuFvJWxeKaaZ5s.html

  • @DarkMaglc123
    @DarkMaglc123 Жыл бұрын

    Can you do this with more than two textures?

  • @GalaxyPedlar

    @GalaxyPedlar

    Жыл бұрын

    Yes. You can repeat the process of adding a new layer and layer mask as many times as you want.

  • @DarkMaglc123

    @DarkMaglc123

    Жыл бұрын

    @@GalaxyPedlar Awesome, thanks for the quick reply!

  • @Awtsmoos
    @Awtsmoos8 ай бұрын

    B"H Hi the problem is when exporting to GLB it doesn't keep the mix shader info I need to bake it to a UV map. How can I do that, or how can I get it to work in an exported model (GLB ideally)?

  • @GalaxyPedlar

    @GalaxyPedlar

    8 ай бұрын

    You can't export the shader directly. You'll need to create a new shader in your game engine and copy the parameters across by hand. I have another video that goes through the process. kzread.info/dash/bejne/mqSa2rd9gNu8ips.html

  • @Awtsmoos

    @Awtsmoos

    8 ай бұрын

    @@GalaxyPedlar cool. Tried just making a basic mix shader using shader material in three.js. problem is it didn't preserve any of the other standard shader options (say for meshlambertmaterial). I could remake them all from scratch in the shader (like fog shadows lighting etc.) But do you know if there a way to do mix shader effect with built in three.js? In terms of storage also if we are just using the entire texture for black and white for each overlay there should be a better way to store it rather than like png that saves every pixel at least between 0 to 255 for rgba

  • @GalaxyPedlar

    @GalaxyPedlar

    8 ай бұрын

    @@Awtsmoos I'm not that familiar with three.js, but I think it's based on OpenGL ES, so you should be able to use GLSL shaders with it. I'm sure three.js will have some documentation on making your own shaders. And it you watch the other video, I think it goes through using the different channels of the mask if you want to store all the masks in a single RGB texture. Although you can also use pure black and while images in OpenGL ES. Just make sure to set your image format type to THREE.LuminanceFormat and the mask image should only use one byte per pixel.

  • @Awtsmoos

    @Awtsmoos

    8 ай бұрын

    @@GalaxyPedlar interesting, thanks. Is there a way to use more than the 4 channels, like one hex value per color?

  • @GalaxyPedlar

    @GalaxyPedlar

    8 ай бұрын

    @@AwtsmoosYou could, but shaders aren't really built to handle indexed colors. And I don't know how you'd get that to work in Blender. I'd suggest just using single channel black and white images for the masks.

  • @UraniumDeba1
    @UraniumDeba17 күн бұрын

    How to export because when exporting the texture is not showing?...

  • @GalaxyPedlar

    @GalaxyPedlar

    7 күн бұрын

    You can't export it directly. You will need to recreate the shader in whatever game engine you're using and then add the different texture maps to that.

  • @Alchemyofcolor
    @Alchemyofcolor24 күн бұрын

    How to save it? I closed my blender and when I opened it again, everything disappeared!

  • @GalaxyPedlar

    @GalaxyPedlar

    24 күн бұрын

    If you mean saving the textures that you're painting, you need to either save it as an image before you close Blender. You could also try packing it which will cause it to be saved as part of the Blender file. Blender requires you to take special steps to save any textures that you create or paint, and I'd recommend reading up on that.

  • @Alchemyofcolor

    @Alchemyofcolor

    24 күн бұрын

    @@GalaxyPedlar Thank you very much! But it would be great to mention this in the video before I closed and lost everything 🥲 By the way, thank you so much for this tutorial, you are thee only one who really doing it easy and understandable!

  • @GalaxyPedlar

    @GalaxyPedlar

    24 күн бұрын

    @@Alchemyofcolor Unfortunately, KZread doesn't let you update a video once it's published. Sorry about this - but I'm glad you found the rest of the video helpful.

  • @savenxrth
    @savenxrth Жыл бұрын

    how would i export this with the textures as well?

  • @GalaxyPedlar

    @GalaxyPedlar

    Жыл бұрын

    Most importers won't be able to handle custom shaders like this. You'll probably need to copy the texture parameters by hand into your game's shader.

  • @savenxrth

    @savenxrth

    Жыл бұрын

    @@GalaxyPedlar im trying to import them into roblox, which is kinda limited, is there any way i could export the texture image or something?

  • @GalaxyPedlar

    @GalaxyPedlar

    Жыл бұрын

    @@savenxrth You could bake the whole thing to a single texture, but that texture would be enormous and probably too big for Roblox. I've not used Roblox before. Does it let you make your own shaders?

  • @savenxrth

    @savenxrth

    Жыл бұрын

    @@GalaxyPedlar unfortunately not, i found a way around it tho, i split the different materials into different models and then textured every model differently, gets the job done 👍

  • @GIOCONNO
    @GIOCONNO8 ай бұрын

    how do you apply normal maps in those shaders??? please i need it D:

  • @GalaxyPedlar

    @GalaxyPedlar

    8 ай бұрын

    It might be tricky to say in a you tube comment, but basically you st up a network for combining your normal color maps together similar to the way you st one up for the diffuse colors. Then you create a normal map node and send the normal map color data into it. Then you create a Vector Math node, set it to Normalize and run the output through that. Finally you send the output to the normal input of your BDSF shader. The setup in your game engine should be similar.

  • @GalaxyPedlar

    @GalaxyPedlar

    8 ай бұрын

    I don't know what you're referring to. Just feed the mixed normal map into the normal channel of your shader.

  • @GIOCONNO

    @GIOCONNO

    8 ай бұрын

    @@GalaxyPedlar thanks, at the end i manage it :D now the big problem is import my texurated terrain from blender to unity.....it's always white without textures :(

  • @GalaxyPedlar

    @GalaxyPedlar

    8 ай бұрын

    @@GIOCONNO Blender won't export complex shader networks. You'll need to create a similar shader in Unity and then then set it's parameters to the same values that they were in Blender.

  • @GIOCONNO

    @GIOCONNO

    8 ай бұрын

    Could you please make a video tutorial for that?

  • @dorex2007
    @dorex2007 Жыл бұрын

    I like the concept, but you're missing displacements, normal, AO, etc. etc. All the things that make the end result look good.

  • @GalaxyPedlar

    @GalaxyPedlar

    Жыл бұрын

    You're right. I skipped those things because I was using hand painted textures, but maybe I can make another video that shows how to use more complicated shaders. If you need extra features like normal maps, you can use most of what's shown in this video, but mix shader nodes together instead of texture nodes.

  • @H1tARun
    @H1tARun4 ай бұрын

    Does not work. It repeats changes in other areas that it repeats.

  • @GalaxyPedlar

    @GalaxyPedlar

    4 ай бұрын

    I think you may have set the UVs for your masks layer incorrectly. Make sure your mask layer is set up so that everything fits within the 0 - 1 UV square. You might want to go through the tutorial again.

Келесі