background preloader


Facebook Twitter

Star, a Unity C# Tutorial. Introduction This is an old tutorial about editor scripting, for those who still use Unity 3.

Star, a Unity C# Tutorial

If you're using Unity 4, do the other editor tutorials instead. In this tutorial you will create a simple star component and write your own custom editor for it. You will learn to dynamically generate a mesh use a nested class create a custom editor use SerializedObject support WYSIWYG editing react to undo, redo, reset, and prefab modifications support multi-object editing support editing in the scene view You're assumed to know your way around Unity's editor and know the basics of Unity C# scripting.

Creating the star We start by creating a new empty project and adding a new C# script named Star. For this mesh to be of any use, it must be assigned to a MeshFilter component, which in turn is used by a MeshRenderer component. Of course we can manually add these components, but it's a better idea to do this automatically. Using UnityEngine; public class Star : MonoBehaviour { private Mesh mesh; } MetaBalls. Metaballs using various materials Realtime 3D Metaballs using C#, Feel free to attempt to write it in Javascript, To see some webplayer samples go to [[1]] To use the code, simply make an empty object, then attach a Mesh Filter and Renderer and the script, and bring the camera up close because it will be one unit in height,width, and depth.


The code is commented and to modify the metaball movement just change Update() and Start() to modify the amount of blobs, their positions and intensities. I'm happy that the Metaballs seemed to work well, although assigning a new mesh every frame began to consume memory at a quick pace and stopped doing so after about 500MB (noticeable in the first demos, I will post updated versions later). The code uses a Marching Cubes algorithm, and does a few things, such as trying to process only the cubes around the mesh surface, and processing the normals from the unitization of the addition of all the power derivatives of the blob.

Mixed Dimensions. Procedural generated mesh in Unity part 2 with UV mapping « Morten Nobel's Blog. Continued from ‘Procedural generated mesh in Unity‘, I’ll here show how to enhance the procedural generated meshes with UV mapping.

Procedural generated mesh in Unity part 2 with UV mapping « Morten Nobel's Blog

UV Coordinates explained UV mapping refers to the way each 3D surface is mapped to a 2D texture. Each vertex contain a set of UV coordinates, where (0.0, 0.0) refers to the lower left corner of the texture and (1.0, 1.0) refers to the upper right corner of the texture. If the UV coordinates is outside the 0.0 to 1.0 range, the coordinates are either clamped or the texture is repeated (dependent of the texture import setting in Unity). The same way that each vertex is associated with a normal, each vertex is also associated with UV coordinates. Marching Tetrahedrons. Home > marching tetrahedrons The videos below are .webm format, I use VLC to view them.

Marching Tetrahedrons

I've been experimenting with blends of various density functions in order to obtain different kinds of landscapes. One personal favorite is the "subterranean caves with a flat floor". I've also abandoned the real-time lighting approach in favor of precalculated ambient occlusion and shadows from an overhead "sun" light source. Preproduction Blueprint: How to plan your game environments and level designs workshop download. I got fed up.

Preproduction Blueprint: How to plan your game environments and level designs workshop download.

I reached a point where I walked away from level design and game environments. I just told myself that I would pursue other things, that level designing and game environment art wasn't for me. I went to college to study filmmaking, drawing, painting, architecture, programming, web design, photography, business and management. I ended up getting a B.F.A in Computer Animation. The thing was, my love for level design and game environments never left. During my junior year in college for computer animation, everything began to click.

If this is what I had to do for a 2 minute short, I realized I needed to do the same for my level designs and game environments. After a semester of prepro and before I had to return to work on my senior thesis I took a trip to Switzerland for 19 days. Idea from the trip that became a playable map through proper planning. Procedural Graphics, Generated meshes in unity3d. Cloud System » Edelweiss Interactive. [Free] Cardio Shader (Healthbar??)