Page 56 of 74

Button model and animation

Posted: Mon Jan 14, 2013 12:19 pm
by djoldgames
Hello,
I've problem with creating new model of secret button (or any button) for Eye of the Beholder wallset. I am trying to assign "temple_secret_button_large" animation to my model. I hope, someone from you can help me (especially @phitt, I see you make new models for secret buttons in your Mine tileset ;-).

I'm using Blender to create the models, and the process: BLENDER export model to .dae -> GMT import model using assimp, change nodes, materials, etc. and save as .model for Grimrock. With door (gate) models I've no problem, just add some X-axis rotations to the process: BLENDER rotate model by X axis 90, export -> GMT import model, rotate root node (scene node) by X axis -90 and the door animation works fine in Grimrock.

But I'm really frustrated with the button animations on the new models.
I have two meshes: button frame mesh (wall with hole) and button mesh. Button mesh have the pivot at the same position as the temple_secret_button_large button mesh (to do this, I must export this model from asset pack, import to blender and get the position of the button mesh).
Image

There is the model in blender format to download.

If I use the DAE export/import format, animation in grimrock is scaled, rotated, moved. I see in GMT (after comparing with temple_secret_button model), it can be some problem in node matrix. A can handle the animation in Anim tab (rotating and positioning) and save it as new animation, but this is not right solution, because it is almost impossible to set correct position of mesh in GMT.
If I use the 3DS export/import format, all meshes (nodes) have always the same pivot position as the root node in GMT.

Any tips, or simple "how to do new buttons using default animations" ?

Re: [WIP] Grimrock Model Tookit

Posted: Mon Jan 14, 2013 2:08 pm
by Leki
I am not at home and I cannot test it, but you can try this:
- select and export 2 meshes (wall and button) as obj from blender
- import obj into GMT
- rename button to button_mesh
- load animation
- test it

Re: [WIP] Grimrock Model Tookit

Posted: Mon Jan 14, 2013 2:58 pm
by djoldgames
Leki wrote:I am not at home and I cannot test it, but you can try this:
- select and export 2 meshes (wall and button) as obj from blender
- import obj into GMT
- rename button to button_mesh
- load animation
- test it
Thanks Leki, but I don't have problem with renaming the nodes, of course my button meshes are always named "button_mesh" ;-). And by the way, OBJ format don't support the multiple meshes/nodes (I think) and is useless in using with this type of objects like buttons/walltexts/etc.

Slovak version:
Myslim ze s tebou mozem aj v rodnom jazyku co som velmi rad ;-) Snad ti to takto lepsie vysvetlim, dufam ze som to v anglictine nenapisal nejako nepochopitelne.
Videl som tvoje objekty co si robil a Tombs of Winterfell a vyzera to skvele. Neviem ci si vsak uz skusal robit tlacitka alebo dvere. Ked robim novy objekt pre dvere, musim ho pred exportnutim v blenderi otocit (X axis 90) a nasledne v GMT otocit root node o -90 (a samozrejme premenovat node dveri na "gate") aby animacia fungovala spravne.
Myslel som ze podobne jednoducho priradim animaciu tlacitka novemu objektu. Animacia sa teda priradit da, ale nie som schopny dosiahnut to, aby bola spravne nastavena, cize v prislusnom smere a s prislusnou velkostou. Najlepsie by bolo ak si to vyskusas. Mam problem s presnym umiestnenim a otocenim tej animacie tlacitka.
Format OBJ myslim nepodporuje viac objektov, co som skusal vzdy mam po importe v GMT vsetky nody spojene do jedneho, neda sa teda na toto pouzit...

Re: [WIP] Grimrock Model Tookit

Posted: Mon Jan 14, 2013 3:50 pm
by Leki
djoldgames wrote:
Leki wrote:I am not at home and I cannot test it, but you can try this:
- select and export 2 meshes (wall and button) as obj from blender
- import obj into GMT
- rename button to button_mesh
- load animation
- test it
Thanks Leki, but I don't have problem with renaming the nodes, of course my button meshes are always named "button_mesh" ;-). And by the way, OBJ format don't support the multiple meshes/nodes (I think) and is useless in using with this type of objects like buttons/walltexts/etc.

Slovak version:
Myslim ze s tebou mozem aj v rodnom jazyku...
OK, here is answer in Czech :-)
SpoilerShow
Psal jsem to narychlo. Vyznělo to trochu jinak, než jsem to myslel.
- Myslel jsem vyexportovat jako obj každá zvlášť. To obj tě zbaví všeho, co jsi napáchal v blenderu, protože je úplně tupé.
- pak jsem mylsl vzít button a zkusit ho importnout do GMT a hodit na něj animaci - když pojede dobře, tak ok, když ne, tak orotovat aby byl směr správně.
- pak napozicovat bez zapnuté animace na zeď a to tak, že si jako background model hodíš právě to druhé obj - zeď s dírou
- do scény pak dáváš dva objekty - zeď a button - ne jeden se dvěmi částmi (tady sem myslel, že je trik, protože když to exportuješ zároveň, tak to imho dělá bordel)
- dělal jsem si tlačítko, když jsem zkoušel první buttony, tak to nejelo, protože nešlo pojmenovat ještě nod - tzn. zkoušel jsem to dávno.
- naž nasadíš tu animaci wall button, tak buseš asi muset ještě to tlačítko 100x zmanšit - selektni ten nod a uprav transformační tabulku v GMT.
- ta animace to zvětší.
- imho to ale nebude fungovat - protože:
* model bude ve scéně malý
* pivot bude jinde a nepůjde mačkat

