Page 1 of 2

texture advice needed

Posted: Thu Jan 17, 2013 5:11 pm
by odinsballs
i was currently trying to retexture various grimrock creatures, and am faced with the folowing issue :
i get my custom textures on the model and get it working in editor. but when i then proceed to test export and playtest, the whole game crashes upon loading my custom dungeon. this being related to the spec. and normal. textures from original being replaced with
spanky new texture layers. my question being :how do i set grimrock creature models to accept custom spec and normal map from different texture location. replacing the ones in grimrock asset folder doesn't come out properly, and changing texture assignments in script causes that one wopper of a crash. so if anybody has even the foggiest clue as how to fix this. help would be verry much appreciated. :)

example:

defineMaterial{
name = "entrail",
diffuseMap = "mod_assets/textures/monsters/entrail_dif.tga",
specularMap = "assets/textures/monsters/drain_tentacles_spec.tga",
normalMap = "assets/textures/monsters/drain_tentacles_normal.tga",
enviromentalmask = "mod_assets/textures/monsters/entrail_em.tga",
displacementmap = "mod_assets/textures/monsters/entrail_disp.tga",
occlusionmap = "mod_assets/textures/monsters/entrail_occ.tga",
doubleSided = false,
lighting = true,
alphaTest = true,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 10,
displacementscale = 10,
depthBias = 0,
}

the above one works without crash but doesn't look right
the one below works fine and looks even better in editor but crashes when exported and loaded. :


defineMaterial{
name = "entrail",
diffuseMap = "mod_assets/textures/monsters/entrail_dif.tga",
specularMap = "mod_assets/textures/monsters/drain_tentacles_spec.tga",
normalMap = "mod_assets/textures/monsters/drain_tentacles_normal.tga",
enviromentalmask = "mod_assets/textures/monsters/entrail_em.tga",
displacementmap = "mod_assets/textures/monsters/entrail_disp.tga",
occlusionmap = "mod_assets/textures/monsters/entrail_occ.tga",
doubleSided = false,
lighting = true,
alphaTest = true,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 10,
displacementscale = 10,
depthBias = 0,
}

:shock:

Re: texture advice needed

Posted: Thu Jan 17, 2013 5:17 pm
by hyteria
maybee you have to redefine all monsters to retexturize them , dunno

Re: texture advice needed

Posted: Thu Jan 17, 2013 5:23 pm
by odinsballs
i dont get it with wallasaurus's mummy and slug these scripts worked just fine all layers working (but those are completely custom).
am i missing something in gt perhaps?.

Re: texture advice needed

Posted: Thu Jan 17, 2013 5:55 pm
by Phitt
I think these do nothing in Grimrock, so it would be best to delete them (both the entries and the files):

enviromentalmask = "mod_assets/textures/monsters/entrail_em.tga",
displacementmap = "mod_assets/textures/monsters/entrail_disp.tga",
occlusionmap = "mod_assets/textures/monsters/entrail_occ.tga",

displacementscale = 10,

Other than that I see nothing wrong with it, so if deleting the lines above doesn't help it must be something wrong with the dds files you use for spec and normal map.

Re: texture advice needed

Posted: Thu Jan 17, 2013 6:12 pm
by odinsballs
wel the disp.layer actually does work ingame ofcourse only with matching/corresponding normalmap from same generating utility.
its most defenitly got something to do with spec and normal (i got em in the right format dxt5 i believe) and as i said in the editor its all good but when exported its giving me the finger. :?

Re: texture advice needed

Posted: Thu Jan 17, 2013 6:21 pm
by Phitt
odinsballs wrote:wel the disp.layer actually does work ingame ofcourse only with matching/corresponding normalmap from same generating utility.
its most defenitly got something to do with spec and normal (i got em in the right format dxt5 i believe) and as i said in the editor its all good but when exported its giving me the finger. :?
I can hardly believe that (the formatting is different from everything else in the lua definitions and it's not mentioned on the asset reference page, neither is it used anywhere in the game - so where does it come from?), but I guess I should test it before I say anything wrong. It would certainly be cool if it did work.

Anyway, no idea why else it shouldn't work. I guess your textures are a power of 2 (though I heard that doesn't even matter in Grimrock)? If nothing helps upload the textures so we can have a look at them.

Re: texture advice needed

Posted: Thu Jan 17, 2013 7:10 pm
by odinsballs
i'll tinker about a bit more (and actually finish the cut n paste texture ) if i fail i wil most certainly upload texture for examination,
otherwise i'll have to stick with replacing normals and spec in gr asset pack in combination with xtra layers in mod_assets. ( i might have replaced the wrong normal and spec) who knows i realy like this game but modding it is no easy task.

Re: texture advice needed

Posted: Thu Jan 17, 2013 8:49 pm
by Sutekh
When you say you replace things in the asset pack, do you literally mean just that - replacing the assets within the pack itself? Or am I just reading it wrong? I ask because the asset pack is purely a resource to copy things from, and does not have any affect on the game itself.

Re: texture advice needed

Posted: Thu Jan 17, 2013 9:14 pm
by Komag
no literal replacing, just copy the properties or other items (like models), into the script files or folders for YOUR dungeon

Re: texture advice needed

Posted: Fri Jan 18, 2013 12:36 am
by odinsballs
the replacement in the asset pack was just another attempt to get my customized tentacle normal functioning. i replaced the diffuse the way it was explained in one o' them tutorials (replace material function for model). and got my custom texture to work. but problem that remains is that the base model i replaced material on won't accept normal and spec from other directory then gr asset pack directory. as for the other texture layers i don't exactly know if they're completely functional, but i do know these are not the cullpritt (if not functional they be no more then a few harmless lines of non-influential script, more of an experiment anyway). are there any material nodes or such that i'm missing at this point.