[DONE] Grimrock Model Tookit

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] Grimrock Model Tookit

Post by JohnWordsworth »

@starnick: Hey Nick - great to see that you've found the GMT! I've been debating sending a message your way to (a) thank you for your hard work on Assimp-Net and (b) ask if it's possible to export a managed Scene object using the Export API. However, I've not had the chance to take a proper look at your latest changes yet as I've had a busy week or two, so I wanted to figure it out before bothering you! Was really easy to get Assimp-Net working - many thanks for that. I'll be sure to add send some more detailed feedback your way later on. I set myself the task of writing documentation recently - which has slowed things down a bit as it takes longer than I thought.

Good suggestion re: FBX. I considered that, but have decided to go the C++ route for now, so I get (a) a command line tool out of it that will work when the OSX version of Grimrock comes out and (b) a library I can use in C# for a (albeit messy) solution in the GMT too. I considered writing an FBX .NET wrapper as it would be very useful for some people I'm sure - but woah, it's a BIG library! Thanks again for all your hard work on Assimp-Net, 'official' thanks are in the soon-to-be-released docs :).

@pferguso: I'm afraid that there is no way to export an animated model using the GMT yet, as OBJ files do no support storing Node data. It would also be extremely difficult to export the node data into a second file and re-attach it, as every vertex in the model is tied to a given set of bones which would be lost. However, there is a solution on the way through the FBX file format that I'm working on, and also (thanks to Nick from Assimp-Net) there will be DAE export of models coming very soon too!
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: [WIP] Grimrock Model Tookit

Post by Isaac »

pferguso wrote:I had a cool idea where I wanted to export one of the Grimrock Monsters into an obj, and then re-work his UV maps altogether(like create new ones), and then re-import him using the GMT. I didn't know it, but once you export a monster OBJ, if you import that OBJ back in GMT, all of the nodes are gone! I was so discouraged. Is there a way to import mesh data from an OBJ while I am looking at a.model file? then allow me to delete the original mesh, leaving my mesh (and the precious animation nodes) intact?

I tried re-inserting nodes according to the data on the original model, but there was no way to change the order of my newly inserted nodes, so the mesh node remained the second node, no matter what, whereas on the original mode, it was the 40th. I'm not sure if it would have worked if I had re-entered all of that node data or not.
Are you trying to:
* Re-use official textures on a new mesh?
or
* Re-use official animations on a new mesh?

Currently (AFAIK) animation export is not supported ~but it's coming, so we just have to wait.

In the meantime... You can extract the UV from the exported OBJ; you can also [manually] rebuild the skeleton using an identical node structure (and weights!) by [manually] copying the hierarchy from the GMT node panel. Then export your model to .dae, or .x formats. Then import your model into the GMT and apply the animation.
** Odds are that unless you are really good or really lucky, the model will explode once the animation is applied... but it is possible to do. You have to "weight paint" it just right, and you have to guess at it.

Trying this is for masochists. :twisted:
User avatar
pferguso
Posts: 40
Joined: Tue Nov 06, 2012 6:09 pm

Re: [WIP] Grimrock Model Tookit

Post by pferguso »

Hi Issac,
I am trying to use official animations on a modified mesh. The mesh would have new UV info (with new textures), and possibly additional geometry. I think if I can hang on until the fbx parts are working, I can accomplish what I am trying to do.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: [WIP] Grimrock Model Tookit

Post by Isaac »

pferguso wrote:Hi Issac,
I am trying to use official animations on a modified mesh. The mesh would have new UV info (with new textures), and possibly additional geometry. I think if I can hang on until the fbx parts are working, I can accomplish what I am trying to do.
In that case... You can begin with what I mentioned, and hold off on the weight painting part.

That would get you this far in the GMT...
Image

Hopefully later on we would be able to import an official animation [into the 3d modeler App], modify those parts that need to be changed to better suit the new mesh; and then import/export from the GMT as game ready model files.
SpoilerShow
This was an experiment to use the Tunnel Ogre as a base for a minotaur ~using the same vertices; later I duplicated the shoulder-armor.
The texture (for the moment) is from my clown Ogre.
flatline

Re: [WIP] Grimrock Model Tookit

Post by flatline »

Question:
I've been toying around with editing textures, but the option to "Load mipmaps" is not available in Gimp/DDS for me, which means any texture I open come with full mipmaps as layers.
Which version of GIMP & DDS plugin should I use to get the "Load DDS" dialogue options?
Starnick
Posts: 3
Joined: Tue Nov 13, 2012 7:41 pm

Re: [WIP] Grimrock Model Tookit

Post by Starnick »

JohnWordsworth wrote:@starnick: Hey Nick - great to see that you've found the GMT! I've been debating sending a message your way to (a) thank you for your hard work on Assimp-Net and (b) ask if it's possible to export a managed Scene object using the Export API. However, I've not had the chance to take a proper look at your latest changes yet as I've had a busy week or two, so I wanted to figure it out before bothering you! Was really easy to get Assimp-Net working - many thanks for that. I'll be sure to add send some more detailed feedback your way later on. I set myself the task of writing documentation recently - which has slowed things down a bit as it takes longer than I thought.
Thanks, you've done some great work yourself. I play Grimrock, so its pretty cool seeing one of my libraries being used in the modding scene :)

As for the export API, in release 3.0 it's just a conversion API (file or stream, and every combination inbetween). There isn't support for writing to a scene structure and exporting that, primarily because the managed scene data structure is explicitly read only. I've gotten some requests for this support though, so I've been re-thinking that decision, but there's a lot of groundwork to be laid out to get it done so its going to be a while. That and also, AnyCPU support.
flatline

