Mostrando entradas con la etiqueta pivot. Mostrar todas las entradas
Mostrando entradas con la etiqueta pivot. Mostrar todas las entradas

miércoles, 15 de marzo de 2017

Unity Pivot Nightmares!

So, I think we are all familiar with pivot issues in Unity. I can Imagine how difficult it has to be, to make a standard way for 3D, when different programs have completely different system of coordinates.

We have two main issues by working with 3D

1st - Is the Universal problem between inches and the metric system. So, you get familiar with these numbers: 2.54 or 0.00254

¿What are those? The difference between inches and cm.

2nd - Is the problem between programs. Z is up or Y is up.. wich are the two most common, Y up is based on Autodesk Maya, and then, if you use 3Dsmax, you get Z up, and lots of problems with it. also if you use Blender, you will get similar problems

¿The answer?

How to achieve stuff out of 3Dsmax


My experience is... when you export FBX, every setting of units you write on scene are overwrited by the FBX export options, so, you just have to take care of FBX export options, and become an expert on that.



There you can achieve two things in Unity, file scale conversion on one or other part of Unity, one (the one wich comes from the program) is showing when you select an FBX at Unity, then the Scale Factor and File Scale can be 1:1 or 1:0.0254 (inches to meters) so, if I understood right, 3Dsmax uses inches, so you can se it to export on automatic or directly into inches.



If you try to get 1:1 from a FBX generated in 3Dsmax, then, you have the scale conversion on the objects at the scene, so, the transform - Scale value gets to 0.0254, wich will give you big problems.
I say this, because then, you have different scale conversions if you include parent-child relationship between meshes and helpers... and everything gets quite messy and difficult to understand, so... it is better to keep thing simple.


Your objective is to get 0.0.0. on you Transform and 1.1.1 on your scale values

Once you achieved 1.1.1 values on scale, then, you will encounter a problem with the rotation, wich will be resembled like -90 on X axis, and the Asset Store will be telling you the objects are not facing Z, what the... ? what? My objects are facing Z.. just they got this number.

So, what they mean, what they do.. is to reset all those values on the gear button at the top right of Transform values, then everything gets to zero, and the nightmare begins.

What to do?

The answer I got was, to get a Batch export script for 3dsmax, wich gives to you the option of exporting each object placed at 0.0.0 position, do the modifications you need, and reset these options to continue working on the meshes you were doing. So, I reset position and I have to rotate the object 90 degrees on X axis to avoid this 270 (-90) rotation of before. There you have an object with 0.0.0 rotation, but.. the problem is, now.. I have an object facing down.

Plus! To solve it totally you have to rotate the pivot on 3dsmax.. then, you have to rotate till it is like... this dummy I created... Imagine you are on Unity and you have to achieve these directions, then, you dont have much to do, rotate and batch export from the script.


I hope this solves the main issues you are having.. but I suppose this does not solve everything you could have doing an import, because sometimes are Unity bugs doing stuff into it. Like one related to include a point helper and parenting stuff into helpers... but that's quite complicated to explain.


https://docs.unity3d.com/Manual/HOWTO-importObject.html

https://docs.unity3d.com/Manual/HOWTO-ImportObjectMax.html

Modular Cathedral



Finally! We got to release the Modular Cathedral, the perfect enviroment for the Medieval Angel, so, we decided to make little modules to make possible different schedules.

Our inspiration? The classics and the new.

We remember when we first tried Diablo, and then the second Diablo game, those from Blizzard franchise, 3D was rendered with isometric modules, and those were programmed for being generated the "procedural way", so you were able to reach different enviroments, just by starting a new game, each time you played, you had to find the doors, find the monsters. Small modules on the game had the same structure, but you get the idea.


This way, I thought about making cathedral level, so you could get some sort of Diablo and my new favourite: Dark souls themed, wouldn't it be great to have procedural way to generate cathedrals and dungeons, with the system of play from Dark Souls? So, that was my inspiration to make this level design.

Features:

A building using the pieces I created for Modular Cathedral, wich is resembling an empty cathedral, where you can place everything you need on your game, you can use this part on your game without a problem, just we are working hard on the module part, so you can generate quite everything similar to this cathedral structure.

 

 
 

The modular built in:

So, we try to make the most sense on the modules/prefabs we are creating on this asset, so, soon you can see an structure like this one, wich will be in different pieces. So, this one will be pieced into 9 different prefabs, but also those parts could be with different variations, one just being a big wall, or with a big door, medium door, small door... And then, we can create corridors, bigger, wider structures, at the moment I am trying to make the first floor, and then I will continue making prefabs for wider, taller roofs. This takes a bit of time.. I will explain it in other post about pivot nightmares.