Jde o to, že buttony jsou úplně jinak než dveře - ty žádnou animaci (bohužel) nemají. Myslím, že jediné řešení je maxo 2013 (trial na 30 dnů) a exportovat to jako kompletní řešení s toho pomocí CWiho scriptu...

EDIT: Teď vidím, že tu mám GMT - tak když otevřu wall_button, tak vidím, že tam má na sobě nod - ten button je nějaký mesh, který je nakostěný na ten button_mesh - jinak řečeno, button_mesh není model, ale kost - takže to přes to obj nikdy nebude fungovat.
Zkus v blenderu udělat dummy (helper - point) objekt, co se bude jmenovat button_mesh a na něho hoď ten skutečný mesh tlačíkta, kterému říkej třebas tlačidlo, to je fuk - možná bude stačit jen to k němu nalinkovat a zkus to přes coladu ven. Teď bude animace tahat ten nod a nalinkovaný (nakostěný) mesh se bude hýbat s tím, přičemž zóna kliku bude na tom meshi - to by mělo fungovat.

OBJ import request

Posted: Thu Jan 17, 2013 12:09 am
by djoldgames
Hello John,
I have one feature request for GMT, with your OBJ import.
Can you add the other OBJ import option like "Import OBJ as new node"? (in the File -> Import menu).

Because of:
To create new model of the secret button with assigned one of the default button_press animation, I need to import 2 meshes (nodes) with the default (clear) matrix like 100|010|001. I'm using blender and only one exporting format, from which I'm able to import mesh with "clear" matrix is OBJ (using your OBJ importer). But for the OBJ format restrictions, there is only 1 mesh imported.

It is possible to create this sort of import meshes from multiple OBJ files? Added as new node with parent "RootNode".

Thank you for answer.

Re: [WIP] Grimrock Model Tookit

Posted: Thu Jan 17, 2013 12:27 am
by germanny
djoldgames wrote:Hello John,
I have one feature request for GMT, with your OBJ import.
Can you add the other OBJ import option like "Import OBJ as new node"? (in the File -> Import menu).

Because of:
To create new model of the secret button with assigned one of the default button_press animation, I need to import 2 meshes (nodes) with the default (clear) matrix like 100|010|001. I'm using blender and only one exporting format, from which I'm able to import mesh with "clear" matrix is OBJ (using your OBJ importer). But for the OBJ format restrictions, there is only 1 mesh imported.

It is possible to create this sort of import meshes from multiple OBJ files? Added as new node with parent "RootNode".

Thank you for answer.
Not johnW.^^, but you can test if you can import the obj via assimp importer. This gets you more objects.
Ah, and i think you can move the button around, but not the root node, only the mesh itself. So root node stays as old position, mesh is at your desired pos.. will test that.

Re: [WIP] Grimrock Model Tookit

Posted: Thu Jan 17, 2013 2:15 am
by djoldgames
Not johnW.^^, but you can test if you can import the obj via assimp importer. This gets you more objects.
Ah, and i think you can move the button around, but not the root node, only the mesh itself. So root node stays as old position, mesh is at your desired pos.. will test that.
Thanx germanny, I don't know where I had my eyes, assimp importer supports OBJ :roll:
Tested and it works like a charm! Now I have completly new working model of the secret button in the game.

But another prob appears...
I see that the bounding box in the game (clickable area) is always taken from the animation and not from the mesh/node :(
If I create new button model with different dimensions from the original animation, clickable area in the game is still on position (and with dimensions) of the original animation...

Re: [WIP] Grimrock Model Tookit

Posted: Thu Jan 17, 2013 2:18 pm
by Leki
djoldgames wrote:
Not johnW.^^, but you can test if you can import the obj via assimp importer. This gets you more objects.
Ah, and i think you can move the button around, but not the root node, only the mesh itself. So root node stays as old position, mesh is at your desired pos.. will test that.
Thanx germanny, I don't know where I had my eyes, assimp importer supports OBJ :roll:
Tested and it works like a charm! Now I have completly new working model of the secret button in the game.

But another prob appears...
I see that the bounding box in the game (clickable area) is always taken from the animation and not from the mesh/node :(
If I create new button model with different dimensions from the original animation, clickable area in the game is still on position (and with dimensions) of the original animation...
- Import model as obj usig assimp (wall_mesh and button_mesh)
- load anim in GMT
- test anim - button will jump in different position
- select button_mesh and move (GMT animation tab) anim to the right place
- save animation
- create new game object and use your new animation in his definito
- hope it works, othervise you need "complete solution" (mesh and anim) as I said before :-)

EDIT: it does not work - scale anim gives terrible results and target click zone is still in the size of old button. I am afraid you must go for a full solution.

Re: [WIP] Grimrock Model Tookit

Posted: Tue Jan 22, 2013 1:50 pm
by spacecookie
This is a really great addition to Grimrock. I've been playing with it, but I'm not that technical a person, so I'm stuck until a manual can be made for it.

I've imported my cricket bat sword, but I don't know about bringing textures in and all that other stuff.

Image

Re: [WIP] Grimrock Model Tookit

Posted: Tue Jan 22, 2013 2:02 pm
by Isaac
spacecookie wrote:...
That just begs to be imported in as a 'Fire Blade', but one that shoots oversize [grim] rocks. :D