View Full Version : Unity Master Thread!
equil
02-06-2012, 03:54 PM
▂▄▅▆▇ Unity3D Master Thread ▇▆▅▄▂
Get unity3d:
http://unity3d.com/unity/download/
Useful resources and learning materials:
Forums http://forum.unity3d.com/
Semi-official Wiki http://unifycommunity.com/wiki/index.php?title=Main_Page
Q&A http://answers.unity3d.com/index.html
Scripting tutorials http://www.unity3dstudent.com/
Scripting tutorials http://cgcookie.com/unity/
Popular Plugins & tools:
Strumpy Shader Editor: http://forum.unity3d.com/threads/56180
Computron
02-06-2012, 08:03 PM
FUCK UNITY.
nah, jus kiddin'
tristamus
02-06-2012, 11:53 PM
Woohoo! Finally, Unity gets Polycount's love.
e-freak
02-07-2012, 01:35 AM
Crossposting from the Unity Sutup Thread, maybe we can add this to the original post once solved?
[...]http://i.imgur.com/ha8j5.jpg
is this the correct unit setup or would i set the system unit scale to centimeters as well?
also: monster's solution to the FBX scale import problem:
[...]Put a text file (javascript) in ...\Assets\Editor\ImportSettings.js (make the folder if needed.)
Paste this code into it and save it:
// This function will over write the default Unity import scale of 0.01.
class DefaultMaxSceneScale extends AssetPostprocessor {
function OnPreprocessModel () {
if (assetPath.Contains(".max")) {
var modelImporter : ModelImporter = assetImporter;
modelImporter.globalScale = 1.0;
}
}
}
I haven't tested this, but I think it will work. You can remove the .max check if you want it to scale all models on import.
As for me, my unit setup in Max is 1 unit = 1 centimeter, and display is set to generic units. I've never had a scale problem. [...]
and the last thing: the axis problem: did anyone ever get rid of it?
just found this, which seems to describe the problem (http://forum.unity3d.com/threads/10343-How-to-get-the-XYZ-axis-right-%283DS-MAX-Unity%29/page3) pretty spot on. [...]
http://i.imgur.com/4phcI.jpg
The coordinate system conversion is still unsolved and I doubt you'll be able to fix it yourself without writing a custom FBX importer, but you can help UT notice this by voting this up
http://feedback.unity3d.com/forums/15792-unity/suggestions/210672-fbximporter-correct-orientation-and-without-game
Farfarer
02-08-2012, 03:32 AM
class MyFilePostprocessor extends AssetPostprocessor {
function OnPreprocessModel () {
// Set imported models to scale 1.
// Disable swap UV channels.
var modelImporter : ModelImporter = (assetImporter as ModelImporter);
modelImporter.globalScale = 1.0;
modelImporter.swapUVChannels = false;
}
function OnPostprocessModel ( object : GameObject ) {
FixMaxImport ( object );
}
function FixMaxImport ( object : GameObject ) {
// Unrotate root transform.
object.transform.rotation = Quaternion.identity;
// Get all meshes and unrotate them.
var meshFilters : MeshFilter[] = object.GetComponentsInChildren.< MeshFilter > ();
for ( var j : int = 0; j < meshFilters.length; j++ ) {
FixMesh ( meshFilters[j].sharedMesh );
}
}
function FixMesh ( mesh : Mesh ) {
var resetTransform : Quaternion = Quaternion.Euler ( -90.0, 0.0, 0.0 );
var newMeshVertices : Vector3[] = new Vector3[mesh.vertexCount];
var newMeshNormals : Vector3[] = new Vector3[mesh.vertexCount];
for ( var i : int = 0; i < mesh.vertexCount; i++ ) {
newMeshVertices[i] = resetTransform * mesh.vertices[i];
newMeshNormals[i] = resetTransform * mesh.normals[i];
}
mesh.vertices = newMeshVertices;
mesh.normals = newMeshNormals;
mesh.RecalculateBounds ();
}
}
This should unrotate all models that don't have animation on import.
I've tried fixing skeletal animation - got somewhere close on very simple rigs - but it's far harder to fix... the maths and internal workings is a little beyond me.
Also, I have some Unity related tutorials (mostly shader stuff) up on my blog; http://www.farfarer.com/blog/ - might come in handy for some.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.