MESH GENERATION in Unity - Basics

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ก.ย. 2024
  • Generate your own objects through code!
    Go try out the SpatialOS GDK: bit.ly/2DW53yK
    ● Join Discord: / discord
    Mesh in the thumbnail is from this amazing source: bit.ly/2Rckx3i
    ❤️ Donate: www.paypal.com...
    ····················································································
    ♥ Subscribe: bit.ly/1kMekJV
    ● Website: brackeys.com/
    ● Twitter: / brackeystweet
    ● Discord: / discord
    ········································­­·······································­·­····
    ► All content by Brackeys is 100% free. We believe that education should be available for everyone.
    ❤️ Donate: www.paypal.com...
    ········································­­·······································­·­····
    ♪ "ES_Dress Code_Black - oomiee" by Epidemic Sound

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

  • @CouchFerretmakesGames
    @CouchFerretmakesGames 6 ปีที่แล้ว +623

    MORE more Advanced tutorial, please! I liked it a lot!

    • @satouajin1429
      @satouajin1429 6 ปีที่แล้ว +10

      I agree.
      I have created meshes in Blender, however seeing how to create meshes in script is extremely helpful. I look forward to more advanced topics in the future.

    • @AhmedKhalfYolo
      @AhmedKhalfYolo 6 ปีที่แล้ว +2

      CouchFerret makes Games agreed

    • @CouchFerretmakesGames
      @CouchFerretmakesGames 6 ปีที่แล้ว +5

      @@satouajin1429 The fun fact is that this is how most of the 3D softwares do it as well. :)

    • @Victor-oo4ux
      @Victor-oo4ux 5 ปีที่แล้ว +1

      I just want to agree. We want more of this content :D

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

      You are awesome

  • @stellarstudio5495
    @stellarstudio5495 6 ปีที่แล้ว +205

    Maybe a video altering the points of a mesh near an explosion to simulate holes being burst in the ground. Something to the effect of Battlefield style explosions on terrain. That would be pretty neat to see.

    • @thatanimeweirdo
      @thatanimeweirdo 6 ปีที่แล้ว +27

      or something like snow deformation!

    • @dynamichunter843
      @dynamichunter843 6 ปีที่แล้ว

      YES

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

      In UE4 its called render texture target.
      Basicaly you paint with a black and white brush over the terrain height inside its materal instance.
      Thats the theory, I dont know how to implement that in Unity

    • @bobo1793
      @bobo1793 6 ปีที่แล้ว

      ​@@CyberWolf755 you can determine vertex height based on an image, in this case black and white. This technique is mostly used for generating maps for terrain height. Then you need a system to subtract (i.e. heightmap - footprint)a pattern and then recalculate the terrain or object. The objects should be small enough, so that recalculation is not too much of a performance hog.
      That is for directly modifying the mesh, since that can help with realistic effects in the changes you make. Unity also has the same terrain height option for shaders, but I have not really played with it. I think you would have to modify the heightmap in an image editor, but there are some texturing/modelling tools built in the latest Unity versions that I did not play with yet.

    • @ComteJaner
      @ComteJaner 6 ปีที่แล้ว +2

      For big explosion you can interate over the mesh and pertrub all vertices away from the explosion based on the distance to the explosion. For small explosions or something like snow deformation it would be better to use a shader and a deformation texture which is a bit more involved.

  • @rakibjahan
    @rakibjahan 6 ปีที่แล้ว

    1. Procedural Terrain Generation
    2. How to manage lengthy codes and break them in scripts in an organized way
    3. Design Principles
    4. Dependency Injection
    5. Optimized Code
    These are some topics needed for production level development. Will be really glad to see videos about them in the future. Thanks! :)

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

    1.Add a empty object
    2.Add mesh renderer and filter to it
    3. Add this script-
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    [RequireComponent(typeof(MeshFilter))]
    public class MeshGenerator : MonoBehaviour
    {

    Mesh mesh;
    Vector3[] vertices;
    int[] triangles;
    // Start is called before the first frame update
    void Start()
    {
    mesh = new Mesh();
    GetComponent().mesh = mesh;
    CreateShape();
    UpdateMesh();
    }
    void CreateShape()
    {
    vertices = new Vector3[]
    {
    new Vector3(0,0,0),
    new Vector3(0,0,100),
    new Vector3(100,0,0)
    };
    triangles = new int[]
    {
    0,1,2
    };
    }
    // Update is called once per frame
    void UpdateMesh()
    {
    mesh.Clear();
    mesh.vertices = vertices;
    mesh.triangles = triangles;
    }
    }
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    [RequireComponent(typeof(MeshFilter))]
    public class MeshGenerator : MonoBehaviour
    {

    Mesh mesh;
    Vector3[] vertices;
    int[] triangles;
    // Start is called before the first frame update
    void Start()
    {
    mesh = new Mesh();
    GetComponent().mesh = mesh;
    CreateShape();
    UpdateMesh();
    }
    void CreateShape()
    {
    vertices = new Vector3[]
    {
    new Vector3(0,0,0),
    new Vector3(0,0,100),
    new Vector3(100,0,0)
    };
    triangles = new int[]
    {
    0,1,2
    };
    }
    // Update is called once per frame
    void UpdateMesh()
    {
    mesh.Clear();
    mesh.vertices = vertices;
    mesh.triangles = triangles;
    }
    }

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

      @Random Person There might be error with your packages or something else coz i have tried this myself

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

      Hi thankyou myself i really needed it now

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

      Still Useful to me !!!

  • @what_the_feek5568
    @what_the_feek5568 6 ปีที่แล้ว +10

    This is what we are looking for brackey.... WE NEED MORE ADVANCED TUTORIALS..... YOU SIR, MAKE US GREAT AGAIN !!!

  • @GautamSingh-yn9cb
    @GautamSingh-yn9cb 5 ปีที่แล้ว

    @3:43 its not a compulsion to feed the points in clockwise direction, it depends on where you z axis pointing. If its pointing towards us then anitclock pattern will work just fine. If Z axis is away from us then clockwise will work just fine

  • @benjoe1993
    @benjoe1993 6 ปีที่แล้ว

    If someone wants a more hands-on, real life example video on mesh generation after watching this video, look up these on YT:
    "Unite 2015 - A coder's guide to spline-based procedural geometry
    "
    "Unite 2016 - The Power of Procedural Meshes"
    Great talks and they go hand-in-hand with this video!

  • @coderdbd
    @coderdbd 5 ปีที่แล้ว

    Great tutorial! Thanks for that and thanks to the Unity team for making it that easy.

  • @StepanKorney
    @StepanKorney 6 ปีที่แล้ว

    Wow! New videos every day!

  • @tvguideondemand
    @tvguideondemand 5 ปีที่แล้ว

    This is exactly what I was looking for! More videos like this please.

  • @PiyushSharma-od2el
    @PiyushSharma-od2el 3 ปีที่แล้ว

    This is Better Than my Math class

  • @KreVagyok
    @KreVagyok 6 ปีที่แล้ว

    Its a great topic, but in my opinion need more details. It would be awesome to step to the next level, like the "How to make a LEVEL EDITOR" video. Making low and high terrain based on some greyscale image!

  • @alias_c7ever
    @alias_c7ever 5 ปีที่แล้ว

    Thanks for the great video! Please continue with advanced tutorials.

  • @utkugokalp3179
    @utkugokalp3179 6 ปีที่แล้ว

    That was a great start for mesh generation, but I hope you take this a bit further.

  • @MichaelBryne
    @MichaelBryne 5 ปีที่แล้ว

    Love this, keep up these more advanced tutorials please

  • @Lost1nTranslation
    @Lost1nTranslation 6 ปีที่แล้ว

    Advanced tutorials are awesome!

  • @CaptainMangles
    @CaptainMangles 5 ปีที่แล้ว

    Please keep making tutorial videos, I really enjoy them (:

  • @skaruts
    @skaruts 6 ปีที่แล้ว

    Would love more about this. I'd love to create my own map editor for a retro first person game, and I'd need to manipulate geometry in spades. Probably the normals too, so I could control the hard edges. I've no clue what tangents are for..

  • @PabitraPadhy
    @PabitraPadhy 5 ปีที่แล้ว

    This is awesome Brackeys :)
    I would really love to check more advanced videos, not just on Mesh generation, but others as well, if you have any.

  • @swapnilpatil909
    @swapnilpatil909 5 ปีที่แล้ว

    Please do make more videos on mesh generation

  • @thecatbellayuki
    @thecatbellayuki 6 ปีที่แล้ว

    A bit more in depth video would be nice 👍🏻. A full implementation of the technique would help a lot. Great videos BTW as always.

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

    it's so hard to visualize ty for making it easy

  • @jrgalli00
    @jrgalli00 6 ปีที่แล้ว

    Hey just wondering, what is your computer, like what is your build. I would like to get into game design/development however I'm currently using a terrible laptop and I need an upgrade

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

    Hi can u show something about fog of war? How to create it in unity?

  • @AbuBakar-th5oo
    @AbuBakar-th5oo 5 ปีที่แล้ว

    Simply thankyou #Brackeys

  • @Omar31July
    @Omar31July 6 ปีที่แล้ว

    more advanced tutorial pleaseee

  • @Super100JKO
    @Super100JKO 6 ปีที่แล้ว

    Love your tutorials! Could you do a how to for generating mountains and caves? :o

  • @nicolasg3305
    @nicolasg3305 6 ปีที่แล้ว

    hey, how can we make our own normals, because if i make a bif mesh and recalculate normal of all the mesh each time i make a mod on it it could be heavy

  • @SlayPlenty
    @SlayPlenty 5 ปีที่แล้ว

    So I saw other youtubers do bois and animated mesh etc this made me think of that can you do that you spawn a large face of lots of tiangles that go up and down like a wave?

  • @DBZ483
    @DBZ483 6 ปีที่แล้ว

    is this on the normal 3D template?

  • @paulrobinson5490
    @paulrobinson5490 6 ปีที่แล้ว

    Nice tutorial as always. Can you do a tutorial on installing steam SDK in unity and configuring for a single player offline game, there seems to be nothing out there on this, Please help. Thank you for all you efforts, love your tutorials

  • @CodeTalkerLooter
    @CodeTalkerLooter 6 ปีที่แล้ว

    Brackeys, do you know how to create the tile-walking system that we see in Fire Emblem or Final Fantasy Tactics?

  • @therawmeatball6883
    @therawmeatball6883 6 ปีที่แล้ว +120

    I'd certainly appreciate more tutorials like this one. Great video

  • @benjoe1993
    @benjoe1993 6 ปีที่แล้ว +276

    This is the best BEGINNER mesh generation tutorial I've seen on TH-cam.
    It's clear, purposeful and lets the viewer decide how they want to make their meshes in the future, instead of forcing an algorithm down their throat.
    Every other tutorial I've seen starts with a 10x10 quad mesh generation which has all these incomprehensible for loops in for loops in for loops with weird calculations it and you have to spend way too much time untangling all the coordinational and triangular data that they hid in those methods.
    Great video! Thank you Brackeys team!

    • @anthonyjackson9194
      @anthonyjackson9194 4 ปีที่แล้ว +9

      Just watched it and thought the same.... I can write my own endlessly confusing for loops. Nail the basics, then let me over think my OWN process. This is a great channel.

  • @thunderkilll1037
    @thunderkilll1037 6 ปีที่แล้ว +86

    can you do more about this mesh renderer please brakeys

    • @dyasio655
      @dyasio655 6 ปีที่แล้ว +2

      support him on patreon.

    • @thunderkilll1037
      @thunderkilll1037 6 ปีที่แล้ว

      If i can pay money online yeah why not but if you don't know this let me tell you : there are country that don't have any mean to buy things on the net or pay for anything

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

      So brakeys is the only guy that helps me through my studies so thank you very much man from my heart

    • @satouajin1429
      @satouajin1429 6 ปีที่แล้ว +3

      ​@@thunderkilll1037 I would have assumed (possibly incorrectly) that those who live in a country where they both can watch Brackey's videos and have the capability to launch Unity would also have a means to pay online.
      If I misunderstood and you are simply referring to being unable to afford paying, then i agree. (Though this is down to individual circumstance more so than just country)
      (no offense intended, and off-topic. But i'm not trying to say 'if you can pay brackeys, then do' in the slightest. more so being inquisitive about your statement)

    • @thunderkilll1037
      @thunderkilll1037 6 ปีที่แล้ว

      Life is hard man we have internet for sure my university has some conventions eith unity so that we can use it for studies and like i said no one in Tunisia can buy from the internet untill this day

  • @MKStrandholm
    @MKStrandholm 2 ปีที่แล้ว +24

    If anyone is having troubles with being unable to see the triangle, it's because a MeshRenderer component doesn't get added to the GameObject automatically (atleast in 2019.4+) . if you manually add a MeshRenderer component to the Mesh Generator GameObject, then you'll be able to see it at runtime

    • @shortreviews6004
      @shortreviews6004 2 ปีที่แล้ว

      I'm a little bit confused, I'm having this issue, the triangle isn't showing up but I already added the mesh Renderer like he said at the start?

    • @heckerhecker8246
      @heckerhecker8246 2 ปีที่แล้ว

      @@shortreviews6004 did you add
      GetComponent().mesh = mesh;

    • @shortreviews6004
      @shortreviews6004 2 ปีที่แล้ว

      @@heckerhecker8246 ah I don't think I did, but I worked it out another way since then. thankks anyway

    • @heckerhecker8246
      @heckerhecker8246 2 ปีที่แล้ว

      @@shortreviews6004 lol

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

      @@shortreviews6004 ay do you remember how you fixed this issue i have it as well but i have the mesh renderer and im getting the mesh filter component

  • @XenuxDev
    @XenuxDev 6 ปีที่แล้ว +44

    It would be awesome to see more videos of mesh generation like this with procedural mesh animation, mesh cutting or something!
    Keep up the good work and thank you for your videos!

  • @Noriyak1
    @Noriyak1 6 ปีที่แล้ว +111

    Pls make a video about using this technique to generate stones, terrain or other structures. That would be awesome :D

    • @jirue
      @jirue 6 ปีที่แล้ว +3

      A decent tutorial I would recommend for this is Sebestian Lague's videos on Procedural Landmass and Procedural Planet generating. It may take a bit to get used to the math involved though, just to warn you.
      th-cam.com/video/wbpMiKiSKm8/w-d-xo.html
      th-cam.com/video/QN39W020LqU/w-d-xo.html

    • @isaacng3020
      @isaacng3020 5 ปีที่แล้ว +4

      @@jirue Hey man, thanks for the links, I didn't know about Sebestian Lague's and he's fantastic

  • @Tim_Voronkin
    @Tim_Voronkin 4 ปีที่แล้ว +5

    How to add collider to this?

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

    for anyone looking for the finished code:
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    [RequireComponent(typeof(MeshFilter))]
    public class MeshGenerator : MonoBehaviour
    {
    Mesh mesh;
    Vector3[] vertices;
    int[] triangles;
    // Start is called before the first frame update
    void Start()
    {
    mesh = new Mesh();
    GetComponent().mesh = mesh;

    CreateShape();
    UpdateMesh();
    }
    void CreateShape()
    {
    vertices = new Vector3[]
    {
    new Vector3 (0,0,0),
    new Vector3 (0,0,1),
    new Vector3 (1,0,0)
    };
    triangles = new int[]
    {
    0,1,2
    };
    }
    void UpdateMesh()
    {
    mesh.Clear();
    mesh.vertices = vertices;
    mesh.triangles = triangles;
    mesh.RecalculateNormals();
    }
    }
    //hope it helps!

  • @Dasky14
    @Dasky14 6 ปีที่แล้ว +92

    A good video, but a bit too simple... I really hope you're going to explore this topic a bit further. For example, show how to automatically deal with putting triangles the correct way around for backface culling.

    • @MrJuancho2706
      @MrJuancho2706 6 ปีที่แล้ว

      Yes please!

    • @dyasio655
      @dyasio655 6 ปีที่แล้ว +7

      you can check Sebastian league channel. but not beginner friendly like brackeys.

    • @jellejacobs7480
      @jellejacobs7480 6 ปีที่แล้ว

      is this simple??!?!?!

    • @MrKraignos
      @MrKraignos 5 ปีที่แล้ว +4

      I find it's very simply put and very well explained for a 10 minutes video. That makes it painless to watch and enjoyable to follow. Took me a lot of reading back in the days before I get to this point. Awesome video, lot of value like all Brackeys videos. Of course you want to explore the topic more in-depth, but nice introduction

    • @OlivierPons
      @OlivierPons 5 ปีที่แล้ว

      Yep backface culling is not often a problem, but when it *is* a problem, it's hard to solve.

  • @akronred648
    @akronred648 4 ปีที่แล้ว +13

    0:23 Worlds Adrift, may you rest in peace.

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

    Note for anyone doing this in Unity 2021+ URP... I had to give the GameObject the diffuse material before it even showed anything because otherwise it was just invisible.

  • @0Bennyman
    @0Bennyman 6 ปีที่แล้ว +15

    Great Tutorial! Would love to see this expanded further, going into something like Water or Terrain would be great to see!

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

    I copied exactly, and don't see anything

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

    This tutorial is basically the same as that on catlikecoding.com, just more basic. I don't know how to feel about it...
    Check out this link for more in-depth info: catlikecoding.com/unity/tutorials/procedural-grid/

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

    Please make new course to create online multiplayer FPS ( like call of duty or overwatch ). The last one was from more than 4 years ago and the networking in it is old and unity will remove it (And I have no idea about how to make my games online)

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

    why does the mesh is visible only when you hit play? I want it to be visible all the time, and at scene too

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

    if i make this code now it gives me errors :(

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

    Wouu , i had a course of game dev, where lecturer didn`t normally explained about meshes generation and i felt stupid when the practises started , but after your lessons i have a strong understanding what i am writing in my code. Thanks a lot))

  • @frankverheyen344
    @frankverheyen344 5 ปีที่แล้ว +4

    6:29 no need to remove the comma, it's a feature of C# to have trailing commas in initializer lists, which make editing easier (=no need to remember to remove the comma, and no need to add it again when you extend the initialized list)

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

    In case useful to anyone, here is the final code you can copy/paste:
    /*
    Generate a mesh from code.
    Code from Brackeys:
    th-cam.com/video/eJEpeUH1EMg/w-d-xo.html
    Be sure to watch the above video to learn how to attach
    this script to a Mesh Generator gameobject that contains
    a Mesh Filter and a Mesh Renderer.
    */
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    [RequireComponent(typeof(MeshFilter))]
    public class MeshGenerator : MonoBehaviour
    {
    Mesh mesh;
    Vector3[] vertices;
    int[] triangles;

    // Start is called before the first frame update
    void Start()
    {
    mesh = new Mesh();
    GetComponent().mesh = mesh;
    CreateShape();
    UpdateMesh();
    }
    void CreateShape()
    {
    vertices = new Vector3[]
    {
    new Vector3 (0,0,0),
    new Vector3 (0,0,1),
    new Vector3 (1,0,0),
    new Vector3 (1,0,1)
    };
    triangles = new int[]
    {
    0, 1, 2,
    1, 3, 2
    };
    }
    void UpdateMesh()
    {
    mesh.Clear();
    mesh.vertices = vertices;
    mesh.triangles = triangles;
    mesh.RecalculateNormals();
    }
    }

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

    Very nice video! Is it possible to connect the vertices without using lineRenderer?

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

    Is it just me... or is everything red and purple at the start of the video?

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

    RIP brackeys :,( just watched a video explaining same thing and remembered you

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

      AKA Dani be sad when Brackeys didn't make anymore unity particle tutorials

  • @TheEvilSketch
    @TheEvilSketch 6 ปีที่แล้ว

    TERRAIN! Noises, fractals, voronoi, mixed, multiplied, sloped, edged .. EROOOSION!

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

    Not too far from vector graphics. That's good for me!

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

    C/C++ programmer to draw a first triangle be like: this is so much productive.

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

    You sneaky bugger, look at his like videos playlist! He likes his own videos! *GRABS PITCHFORK AND TORCH*

    • @Kasmuller
      @Kasmuller 5 ปีที่แล้ว

      He does it so nobody can say "first"

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

    this entire syntax looks like java even tho i havent programmed in java yet

    • @kas-lw7xz
      @kas-lw7xz 3 ปีที่แล้ว

      C# is a lot better

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

    textures dont map well to those triangles

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

    are these processes all same for URP also ??

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

    Thanks for the awesome tutorial! I was in need of a 2d circle segment in 3d space and with this I was able to make it! I can adjust the amount of extra verticies for a rounder and smoother edge, the angle all the way to 360, the radious of the circle segment and finally the color of the mesh. It took a little while especially since I spent a lot of time figuring out why my calculations were completely whack (Unity uses radians and not degrees duuuuuuuuuh!).

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

    so i keep getting a unity compile error :
    ArgumentException: An item with the same key has already been added. Key: UnityEditor.U2D.Layout.ScrollableToolbar_isHorizontal_Type
    System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at :0)
    Any help with this?

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

    7:46 It wont work I quintuple checked the code and program, it says could not load script please fix compile errors and assign a valid script.

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

      I have the same problem

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

      @@zok_6619 Oh, Try renaming the script so that it is one word, that worked for me.

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

      Thanks, but I already found the problem

  • @QuailCraft
    @QuailCraft 4 หลายเดือนก่อน

    Just a quick tid bit of information, he is using unity built in render pipeline, If your using unity 6 and Universal render pipeline, I had to create a legacy material under Create > Rendering > Material, set it to legacy/Diffuse, then edit > rendering > Materials > Convert selected materials to URP. Alternatively, Create a new material to be used in the project, for shader, use Universal Render Pipeline/Simple Lit.

  • @arckantox4102
    @arckantox4102 6 ปีที่แล้ว +10

    You might want to specify that there is an issue with the normals when you have several faces sharing the same vertices
    since the normals direction are relative to the points rather than faces.
    This makes it so you need to duplicate each point for every face that shares it.
    That is why the basic cube in Unity have 24 vertices instead of the 8 you could believe at first sight.
    But this could be brought up in a more in depth tutorial. (That I hope you will do)

    • @danbobjim123
      @danbobjim123 6 ปีที่แล้ว

      Thank you, very interesting!

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

    More advanced mesh generation please!

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

    this is cool . can we create a 2d object like image/rawimage like 3d mesh u hv created?

  • @iGame3D
    @iGame3D 5 ปีที่แล้ว

    Convert tilemap details to mesh objects, ie, simple mode if tilemap square 1,1 is filled, then create quad at that position in 3D space with a given size, apply texture from that tilemap space, or a system where if I have tile sprite called 10x20x10 it reads that as produce a mesh cube 10 wide 20 high and 10 long. or it could be B-2T20 which might create a based quad at Y-2 with a ceiling quad at Y20 and only make walls if no other tile position near bye is occupied. that way the tilemap asset can be used like a 2D level design tool that renders to 3D. Maybe Remake the old Tomb Raider level editor: tombraiders.net/stella/trle.html Or the Marathon Level Editor: th-cam.com/video/E8yqfvNc0HM/w-d-xo.html Or use Spatial OS to make massively multiplayer TRON Ring Game th-cam.com/video/MOllAzeZpuU/w-d-xo.html You'll think of something.

  • @ganaraminukshuk0
    @ganaraminukshuk0 5 ปีที่แล้ว

    Now I'm curious: what about a bigger mesh, say with vertex count (m+1)^2, where m is the size of the mesh (in Unity units) or even 2^n (where n is any number)?

  • @giorgiphareshishvili
    @giorgiphareshishvili 6 ปีที่แล้ว +2

    Hey Brackeys i think it would be great idea to make a video about how to make endless road in Unity like if you like the idea

  • @metincetin9614
    @metincetin9614 6 ปีที่แล้ว +3

    Thanks for the video! Generating more complex meshes is something that needs to be checked, and is both fun and cool 🙂

  • @gamearxgames2754
    @gamearxgames2754 5 ปีที่แล้ว

    Making a quad doesn't look very advanced. Would be much more appreciated if you could really show how to build more complex meshes, but since it's BASICS - then I guess it's enough to get an understanding of how it works.

  • @dimarichmain
    @dimarichmain 6 ปีที่แล้ว

    Hey, I'm not saying that I'm a pro, but you forgot to write Mesh.Update() in the end of CreateShape() method!
    But your video is still nice! Go ahead and make more videos about oricedural generation of meshes and textures!

  • @jam54
    @jam54 5 ปีที่แล้ว

    You should make a video about save and load data. Not with playerpref with but dontdestroyonload as example. unity3d.com/learn/tutorials/topics/scripting/persistence-saving-and-loading-data

  • @bcukdannage
    @bcukdannage 5 ปีที่แล้ว

    Oh no... I've reached the age... The special age... Everyone is complaining the video is too simple, and I spent most of it dribbling in the corner of the room trying to wrap my tiny dead brain around it... Co-ordinates system is fair enough but all the code components... bzzt...fzzt...pop... pssh.

  • @RainbowsaurusGames
    @RainbowsaurusGames 6 ปีที่แล้ว

    Hello Brackeys, I just wondered if you could please some day show how to do animated lighting and shadows via voxels in 2d? I just read about it in a twitter post about pathway the game by robotality and it looks very cool, but I can't figure out how to do this. Could you please make a video, if you got the time, and explain this to some dumb unity user if it doesn't is too much work? :D

  • @kattensaklart9323
    @kattensaklart9323 6 ปีที่แล้ว

    Please do a video on volumetric lighting! And one on Visual Effect Graph! Unity demo: th-cam.com/video/rqMcPZoEc3U/w-d-xo.html

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

    Everybody is first, lol

  • @simplygamedeveloper7859
    @simplygamedeveloper7859 2 ปีที่แล้ว

    There's an error "the type of namespace name 'Requirecomponent' could not be found(are you missing a using directive or an assembly reference?)"

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

    When I put a material to the mesh, it turns black.

  • @Hedghog6666
    @Hedghog6666 5 ปีที่แล้ว

    A tiny bit slower would be good - you add things at the speed you talk - which makes following a game of pause, rewind, listen, pause, rewind, listen...

  • @sepalmq1229
    @sepalmq1229 5 ปีที่แล้ว +4

    0:25 RIP worlds adrift

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

    How does triangle actually work though?
    Does it base int[] {0,1,2} on the order of the vertices array?

  • @nazarov0
    @nazarov0 6 ปีที่แล้ว

    Is it posible to subdivided a mesh in c# without using a shader or blender? Cuz i think that generating more faces for a mesh could make shader graph much more effective to add tessellation since this feature isnt available in it...

  • @Wenca110
    @Wenca110 6 ปีที่แล้ว

    i see a lot of comments about this but i will add. can you please do another tutorial on this but create something more useful than triangle :D lets just say.. a random generated map and if possible with height responsive material or so?
    or how to generate random objects.. like rocks or trees?

  • @aliadel7360
    @aliadel7360 5 ปีที่แล้ว

    I have a problem.. i made a game in unity and transformed it to android..but when i play it.there is no sound...please answer
    Thanks in advance:)

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

    My player starts at a point, draws a line where it goes, when it comes back to its place, we get a shape. How can we convert that shape into a mesh. The player continues to move.

  • @jellejacobs7480
    @jellejacobs7480 6 ปีที่แล้ว

    I didn't get any of the coding and for what this can be used, probably because my English is pretty bad when it comes to tutorials like this one xD

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

    please make better playlist, i know you make other tutorials over this, but is trully hard to find the right order LOL

  • @cptshini
    @cptshini 5 ปีที่แล้ว

    Please make a tutorial on the visual effect graph, and how to set it up!
    plz brackeys i

  • @manuelgordillo6839
    @manuelgordillo6839 5 ปีที่แล้ว

    I feel like this is basic important knowledge but I fail too understand the use of it, anyone care to elaborate? maybe with a more detailed example?

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

    Are you able to make a short series on making a building system similar to rust or unturned? I've found other tutorials on it but they aren't great quality.

  • @lanceangelosagario211
    @lanceangelosagario211 5 ปีที่แล้ว

    I wish meshing or (reshaping) objects are just swinging your mouse to remodel it...got me? So hard codes

  • @BadComoc
    @BadComoc 5 ปีที่แล้ว

    The "mesh.triangles" are actually known as indices. I don't understand why Unity named it this way.

  • @ahsanullah6326
    @ahsanullah6326 6 ปีที่แล้ว

    This is pretty basic stuff if you know opengl , dxd3d or any other graphics API

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

    hi i just finished the mesh generator and it isent working what should i do. i know that this video is 4 years old should i watch newer videos??

  • @megatrix500
    @megatrix500 5 ปีที่แล้ว

    I don't wanna be a rude guy and it's actually a good example but minecraft world is a voxel map, not a mesh

  • @kobineff
    @kobineff 5 ปีที่แล้ว

    i have a question so i did what you did but my text is appearing green not orange like how some of yours does and its also not generating a triangle i am not sure what i did wrong can someone help me.