Model textures
Model textures
I'm adding a few items of my own to my dungeon. i've got the models and everything else working but before you pick the item up it looks like a grey blank model on the floor. i can't find anywhere how to fill the model with anything. any help?
I smell you, i do! You GRADUNK! No be hiding on TORGAL!
Re: Model textures
There are three ways that I know of:
First, in your 3D modeler you simply name the assigned material(s) to match your defined materials in the game.
Second, you can use Dr. John's 'Grimrock Model Toolkit' to assign the material names; (if the model has only one material).
Edit:
First, in your 3D modeler you simply name the assigned material(s) to match your defined materials in the game.
Second, you can use Dr. John's 'Grimrock Model Toolkit' to assign the material names; (if the model has only one material).
Edit:
SpoilerShow
Third, (and only for Grimrock 2), you can assign [defined] materials at runtime in the game via script. [Use this as last resort]
Alternatively you can also use:
This allows you to assign more than one material by overriding the preexisting material names ~that the model must already have.
* This option has side effects. The frozen monster effect will not respect an overridden material, and will restore the default one listed in the model when done.
Code: Select all
yourCustomModel.model:setMaterial("mod_assets/texture/custom_material.tga") << note that in the script it must say .TGA, but it must actually BE a .DDS file.
Code: Select all
yourCustomModel.model:setMaterialOverrides { [first material name] = "mod_assets/texture/first_material.tga", [second material name] = "mod_assets/texture/second_material.tga", }
This allows you to assign more than one material by overriding the preexisting material names ~that the model must already have.
* This option has side effects. The frozen monster effect will not respect an overridden material, and will restore the default one listed in the model when done.
Last edited by Isaac on Wed Jan 25, 2017 9:55 am, edited 1 time in total.
Re: Model textures
Grimrock 1 subforum, brahIsaac wrote:Third, and lastly, you can assign [defined] materials at runtime in the game via script. [Use this as last resort]Alternatively you can also use:Code: Select all
yourCustomModel.model:setMaterial("mod_assets/texture/custom_material.tga") << note that in the script it must say .TGA, but it must actually BE a .DDS file.
Code: Select all
yourCustomModel.model:setMaterialOverrides { [first material name] = "mod_assets/texture/first_material.tga", [second material name] = "mod_assets/texture/second_material.tga", }
This allows you to assign more than one material by overriding the preexisting material names ~that the model must already have.
* This option has side effects. The frozen monster effect will not respect an overridden material, and will restore the default one listed in the model when done.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Model textures
minmay wrote:Grimrock 1 subforum, brah
*A simple theme change between the two would end this problem.
@Gradunk
You can only use options #1 & #2.
Re: Model textures
Thanks guys. i can find all the mats on johns model toolkit but it won't actually attach to the item. i must be doing something wrong here.
I smell you, i do! You GRADUNK! No be hiding on TORGAL!
Re: Model textures
The materials need to be defined in the game, or in the mod's scripts folder. All that's required (beyond that) is that the model have the correct name of its texture.Gradunk wrote:Thanks guys. i can find all the mats on johns model toolkit but it won't actually attach to the item. i must be doing something wrong here.
In GMT, you must select the mesh node for the model [it highlights the figure in red], and choose/assign the material name, and press the Set Material button; then save a copy of the the model.
*This can be done from the Tools menu as well.
As example:
Code: Select all
defineMaterial{
name = "tunnel_ogre",
diffuseMap = "mod_assets/textures/monsters/ogre_clown_dif.tga",
specularMap = "assets/textures/monsters/ogre_spec.tga",
normalMap = "assets/textures/monsters/ogre_normal.tga",
doubleSided = true,
lighting = true,
alphaTest = true,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 0,
depthBias = 0,
}
- Zo Kath Ra
- Posts: 931
- Joined: Sat Apr 21, 2012 9:57 am
- Location: Germany
Re: Model textures
best weapon everIsaac wrote:
Re: Model textures
I'm kicking myself for forgetting all this... I've gotten all the scripting done for my items now but i don't have specular or normal maps of the items to reference. what do i save those files from?
I smell you, i do! You GRADUNK! No be hiding on TORGAL!
Re: Model textures
Most of the game's assets are available in the asset pack. http://www.grimrock.net/modding_log1/asset-pack/Gradunk wrote:I'm kicking myself for forgetting all this... I've gotten all the scripting done for my items now but i don't have specular or normal maps of the items to reference. what do i save those files from?
They squeak when they walk.Zo Kath Ra wrote:best weapon ever
Re: Model textures
ok so ive gotten everything except 2 working properly now. and i don't know why they wont work cause they aren't any different.
Those 2 dont work... but
this one does... whats the difference. i have the diffuse map in the same file i can look at them with gimp etc...
i'm not getting error messages upon testing so i know it's finding the files etc...
I've also noticed how this is a Grimrock 1 forum... but i'm transferring my items to grimrock 2... trying to at least
Code: Select all
defineMaterial{
name = "damned_helmet",
diffuseMap = "mod_assets/textures/damned_skull_dif.tga",
doubleSided = true,
lighting = true,
alphaTest = true,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 50000000,
depthBias = 0,
}
defineMaterial{
name = "damned_shield",
diffuseMap = "mod_assets/textures/shield_damned_dif.tga",
doubleSided = true,
lighting = true,
alphaTest = true,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 50000000,
depthBias = 0,
}
Code: Select all
defineMaterial{
name = "damned_sword",
diffuseMap = "mod_assets/textures/damned_sword_dif.tga",
doubleSided = true,
lighting = true,
alphaTest = true,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 50000000,
depthBias = 0,
}
i'm not getting error messages upon testing so i know it's finding the files etc...
I've also noticed how this is a Grimrock 1 forum... but i'm transferring my items to grimrock 2... trying to at least
I smell you, i do! You GRADUNK! No be hiding on TORGAL!