Page 44 of 74

Re: [WIP] Grimrock Model Tookit

Posted: Fri Nov 09, 2012 7:42 pm
by Phitt
JohnWordsworth wrote:Hi Phitt, just to confirm - in the screenshot it looks like you are using the Mines tileset. Do you get the same effect if you re-texture one of the default wallsets with the same map? I just want to 100% rule out the possibility that the import process isn't messing with any UV coordinates or anything.
I switched the texture on a floor tile from the original dungeon tileset and it's the same. That was actually the 'false alarm' I wrote about earlier. At first I only looked at my mine tiles and thought the normals still behave wrong, but after switching the texture on the original tile I realized that's how it is in Grimrock. So at first I was satisfied, but I still noticed strange behavior on my 'real' textures. The small rocks on the ground texture for example look like they're facing inwards under certain light conditions (same as on the test screenshot, if you look from west to east it is correct, if you look from north so south it is inverted - and is a mix of wrong and right in between). Personally I think it may be a bug with the engine, but I don't want to scream too loud since I don't know anything about the inner workings of graphic engines and normal map behavior.

EDIT: Uploaded my test assets here:

http://www.file-upload.net/download-679 ... es.7z.html

An original dungeon set floor tile with the material switched (tangent space not altered in any way) and the textures as well as material and object definitions. You can extract this directly into your mod folder and you're good to go, but be careful - the object and material definitions will overwrite any existing ones, so only use with a new test mod (and not any serious mod you may be working on).

If you could confirm there is something weird going on (or explain why I'm wrong and everything works as it should) I'd appreciate it.

EDIT2: I put my test texture on a model in Elder Scrolls:Oblivion and it behaves like I thought it should behave - the shadow is always at the side of the dot not facing the light source. So either something really weird is going on with my setup or it is a bug:
SpoilerShow
Image

Re: [WIP] Grimrock Model Tookit

Posted: Fri Nov 09, 2012 9:56 pm
by petri
Could you try flipping the X and/or Y axis of your normal maps? (inverting red channel flips X channel, inverting green channel flips Y). Maybe the program you used to bake the normal map uses a different handedness.

Re: [WIP] Grimrock Model Tookit

Posted: Fri Nov 09, 2012 10:41 pm
by Phitt
petri wrote:Could you try flipping the X and/or Y axis of your normal maps? (inverting red channel flips X channel, inverting green channel flips Y). Maybe the program you used to bake the normal map uses a different handedness.
Great, that worked! Inverting the y axis results in a correct normal map. I use the nvidia dds plugin for Photoshop to create the normal maps (no baking I fear, but I spend some time tweaking the desaturated texture layers to get a decent result from the image at least). There is an option 'invert y' when you enable the normal map filter, maybe good to know for other people using it as well.

Thanks!

Re: [WIP] Grimrock Model Tookit

Posted: Fri Nov 09, 2012 11:14 pm
by Isaac
Phitt wrote:Great, that worked! Inverting the y axis results in a correct normal map. I use the nvidia dds plugin for Photoshop to create the normal maps (no baking I fear, but I spend some time tweaking the desaturated texture layers to get a decent result from the image at least). There is an option 'invert y' when you enable the normal map filter, maybe good to know for other people using it as well.

Thanks!
That IS good to know. I use the plug-in in combination with baking, and it would be havok to not realize that one of the channels was possibly flipped.

Re: [WIP] Grimrock Model Tookit

Posted: Sat Nov 10, 2012 1:53 am
by Batty
I lose the lighting on objects that I move through Blender even with no changes to the model.

I load in GMT, export as .obj, import in Blender, scale down to .01, export as .obj then import and save as .model in GMT.

You can see on the altar here, top one is unmolested altar & bottom one went through Blender as .obj. You can see it becomes bright & dull and loses the lighting around the edges, cracks, and the relief. I tested other objects & tried different positions, but same results. It doesn't happen if I load a .model in GMT, change position of the model & then save as .model, everything is fine. Converting it to .obj seems to cause it.

Image
Image
Is there something I can do to prevent this? It's more pronounced on other objects, especially metal ones. Thanks for any help, the new GMT features are excellent.

Re: [WIP] Grimrock Model Tookit

Posted: Sat Nov 10, 2012 2:01 am
by Phitt
Batty wrote:I lose the lighting on objects that I move through Blender even with no changes to the model.
Use model>recalculate tangents in the toolkit, that should fix your issue.

Re: [WIP] Grimrock Model Tookit

Posted: Sat Nov 10, 2012 2:16 am
by Batty
Oh thanks! That was it, so simple. :D

Re: [WIP] Grimrock Model Tookit

Posted: Sat Nov 10, 2012 10:00 am
by Wolfen
I'm still unable to get a "custom" pressure plate to work. I am only trying to re-use the current animations. Is this still not supported in GMT or do I need to keep experimenting to get it to work eventually?

Re: [WIP] Grimrock Model Tookit

Posted: Sat Nov 10, 2012 10:17 am
by Phitt
Wolfen wrote:I'm still unable to get a "custom" pressure plate to work. I am only trying to re-use the current animations. Is this still not supported in GMT or do I need to keep experimenting to get it to work eventually?
It's perfectly possible, though the pressure plate behaves weirdly. But basically all you have to do is export a model with two meshes - the floor and the plate. Name the floor anything you like, the pressure plate needs to be named 'pressure_plate'. Plus the pressure plate needs to be rotated by -90° along the x axis. Don't export as obj as object will not create the nodes needed (at least when I export from 3ds max, maybe it's different in Blender - I export as ASE). Then you need to link the floor node to the root node, update. Change the root node's rotation by 90° along the x axis. Finally change the rotation of the root animation node (the one the pressure_plate node is linked to) by 180° along the x axis. In my case this results in a model that looks wrong in the toolkit (pressure plate is rotated), but looks and behaves right in game.

Re: [WIP] Grimrock Model Tookit

Posted: Sat Nov 10, 2012 10:29 am
by Wolfen
Phitt wrote:
Wolfen wrote:I'm still unable to get a "custom" pressure plate to work. I am only trying to re-use the current animations. Is this still not supported in GMT or do I need to keep experimenting to get it to work eventually?
It's perfectly possible, though the pressure plate behaves weirdly. But basically all you have to do is export a model with two meshes - the floor and the plate. Name the floor anything you like, the pressure plate needs to be named 'pressure_plate'. Plus the pressure plate needs to be rotated by -90° along the x axis. Don't export as obj as object will not create the nodes needed (at least when I export from 3ds max, maybe it's different in Blender - I export as ASE). Then you need to link the floor node to the root node, update. Change the root node's rotation by 90° along the x axis. Finally change the rotation of the root animation node (the one the pressure_plate node is linked to) by 180° along the x axis. In my case this results in a model that looks wrong in the toolkit (pressure plate is rotated), but looks and behaves right in game.
-scratching head-
Wow... that's a lot of hoop jumping haha. I do export as ase since the new import tool was put into GMT (3ds max here as well). It seems to me where the problem is, is all these extra rotations I am seeing you doing. When I import into GMT, the model of course looks right, but as soon as I see it with an animation preview it just disappears. Anyways, Ill give your notes a try sometime this weekend. Thanks for the input!