textures for Grim1/2

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
RayB
Posts: 140
Joined: Fri Mar 06, 2015 3:45 am

textures for Grim1/2

Post by RayB »

Ok. So I have created a simple model in blender and am able to get it into the Grimrock Model Toolkit but I can't figure out how to create the texture files. I have created and applied the texture in blender but I don't know how to create the dif, normal, and spec files needed for Legend of Grimrock. Can anyone steer me in the right direction?
User avatar
Isaac
Posts: 3172
Joined: Fri Mar 02, 2012 10:02 pm

Re: textures for Grim1/2

Post by Isaac »

Paint.Net saves native DDS image, and it's free. Gimp and Photoshop can do it with the Nvidia plugins. You can also do the work in Blender itself, using the texture paint tools.
http://www.getpaint.net

For the Normal map, you use Blender's Bake feature to create the image. Specular map is for how reflective the surface is. Black for none, white is for full gloss; and levels of gray for in between values.
Image Use Tangent mode for Grimrock 1.

For the diffuse color map, it should ideally just be the color with no shading, but because you will want to simplify the model as much as is seems passable, some [minor] shading can help with the fine details; [for things like dragon scales, buckles, chainmail links, or decorative trim on wood furniture...]. It is possible to use the Nvidia DDS plugin to convert a detailed color map into a reasonably decent normal map; and this can be used alone, or combined with the normal map baked in Blender, for better results.

To see it in game, you must define the material, and either assign it using the GMT, or you can assign empty materials in Blender that have the precise name of the material definitions you have in the game.

Two of many tutorials on Youtube.
https://www.youtube.com/watch?v=U7PQGgz1RII
https://www.youtube.com/watch?v=mU-cSUSR0Vs
Last edited by Isaac on Sun Oct 30, 2016 5:21 am, edited 1 time in total.
minmay
Posts: 2768
Joined: Mon Sep 23, 2013 2:24 am

Re: textures for Grim1/2

Post by minmay »

You mean you painted/generated the texture in Blender and want to bake it into 2D images for use in Grimrock materials, right? Check out https://www.blender.org/manual/render/b ... /bake.html and, if you use Cycles, https://www.blender.org/manual/render/c ... aking.html

For the diffuse map, you just need to select "Textures" (Blender Render) or "UV" (Cycles Render) for the Bake Type, then bake, save the image in an appropriate DDS format with mipmaps, and you're done. Unless your material has transparency. Due to a bug in Blender, if the material is transparent, you might get a completely transparent image when trying to bake the diffuse map, in which case you'll have to disable your transparency before baking, then bake the diffuse map, then bake the alpha and combine them.

The best way I know of to bake specular maps in Blender is...really stupid. None of the baking options will give you the specular values from the material (which is what you need). They just bake the specular pass from the render, which depends on the lights and shadows in your scene, which is useless for game textures...
Instead, you have to take your material, remove all the existing color influence, and change all the existing specular influences to color influences, then bake like you would bake a diffuse map. Then remove the color influences you just added, and re-add the ones you removed. I know it seems absolutely whack that there isn't a builtin way to bake specular maps in Blender, but I've looked for one and haven't found one.

For the normal map, use "Normal" bake mode (in Cycles, leave swizzle at the default +X +Y +Z) and make sure you select Tangent for the normal space! If you're using bitcpy's Blender exporter (which is what I recommend) you'll probably be baking your normal map with the game_matrix object present, in which case you need to remember to check "Transformed normal map" when exporting the model. If you're using the normal map in Grimrock 2, you need to convert the RGB normal map to Grimrock 2's format.
Isaac wrote:Specular map is for how reflective the surface is. Black for none, white is for full gloss; and levels of gray for in between values.
Grimrock specular maps also store the specular color, not just the specular intensity. They are not necessarily greyscale. Most of the Grimrock 2 specular maps have color.
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.
Post Reply