Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Procedural Content Generation for Unity Game Development

You're reading from   Procedural Content Generation for Unity Game Development Harness the power of procedural content generation to design unique games with Unity

Arrow left icon
Product type Paperback
Published in Jan 2016
Publisher
ISBN-13 9781785287473
Length 260 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ryan Watkins Ryan Watkins
Author Profile Icon Ryan Watkins
Ryan Watkins
Arrow right icon
View More author details
Toc

Multi mesh planet


Now that we are able to generate a sphere and understand some of the pitfalls of 3D rendering, we are ready to generate our planet. Normally, the approach for generating a planet would be to generate a sphere and then generate a random texture called a height map. This is well covered and documented in free online resources. This would require quite a bit of work and extra plugins so it will be left to you to research on your own. We will take another approach that can be scripted easily.

We will generate multiple spheres and perform some manipulations on their geometry to give them each a unique character. We are also going to use a different type of sphere for this task. This sphere will be generated from a polygon called an Icosahedron. The algorithm for this primitive can be found at the Unity Wiki page, http://wiki.unity3d.com/index.php/ProceduralPrimitives.

Icosahedron sphere on the left and polar sphere on the right

The icosahedron sphere is seamlessly created, meaning...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime