More from Sketchbook

scan from skectbook and clean up in photoshop

scan from skectbook and clean up in photoshop

Drawing vehicle is more like drawing a geometric shape. I believe car design students need to learn and understand basic shapes before they start learning to design cars. Vehicles are designed and built to contain human, so basically it’s designing cool moving containers for us. When I first started drawing cars I just draw simple boxes with wheels and try to play with different sizes and angles. Here are some quick sketches that I drew during my boring time at work
.
Most of the times when i need to build Colliders for our game level, i prefer to do it inside 3dsmax (or Maya), because at this time in Unity Editor (Unity 2.1.0 & Unity Iphone 1.0.1) we can only move / rotate stuff around using Local Coordinate System (which i found is pretty hard sometimes, I believe this will be addressed in the future version though
).
A quick solution would be using Debug Mode in the Inspector View and manually “right click and drag the numbers“, but i still find it easier to build all the colliders using primitive objects in 3dsmax.
Because i can switch between World / View / Screen / Local Coordinate system, and also using Grid / 3D / Angle Snap, and even rotate around specific point etc,
basically it saves me a lot of time to do it inside 3dsmax.
For this mini tutorial, i build a simple level that looks like this:
also here is the bounding box mesh for this level:
And the last part, here is a simple script to convert all those primitive geometry / Bounding Box into Unity Colliders.
BuildColliders.js
@MenuItem ("Custom/Build Colliders")
static function BuildColliders()
{
var activeGOList : GameObject[] = Selection.gameObjects;
if (activeGOList.length == 0)
{
EditorUtility.DisplayDialog("Build Collider","No Object Selected", "Yes Sir");
return;
}
// Add Collider to every selected Game Object
for (var activeGO : GameObject in activeGOList)
{
var hasCollider : Collider = activeGO.GetComponent(Collider);
if (!hasCollider) // Skip if mesh already has collider
{
// Only add Collider on mesh that has MeshRenderer Component
var myMeshRenderer : MeshRenderer = activeGO.GetComponent(MeshRenderer);
if (myMeshRenderer)
{
// Add Collider based on the first letter of the Game Object
if ((activeGO.name[0] == "S") || (activeGO.name[0] == "s"))
activeGO.AddComponent(SphereCollider);
else if ((activeGO.name[0] == "M") || (activeGO.name[0] == "m"))
activeGO.AddComponent(MeshCollider);
else if ((activeGO.name[0] == "C") || (activeGO.name[0] == "c"))
activeGO.AddComponent(CapsuleCollider);
else
activeGO.AddComponent(BoxCollider);
var newName = activeGO.name.Substring(1, activeGO.name.length-1);
if ((newName) && (newName != ""))
activeGO.name = "Collider_" + newName;
DestroyImmediate(myMeshRenderer);
var myMeshFilter : MeshFilter = activeGO.GetComponent(MeshFilter);
if (myMeshFilter)
{
DestroyImmediate(myMeshFilter);
}
}
}
// in case it has animation too, remove it
var myAnimation : Animation = activeGO.GetComponent(Animation);
if (myAnimation)
{
DestroyImmediate(myAnimation);
}
}
}
You can download all the necessary files in this one ZIP file (mesh & bounding box file is in FBX format):
BuildColliders script will add a “Custom->Build Colliders” in the Unity Editor Menubar.
To use it, simply select all game objects that you want to convert to Collider.
In my example above it’s LevelBoundingBox.FBX (not the actual Level Geometry/Mesh LevelGeometry.FBX).
This is the result of running Build Colliders to Level Bounding Box:
Basically this script will remove MeshRenderer, MeshFilter & Animation Component from bounding box geometry, and add a Collider based on the first letter of the mesh:
- “S” for Sphere Collider
- “M” for Mesh Collider
- “C” for Capsule Collider
(which i seldom use but i put it there just for the heck of it)
- and else for Box Collider as the default.
The script will also add “Collider_” prefix to the name, but you can always customize it the way you want it to.
To use the script, make a folder called Editor in your Project View (it’s inside Assets folder btw) and put BuildCollider.js there, and you’re all set.
Thanks for reading, I hope someone will find this useful
TERA: The Exiled Realm of Arborea (Bluehole Studio, Hangame)
http://tera.hangame.com/ (view with IE if site doesn’t load correctly)
Upcoming MMORPG for the PC by Korean developer, Bluehole Studio, and to be published by Hangame, TERA (Project S1) recently debuted at the 2009 Hangame Invitational along with Continent of the Ninth (Studio Cloud 9), Kingdom Under Fire II (by Blueside and Phantagram), and Warhammer Online (Mythic).
So what’s the big deal? It looks amazingly awesome, but then again so do a lot of upcoming Korean games. TERA utilizes an exciting, action-oriented gameplay system, but so does Continent of the Ninth, Blade & Soul (NCSoft), Dragon Nest (EyeDentity), and others. What’s interesting for me is that the developer, Bluehole Studio, is made up of a lot of former heavy-hitters from NCSoft. I won’t divulge anymore than that, but suffice to say this is a very impressive group of developers and the results show it. If western gamers paid any attention to the incredible development of Korean games lately, they would probably liken this to a bunch of ex-Blizzard guys out to make their own blockbuster game… x10. (more…)
Thank you for visiting AniCombo. Feel free to Subscribe to AniCombo