{Instructional}Getting .Models into LoG
Posted: Thu Jun 13, 2013 12:32 am
I saw a thread nearby with this question, and it occured to me that it is a fairly common one. Getting new models in LoG is not difficult, but there are a few things you need to know about it. I've only used blender, but 3dmax does fine for many of our friends here.
1. These tutorials were invaluable to me while learning blender. The guy is talented, descriptive, and he has an overlay that shows every command input for that quick trick he just did that you WANT TO KNOW HOW TO DO! I learned how to Rig a model for animation in half a night with this guy.
http://www.youtube.com/playlist?list=PL13FCE5A9EF9026CE
Edit: Remma reminded me that skuggasvein not only has a blender tutorial, but one where he imports an LoG object, manipulates it, then puts it back in LoG. You WANT to see this!
viewtopic.php?f=14&t=4043
And 2. John Wordsworth is a demi-god. He made for us, the ultimate super nifty, handy dandy, Grimrock Model Toolkit (GMT). You will need this for converting your files, and to fix a couple of common errors before exporting.
viewtopic.php?f=14&t=3325&hilit=Grimrock+Model+Toolkit
Blender: Always finalize any model by switching from "object" mode to "Edit" mode,then select the "Mesh" menu near the bottom, find "Vertices" and select "Remove doubles".Generally try to export as an .obj file, they are quite compatible with GMT's "Assimp importer", which will keep all of your nodes intact. do not worry about proper scaling here, GMT handles it superbly. In fact, you may find it a useful strategy to balloon the model in blender for detail work, and scale it in GMT, where you can get frames of reference for the object.
GMT: Here it is simple, but there are a few things you need to make sure and do here before exporting.
This is where you will apply your textures also. If you need multiple textures, select the proper node in the right hand drop down menu.
Texturing tips
1. Top Menu bar "Tools", then Find/Replace material. If there are multiple nodes, the order they appear in will match the nodes dropdown menu starting at node 3. meaning 1st, second, third in find/replace; would equal 3,4,5 in nodes menu. The selected node will highlight in red to help you out. Also, goto "settings" here under "tools" to point GMT to your Asset Pack, and your custom textures folder, then "reload materials library". This will populate your available textures menu.
Edit: For custom textures, you must make an LoG object script in your "materials.lua" file for GMT to find it and populate with it. ALSO, very important: Your texture must be in the correct ".dds" format, but be referred to as ".tga" in the materials.lua. So while you are using "lampshade.dds" for the texture, in the lua definition you will refer to it as "lampshade.tga". No time to explain or make sense of it, just accept it and follow suit. It will work!
Translating/Scaling
On the bottom right are input boxes for moving, rotating, and changing the size of the model. You will usually want to select Node 2:Main Object if using the assimp importer. You will know because the entire model will highlight red. Translations are done by a scale of 3= One Tile in the dungeon. The 3 boxes represent the Axis's (Axi?) in 3d space. So if you input a 1 in the middle box (Y axis) and click translate, your object will move a third of a square up. -1 and it will move down. You need these if you need to say, rotate a throne and push it back against the wall. Scaling is done as 1 = 100%, not of the original size, but of the current size. So no matter how much youve manipulated it, .5 will always be half the current size, and 2 will always be double current size.
Random tips (More to add on everyones suggestions!)
-You can goto the "Scene" tab and see your object in a square dungeon room.
-You can use the node transform dialogue to stretch/compress your object from any angle. Although I always forget the exact process, Ive done it 4 or 5 times and still just go in and get my hands dirty till i re-figure it out. (For instance, wanting to make that throne a bit wider.)
Tidying up
Once you have your object textured, and positioned, you need to remember to do these things every time, before exporting.
-"Model" menu: "Recalculate Normals" and "Recalculate Tangents". Often after exporting, when you look at your object in game, the vertices are completely wrong. The object looks like a massive warphole made of miscolered spikes. You need to go back into GMT and recalculate the Norms and Tangents, then it will be fine.
-Saving. Another common issue is that when "saving as", it will not save as a .model file, even if the correct type is selected. For this reason I always manually type the .model into the filename. Meaning, instead of clicking "Save as" and naming it Throne, then clicking save, I name it Throne.model, then save.
Ill add to this as more things occur to me, and please, any and all suggestions/tips are welcome, Ill add them to the main post!
Hope it's helpful to some of you guys!
1. These tutorials were invaluable to me while learning blender. The guy is talented, descriptive, and he has an overlay that shows every command input for that quick trick he just did that you WANT TO KNOW HOW TO DO! I learned how to Rig a model for animation in half a night with this guy.
http://www.youtube.com/playlist?list=PL13FCE5A9EF9026CE
Edit: Remma reminded me that skuggasvein not only has a blender tutorial, but one where he imports an LoG object, manipulates it, then puts it back in LoG. You WANT to see this!
viewtopic.php?f=14&t=4043
And 2. John Wordsworth is a demi-god. He made for us, the ultimate super nifty, handy dandy, Grimrock Model Toolkit (GMT). You will need this for converting your files, and to fix a couple of common errors before exporting.
viewtopic.php?f=14&t=3325&hilit=Grimrock+Model+Toolkit
Blender: Always finalize any model by switching from "object" mode to "Edit" mode,then select the "Mesh" menu near the bottom, find "Vertices" and select "Remove doubles".Generally try to export as an .obj file, they are quite compatible with GMT's "Assimp importer", which will keep all of your nodes intact. do not worry about proper scaling here, GMT handles it superbly. In fact, you may find it a useful strategy to balloon the model in blender for detail work, and scale it in GMT, where you can get frames of reference for the object.
GMT: Here it is simple, but there are a few things you need to make sure and do here before exporting.
This is where you will apply your textures also. If you need multiple textures, select the proper node in the right hand drop down menu.
Texturing tips
1. Top Menu bar "Tools", then Find/Replace material. If there are multiple nodes, the order they appear in will match the nodes dropdown menu starting at node 3. meaning 1st, second, third in find/replace; would equal 3,4,5 in nodes menu. The selected node will highlight in red to help you out. Also, goto "settings" here under "tools" to point GMT to your Asset Pack, and your custom textures folder, then "reload materials library". This will populate your available textures menu.
Edit: For custom textures, you must make an LoG object script in your "materials.lua" file for GMT to find it and populate with it. ALSO, very important: Your texture must be in the correct ".dds" format, but be referred to as ".tga" in the materials.lua. So while you are using "lampshade.dds" for the texture, in the lua definition you will refer to it as "lampshade.tga". No time to explain or make sense of it, just accept it and follow suit. It will work!
Translating/Scaling
On the bottom right are input boxes for moving, rotating, and changing the size of the model. You will usually want to select Node 2:Main Object if using the assimp importer. You will know because the entire model will highlight red. Translations are done by a scale of 3= One Tile in the dungeon. The 3 boxes represent the Axis's (Axi?) in 3d space. So if you input a 1 in the middle box (Y axis) and click translate, your object will move a third of a square up. -1 and it will move down. You need these if you need to say, rotate a throne and push it back against the wall. Scaling is done as 1 = 100%, not of the original size, but of the current size. So no matter how much youve manipulated it, .5 will always be half the current size, and 2 will always be double current size.
Random tips (More to add on everyones suggestions!)
-You can goto the "Scene" tab and see your object in a square dungeon room.
-You can use the node transform dialogue to stretch/compress your object from any angle. Although I always forget the exact process, Ive done it 4 or 5 times and still just go in and get my hands dirty till i re-figure it out. (For instance, wanting to make that throne a bit wider.)
Tidying up
Once you have your object textured, and positioned, you need to remember to do these things every time, before exporting.
-"Model" menu: "Recalculate Normals" and "Recalculate Tangents". Often after exporting, when you look at your object in game, the vertices are completely wrong. The object looks like a massive warphole made of miscolered spikes. You need to go back into GMT and recalculate the Norms and Tangents, then it will be fine.
-Saving. Another common issue is that when "saving as", it will not save as a .model file, even if the correct type is selected. For this reason I always manually type the .model into the filename. Meaning, instead of clicking "Save as" and naming it Throne, then clicking save, I name it Throne.model, then save.
Ill add to this as more things occur to me, and please, any and all suggestions/tips are welcome, Ill add them to the main post!
Hope it's helpful to some of you guys!