Search Unity

Procedural Mesh Generation Tutorial

Discussion in 'Community Learning & Teaching' started by JennyHide, May 20, 2017.

  1. JennyHide

    JennyHide

    Joined:
    Sep 30, 2014
    Posts:
    47
    Learn how to procedurally generate meshes in Unity 5.6 and above. We start with simple shapes and work our way up to complex, fractal landscapes. - I made a tutorial on Udemy on procedural mesh generation!

    It's in C#, and is aimed at people who already know how to code.

    Things you'll learn:
    • Generate complex meshes from code.
    • Program two and three dimensional shapes.
    • Program 2D terrain and 3D fractal landscapes.
    • Use your knowledge of meshes to calculate UVs, add vertex colours, and calculate normals and tangents.

    I'll be adding a new section on infinite terrain in the next few weeks.

    I would love some feedback on the course - please send me a message or leave one below if you have any. To that end, here are some free coupons:
    https://www.udemy.com/coding-in-unity-procedural-mesh-generation/?couponCode=UNITYBOARDSFREE

    And for anyone who'd like to buy it, I'd still appreciate any feedback you have! Here are some £10/$10 coupons:
    https://www.udemy.com/coding-in-unity-procedural-mesh-generation/?couponCode=UNITYBOARDS1

    I hope you find the tutorials useful.
    Jenny
     
  2. DominoM

    DominoM

    Joined:
    Nov 24, 2016
    Posts:
    460
    Hi Jenny,

    I've watched rather than worked through the tutorials. I liked the progression (though tangents are a necessary leap) and presentation.

    Audio wise I thought the music intro was a bit loud compared to your voice.

    I did wonder why you choose to use the index variable and
    Code (csharp):
    1. for (int i=0; i<numGeometricTriangles; i++)
    rather than
    Code (csharp):
    1. for (int i=0; i<numTriangles; i+=3)
    it seemed like an unnecessary complication to me.

    Apart from those minor notes, I think anyone following your course is going to get a good grounding on the techniques for generating game ready meshes.

    I hope you find my feedback useful :)
    Domino
     
    JennyHide likes this.
  3. JennyHide

    JennyHide

    Joined:
    Sep 30, 2014
    Posts:
    47
    Thank you Domino, that's really useful feedback. Do you think the audio is worth me changing now, or further into the future when I update the course?
     
  4. DominoM

    DominoM

    Joined:
    Nov 24, 2016
    Posts:
    460
    Maybe get a second opinion on that. I do a bit of audio mixing so I might be over sensitive to it. I did reach to turn down the volume on the first intro, but it settled into your voice at more like my normal listening level before I got there. I knew what to expect with the others so it was an incovenience more than anything. In a cubicle or headphones it'd probably have bothered me more.
     
  5. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    Looks awesome, will give this a run through when I find some time =)
     
    JennyHide likes this.
  6. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,998
    Not much difference, but in practice I've found the first way easier to use - always thinking of each triangle as 1 triangle, and only add the times 3 at the moment it's needed. I've taken to using "addTri(v1, v2, v3, ref triIndex);" to pull out all those messy +1's +2's and +=3's.
     
  7. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    Hi Jenny,

    How much math is required to understand this course?
     
  8. JennyHide

    JennyHide

    Joined:
    Sep 30, 2014
    Posts:
    47
    Hello,

    There is quite a lot of maths needed, but I try to explain everything as I go. If you're interested, you can get the course, have a look, then refund it if there's too much - Udemy lets you refund the course within 30 days of buying it. You can also ask me questions alongside each video if something doesn't make sense - I'm always happy to help!

    Jenny
     
  9. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    Thanks. I bought it and will give it a try.