Blender 2.71 - Importer / Exporter (1.4.4)
Re: Blender 2.71 - Importer / Exporter
I am not able to use this animation import.
Can somebody create some videotutorial with applicating animation to model, please?
Can somebody create some videotutorial with applicating animation to model, please?
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
MultiAlcoveManager, Toolbox, Graphic text,
Re: Blender 2.71 - Importer / Exporter
@Ddrtru:
- rename the downloaded script - make it short and no spaces, use underscore, name can be anything.
- copy that im/export script into a blender script resource folder= \scripts\addons or better- \scripts\addons_contrib
- start blender, go File->User Preferences->Addons, search after named addon and check it to active.
Done so far^^
Import:
- go File->Import->Legend of Grimrock 2...model, file requester opens.
- Select 'Grimrock2.dat' within your LoG2 installation.
- File requester, left side - scroll all the way down to find the list of all entrys inside 'Grimrock2.dat'
- select the model you want to load
Done.
Animation import:
- go File->Import->Legend of Grimrock 2...animation, file requester opens.
- Select 'Grimrock2.dat' within your LoG2 installation.
- File requester, left side - scroll all the way down to find the list of all anims inside 'Grimrock2.dat'
- above that listing, there is a field named 'Armature', here you must select the armature from your model BEFORE loading!
- select the animation you want to load
Done!
Where to find the new animation sequence?
- Open the Animation-Editor window (top menu of blender, list selector).
- There you will find a list-button named 'Dope-Sheet' , change to 'Action Editor'.
- Inside action editor you´ll find a text/listfield, if you hover over with mouse it says: ..collection of F-curves..
- There you find the new animation data into an action.
- To load another, klick the 'plus' symbol right of it and select the new one, rename it as you wish.
Command: A+DEL delete all data inside!
- Go again to import - animation, the new set saves into the selected new action set.
And so on.
Hope this helps for first steps.
- rename the downloaded script - make it short and no spaces, use underscore, name can be anything.
- copy that im/export script into a blender script resource folder= \scripts\addons or better- \scripts\addons_contrib
- start blender, go File->User Preferences->Addons, search after named addon and check it to active.
Done so far^^
Import:
- go File->Import->Legend of Grimrock 2...model, file requester opens.
- Select 'Grimrock2.dat' within your LoG2 installation.
- File requester, left side - scroll all the way down to find the list of all entrys inside 'Grimrock2.dat'
- select the model you want to load
Done.
Animation import:
- go File->Import->Legend of Grimrock 2...animation, file requester opens.
- Select 'Grimrock2.dat' within your LoG2 installation.
- File requester, left side - scroll all the way down to find the list of all anims inside 'Grimrock2.dat'
- above that listing, there is a field named 'Armature', here you must select the armature from your model BEFORE loading!
- select the animation you want to load
Done!
Where to find the new animation sequence?
- Open the Animation-Editor window (top menu of blender, list selector).
- There you will find a list-button named 'Dope-Sheet' , change to 'Action Editor'.
- Inside action editor you´ll find a text/listfield, if you hover over with mouse it says: ..collection of F-curves..
- There you find the new animation data into an action.
- To load another, klick the 'plus' symbol right of it and select the new one, rename it as you wish.
Command: A+DEL delete all data inside!
- Go again to import - animation, the new set saves into the selected new action set.
And so on.
Hope this helps for first steps.
Dungeon Master Resource Pack worker and passionated Beer drinker
Re: Blender 2.71 - Importer / Exporter
I'm having some real problems trying to import dungeon_wall_alcove back into the game, unaltered (as a test). If I use importer version 1.2 or 1.3, the model looks okay in Blender, but it won't export directly to .model format (tons of errors and a 0-byte file results) and, when I export it as normal to .obj format, it's really screwy in GMT. The faces are transparent on the front sides, GMT's rotation and viewing controls are backwards or otherwise really weird - it's very hard to rotate the model around. And when I put it into the game, it's rotated 90 degrees off, sits in the middle of a square (instead of along the wall as it should), and the faces aren't textured... much like in GMT. If I turn off backface clipping on GMT, it looks okay, but of course, still isn't useable in LoG2.
If I import the same model using an earlier version of the importer (1.0?), the model looks find in GMT, rotates properly, and it looks just fine and it's in the proper orientation in LoG2, but I can't texture it - perhaps because I can't recalculate the tangents: GMT says, "Need position, normal and texture data in existing mesh to calculate tangents". Blender has the texture defined and displayed, and it looks great.
A simple update has turned into hours of trial and error without anything that works in the end. I'm stumped again. Any help would be greatly appreciated. I know I'm a real newb, but I'm trying! Thanks, -Lark
If I import the same model using an earlier version of the importer (1.0?), the model looks find in GMT, rotates properly, and it looks just fine and it's in the proper orientation in LoG2, but I can't texture it - perhaps because I can't recalculate the tangents: GMT says, "Need position, normal and texture data in existing mesh to calculate tangents". Blender has the texture defined and displayed, and it looks great.
A simple update has turned into hours of trial and error without anything that works in the end. I'm stumped again. Any help would be greatly appreciated. I know I'm a real newb, but I'm trying! Thanks, -Lark
Re: Blender 2.71 - Importer / Exporter
Lark, there can be many steps involved. I'll try to help with some. I've had hit or miss success with exporting as .model. Some are just fine and only need recalculate normals & tangents in GMT, others create the errors you're getting (and I've done the same things to both models, setup same structure, etc., could be me though ).
Some help...first, select the entire mesh in edit mode and do Mesh -> Vertices -> Remove Doubles. Blender will flash a message at top center of the screen saying how many verts have been removed. You have to do that for every .model you import. If you export .obj from Blender and the faces disappear, easy fix, the normals have been flipped. Go into edit mode, select all the problem faces then do Mesh -> Normals -> Flip Normals.
I just tested importing the dungeon_wall_alcove and exporting as .model into GMT and it's fine. I have no problems exporting .model as long as no changes are made. Is it possible you have leftover objects in the scene? Open Blender, hit delete and get rid of the cube, maximize the window, then press Ctrl-U and select Save Startup File? Now you always have a clean scene when you start, try the alcove again.
I haven't tried to texture an imported .model yet so I'm not sure what's happening there.
It can be tricky to align the Blender and Grimrock worlds. To get your models positioned correctly, you have to have the game_matrix & RootNode in Blender setup correctly, you also have to assign textures to their respective meshes. Remember that Blender has the vertical axis as z whereas it's y in Grimrock. If everything is setup correctly, you can export as .obj with only needing to recalc normals & tangents in GMT.
Some help...first, select the entire mesh in edit mode and do Mesh -> Vertices -> Remove Doubles. Blender will flash a message at top center of the screen saying how many verts have been removed. You have to do that for every .model you import. If you export .obj from Blender and the faces disappear, easy fix, the normals have been flipped. Go into edit mode, select all the problem faces then do Mesh -> Normals -> Flip Normals.
I just tested importing the dungeon_wall_alcove and exporting as .model into GMT and it's fine. I have no problems exporting .model as long as no changes are made. Is it possible you have leftover objects in the scene? Open Blender, hit delete and get rid of the cube, maximize the window, then press Ctrl-U and select Save Startup File? Now you always have a clean scene when you start, try the alcove again.
I haven't tried to texture an imported .model yet so I'm not sure what's happening there.
It can be tricky to align the Blender and Grimrock worlds. To get your models positioned correctly, you have to have the game_matrix & RootNode in Blender setup correctly, you also have to assign textures to their respective meshes. Remember that Blender has the vertical axis as z whereas it's y in Grimrock. If everything is setup correctly, you can export as .obj with only needing to recalc normals & tangents in GMT.
Re: Blender 2.71 - Importer / Exporter
@germany:
Thank you very much, your description is very useful.
(my problem wos in filling Armature field in import dialog )
Thank you very much, your description is very useful.
(my problem wos in filling Armature field in import dialog )
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
MultiAlcoveManager, Toolbox, Graphic text,
Re: Blender 2.71 - Importer / Exporter
I put all versions and started putting down some basic help and documentation on an add-on page for the script.
Also made some minor updates to it,
Add on page
https://sites.google.com/site/bitcpy
Latest
https://sites.google.com/site/bitcpy/do ... sion-1.3.1
Changes
Also made some minor updates to it,
Add on page
https://sites.google.com/site/bitcpy
Latest
https://sites.google.com/site/bitcpy/do ... sion-1.3.1
Changes
- Quads are now split the same way Mikkelsen does it so that triangels matches Blenders bake and tangent frame.
- Model tangent space is correctly rotated with the game matrix so that baked normals in Blender works out of the box in game (not well tested though).
- The splitting of quads have been standardised to work the same way Blender handles quad splits during for example bake of tangent space normal maps.
- The armature option is no longer needed and the importer will apply changes to bones automatically if they exists in an armature in the scene.
When the bone can't be found the node will be animated instead and simply ignored in case neither node or bone could be found.
- Animation import now handles importing of animations not supported for scene object. Missing nodes will simply be ignored.
- If setting up scenes from scratch, the game matrix can be created from the Tools panels Create tab where Add Primitive is, look for Legend of Grimrock panel.
Re: Blender 2.71 - Importer / Exporter
@Lark
I tried with the latest 1.3.1 which worked fine. Bringing it into Blender, then exporting and opening it in GMT.
You shouldn't need to bring it into GMT for tangent re-calculations with the latest, it should work just fine in the game.
(I'll double check that in a couple of minutes)
If there's still problem, let me know and I'll see what we can do about it.
@everyone
Thanks for helping each other out
I tried with the latest 1.3.1 which worked fine. Bringing it into Blender, then exporting and opening it in GMT.
You shouldn't need to bring it into GMT for tangent re-calculations with the latest, it should work just fine in the game.
(I'll double check that in a couple of minutes)
If there's still problem, let me know and I'll see what we can do about it.
@everyone
Thanks for helping each other out
Re: Blender 2.71 - Importer / Exporter
What a great tool, thx bitcpy
I was playing around. I imported monster model, modified it and export it successfully.
Monster work just fine, with only one error in game.
my_monster does not have source data. Am I doing something wrong? Should I ignore it?
I was playing around. I imported monster model, modified it and export it successfully.
Monster work just fine, with only one error in game.
my_monster does not have source data. Am I doing something wrong? Should I ignore it?
SpoilerShow
Code: Select all
defineObject{
name = "my_monster",
baseObject = "ratling2",
components = {
{
class = "Model",
model = "mod_assets/models/monsters/test.fbx",
}
}
}
Re: Blender 2.71 - Importer / Exporter
Thanks bitcpy! This is becoming a terrific resource. I especially like the one-click game matrix setup and no tangent recalcs.
Here's the error I get with some meshes I export as .model but It's my doing, I think, because there are some open ended faces in the mesh...(see RuntimeError at bottom)
Here's the error I get with some meshes I export as .model but It's my doing, I think, because there are some open ended faces in the mesh...(see RuntimeError at bottom)
SpoilerShow
Re: Blender 2.71 - Importer / Exporter
I'm glad you girls/guys like it and are finding it useful!
@Batty
Yes, there are n-gons in the mesh which aren't supported export time.
Until it is, I was thinking about adding support for selecting the invidalid faces so you can see them whenever the export fails on it.
One thing you can do in the meantime is triangulate it manually if you're having problem finding the n-gon.
I don't think you can bake normal maps in blender from these kind of meshes either (if blender automatically doesn't triangulate it for you first)
@Aisuu
Oh, I'm not sure I understand. source data?
I never done asset definitions for monsters if that is where your hickup occours.
But just a quick glance at other peoples attempt to bring in LoG1 monsters they seem to be using something called 'storeSourceData' in their model Component (no idea what it actually does).
example,
@Batty
Yes, there are n-gons in the mesh which aren't supported export time.
Until it is, I was thinking about adding support for selecting the invidalid faces so you can see them whenever the export fails on it.
One thing you can do in the meantime is triangulate it manually if you're having problem finding the n-gon.
I don't think you can bake normal maps in blender from these kind of meshes either (if blender automatically doesn't triangulate it for you first)
@Aisuu
Oh, I'm not sure I understand. source data?
I never done asset definitions for monsters if that is where your hickup occours.
But just a quick glance at other peoples attempt to bring in LoG1 monsters they seem to be using something called 'storeSourceData' in their model Component (no idea what it actually does).
example,
Code: Select all
components = {
{
class = "Model",
model = "mod_assets/models/monsters/test.fbx",
storeSourceData = true,
}