Re: [WIP] Grimrock Model Tookit

Post by flatline »

First shot at using the toolkit today:

SpoilerShow
Image
Did a "starved prisoner/archer" as my first experiment. Not that great but it works ok as a friendly prisoner who joins you as a ranger when you release him from the cells he's in. Fixed his armor, polished it and did some minor alterations. Fun to fool around with this. If only I had the time to model a new head and replace the skull shape, and get an idle animation where he stands tall, I'd be satisfied.

Wa thinking of cloakking the ugly jaw with a beard made from particles. A beard would suit him well. Suggestions on what particle effect to use for beards graciously accepted :D
User avatar
LordYig
Posts: 175
Joined: Wed Jul 04, 2012 5:45 pm

Re: [WIP] Grimrock Model Tookit

Post by LordYig »

JohnWordsworth wrote:(...) FBX Support is pretty close now, I've got an almost working command line fbx <-> grim3d converter (which will be embedded in the GMT as a DLL in the long run). I've got the Cave Crab and the bone nodes exporting, I just need to export the vertex weights too and then you should be able to load up a Grimrock model in 3DS Max with a full skeleton. :)
I just quote your answer from Phitt's mine tilset thread because i don't want to "hijack" his thread for GMT related questions.

The fbx support will be welcome, obviously...
But just to be clear, does this also mean that we will be able to export a full rigged model with skeleton from 3DSmax to the GMT as well ?

I have tried to animate simple models with custom bones hierarchy in 3DS and I was not able to export it properly even using the .x format.
The bones are imported has geometry not as bones, or not imported at all...
I don't know if I was doing something wrong during the exporting/importing process or if this is just unsupported or impossible with the assimp library.
I guess it comes from the fact that i used custom bones hierarchy and not the biped object like the exemple you have shown us and which is displayed on the GMT website (the female whisp animated model)

Hopefully, we will be able to import skinned and animated models soon thanks to you !
Keep this up JohnWordsworth !
Moutrave
Posts: 18
Joined: Fri Nov 16, 2012 5:38 pm
Location: Montreal

Re: [WIP] Grimrock Model Tookit

Post by Moutrave »

Hey guys,

Just went through the 46 pages of the forum, that was intense ! A crapload of awesome stuff is being done here, of course I give my special thanks to John without whom none of this custom assets frenzy would have been possible :)

I do have a question though, which may or may not seem dumb (if it is, that's ok, kinda used to asking dumb questions :)) : can we use multi material with grimrock ? Say I want to work with only a small set of tilable texture and used material IDs in Max (for exemple) and then apply my textures to part of my objects...is that possible or does every texture needs to be unique ?

That's it for now.. of course I can manage perfectly without that feature, but I'm so used to using tilable texture and UDK that...well the inquiry comes naturally ! can't wait to get started with grimrock modding, that will also give me a nice excuse to finally learn so LUA.

Cheers !
!
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] Grimrock Model Tookit

Post by JohnWordsworth »

@flatline: Two possible options (1) you are not using the latest (or the same, if there are more than one) DDS plugin and GIMP. I'm using DDS Image (file-dds-save/file-dds-load) by Shawn Kirst, 2008. As for GIMP, I'm using 2.8.2. However, more likely is (2) I think, where you might have ticked the "don't ask me again" box on the DDS load dialog, which presumably uses the last settings you had selected for all time. I'm afraid I don't know how to reset this option, but there must be a 'reset plugin settings' button somewhere.

Alternatively, you could try out this plugin (http://code.google.com/p/gimp-dds/), which seems to have a few more features and be more up to date.

@Starnick: Cool to hear that you play Grimrock. Ahhh, I see now why it's a conversion API and not a full scene exporter (as it's readonly). I guess when you started working with an Import library, you never imagined that you would need to edit the scene graph (a reasonable assumption). It's cool to see Assimp moving in the direction of exporting too however, as engineers have already figured out how to map those file formats to the Assimp Scene graph, it would be really powerful to be able to do the opposite. Not a quick job though I imagine. I'm gearing up for a move to Canada over the next couple of months, but when we get there I might have a decent amount of spare time I can offer if there's anything I can help with (the GMT should've calmed down a bit by then too!).

@flatline: Haha, I like where you're going with the starved prisoner. The face looks a bit creepy (would fit well in a horror based mod). Hehe. Good work.

@LordYig: Yup - the toolkit will provide full Rigged FBX -> Grimrock conversion, including animations and bone weights (I've not figured out where these are stored in the FBX file yet - but they must be I'm sure ;)). I was thinking down the line you could setup the GMT to watch a folder for FBX files and auto-convert them for you when you export a new one. That's a long-term feature though (lets get it working first). Unfortunately, 3D model formats are fiddly little guys, and I've not yet figured out the best way to get rigged models imported using Assimp yet. I expect support will be better when I upgrade it to Assimp 3.0 (thanks to @Starnick) and there will be loads I can do too to improve support for the edge cases. The wisp.x file did just import fine though - I did nothing special with the fact it's a biped, just read the bones out of the model and added them to the Grimrock version of the model (all just imported through Assimp). So some settings must work!

@Moutrave: Grimrock model meshes are broken down into 'segments' and you can only have one material per segment (one diffuse texture). However, you can use the same material across all of the segments in your model if you so wish. For instance, you could have 6 cubes as separate meshes in your model and each could use the same material definition (and hence texture). Moreover, your texture might only be a single face of the cube, and you could map the UV coordinates for each face to the entire texture so that the full face texture appears 6 times on each cube (and 36 times across the whole model).

It's not possible (at least, with the GMT and I don't think the models support this) to overlap 2 textures on top of each other on a single face. Hope this answers your query.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Post Reply