Material issue (normal map)
Material issue (normal map)
Hello there,
First, nice to meet you, I'm Noadasi, 2D/3D artist.
When I saw that I could mod Legend of Grimrock, I was like "Ooooh !" and when I tried to create new assets to the game (I want to make a complete new set of walls, floors etc etc) I was very happy to come as far as I can, that mean, creating new models, new textures, make them usable in game. But I'm stuck !
I have a peculiar issue, when I script my materials for my floor and wall (currently I have one model for the floor and one for the walls, if I can solve my problem I plan to do a set of three of each plus one extra that can appear less frequently, I hope my dungeon will look less repetitive in the future) my diffuse and specular maps appear correctly but not my normal map.
It's strange because the first version of the floor that I did just to test worked fine, but it's true that it was just a clone of the dungeon_floor_01. Now that I added some polygon, the normal map is no more than a fugitive eccho of the past and I miss it...
I tried many things, I thought it could come from a wrong preset in the DDS files conversion so I tried different versions... Didn't work. I thought the size of the picture could be a problem so I scaled it down to 512*512 but that didn't change a thing. I thought I made a mistake writting my material script but I checked it again and again, rewritting it, saving it and reloading the project... With the very good result of becoming each time a little more crazy.
It's just strange to me because the editor do not detect any mistake in the code, so logically it find the normal map. And what is more strange is that he has absolutelly no problem at all with the spec and dif maps. And I don't think it come from the density of polygon because I had this issue on my wall too, wich was a damnmonopolygonal planar.
I just checked it again, removing the dif and spec maps from the material just to leave the normal, my model is as flat as my little sister. Which is a tragedy. For my 3D model I mean... well, for my sis too maybe, that's not relevant anyway.
So if anyone here had the same issue than me and know how to make everything work, that would litterally make my day since I lost this entire saturday trying everything I could. Right now I'm a sad panda.
Also, can someone explain me (or give me a tuto, that work too) how to incorpore some lights to my 3D in game ? I want to try something !
For those of you who may ask some screenshot, I'm not sure that it's really helpfull, just imagine a brickwall flat and white without brick, color or bump. Seems like a white piece of plastic which is not very medieval.
But if you want to, I'll show you this plastic.
Regards.
First, nice to meet you, I'm Noadasi, 2D/3D artist.
When I saw that I could mod Legend of Grimrock, I was like "Ooooh !" and when I tried to create new assets to the game (I want to make a complete new set of walls, floors etc etc) I was very happy to come as far as I can, that mean, creating new models, new textures, make them usable in game. But I'm stuck !
I have a peculiar issue, when I script my materials for my floor and wall (currently I have one model for the floor and one for the walls, if I can solve my problem I plan to do a set of three of each plus one extra that can appear less frequently, I hope my dungeon will look less repetitive in the future) my diffuse and specular maps appear correctly but not my normal map.
It's strange because the first version of the floor that I did just to test worked fine, but it's true that it was just a clone of the dungeon_floor_01. Now that I added some polygon, the normal map is no more than a fugitive eccho of the past and I miss it...
I tried many things, I thought it could come from a wrong preset in the DDS files conversion so I tried different versions... Didn't work. I thought the size of the picture could be a problem so I scaled it down to 512*512 but that didn't change a thing. I thought I made a mistake writting my material script but I checked it again and again, rewritting it, saving it and reloading the project... With the very good result of becoming each time a little more crazy.
It's just strange to me because the editor do not detect any mistake in the code, so logically it find the normal map. And what is more strange is that he has absolutelly no problem at all with the spec and dif maps. And I don't think it come from the density of polygon because I had this issue on my wall too, wich was a damnmonopolygonal planar.
I just checked it again, removing the dif and spec maps from the material just to leave the normal, my model is as flat as my little sister. Which is a tragedy. For my 3D model I mean... well, for my sis too maybe, that's not relevant anyway.
So if anyone here had the same issue than me and know how to make everything work, that would litterally make my day since I lost this entire saturday trying everything I could. Right now I'm a sad panda.
Also, can someone explain me (or give me a tuto, that work too) how to incorpore some lights to my 3D in game ? I want to try something !
For those of you who may ask some screenshot, I'm not sure that it's really helpfull, just imagine a brickwall flat and white without brick, color or bump. Seems like a white piece of plastic which is not very medieval.
But if you want to, I'll show you this plastic.
Regards.
Re: Material issue (normal map)
have you model->recalculated tangents in GMT?
Re: Material issue (normal map)
Thank you sir ! Problem solved ! I didn't know I have to do that for new model, I guess I understand why now. But I found nothing about this so because of your help, this day is not a waste ! And about the light in game ? Can you tell me ?
Anyway thanks again, now I can continue working
Anyway thanks again, now I can continue working
Re: Material issue (normal map)
There are several different kinds of light sources in Grimrock, all covered in the custom asset definition reference and scripting reference. First of all, the dedicated LightSource class:
In addition, the Monster class has four parameters for attaching a light to one of the nodes of the monster's model:LightSource:
- lightPosition: a 3d vector specifying the origin of the light source in entity’s local space.
lightRange: the range of the light source in meters.
lightColor: a 3d vector specifying the RGB color of the light source in range 0-1.
brightness: scales the intensity of the light source.
castShadow: a boolean which turns dynamic shadow rendering on and off.
flicker: a boolean which turns flickering effect on and off. Default is on.
particleSystem: (optional) name of a particle system to attach to the light source.
placement: must always be set to “floor”.
The FX class (used for particle emitters) can also be used as a light source:
- lightName: (optional) the node in the monster model for light attachment.
lightColor: (optional) a 3d vector specifying the color of the light carried by the monster.
lightBrightness: (optional) a scalar intensity of the light carried by the monster.
lightRange: (optional) the range of the light carried by the monster.
Of course, torches, healing crystals, a wielded Orb of Radiance, etc. will also emit light, but those lights aren't significantly customizable. Note that torches have more optimization than other light sources, so 4 torches are actually much less resource intensive than 4 custom light sources of similar strength and range. Be careful about how many lights you use in one place.FX:setLight(red, green, blue, brightness, range, time, castShadow)
Sets the light effect to be played when the FX is first updated. Red, green and blue define the color of the emitted light in range 0-1, brightness is light’s brightness typically in range 0-20, range is light’s range in world units (meters), time is the length of the effect in seconds, castShadow is a boolean flag which enables shadow casting for the light source. Large range and shadow casting can cause drops in frame rate.
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: Material issue (normal map)
If I understand your question correctly, in order to make a "light" emit from an object, first that object needs to have the characteristics of a light emitter in its script; AND ALSO needs to have the position set in the lights tab in GMT.Noadasi wrote:Thank you sir ! Problem solved ! I didn't know I have to do that for new model, I guess I understand why now. But I found nothing about this so because of your help, this day is not a waste ! And about the light in game ? Can you tell me ?
Anyway thanks again, now I can continue working
I did this within my unfinished captive wallset here: http://www.nexusmods.com/grimrock/mods/358/?
the script looks sort of like this
Code: Select all
defineObject{
name = "CaptiveLight001",
class = "LightSource",
model = "mod_assets/models/CaptiveLight001.fbx",
lightPosition = vec(0, 2.4, -1),
lightRange = 12,
lightColor = vec(0.7, 1, 0.7),
brightness = 3,
castShadow = true,
flicker = true,
placement = "wall",
editorIcon = 88,
}Re: Material issue (normal map)
I wanted to show you guys a little screenshot to thanks you for your help.
So here it is !

I need to do the roof and then I will have one element for each part of the landscape, even if the one you can see on the floor will be a uncommon one later. I also succeed to make some light (they are not in this scene) so thanks again for your support.
I'm very into this but unfortunatelly I lack some time so I'm doing this mod whenever I can, I may continue posting things if you're interested from time to time...
See you later
So here it is !
I need to do the roof and then I will have one element for each part of the landscape, even if the one you can see on the floor will be a uncommon one later. I also succeed to make some light (they are not in this scene) so thanks again for your support.
I'm very into this but unfortunatelly I lack some time so I'm doing this mod whenever I can, I may continue posting things if you're interested from time to time...
See you later
Re: Material issue (normal map)
That is cool! 
-
chaoscommencer
- Posts: 119
- Joined: Sun Jan 05, 2014 7:48 pm
Re: Material issue (normal map)
That looks really cool man. What is that floor supposed to be made of exactly?
Working on a dungeon that displays a massive collection of assets while sorting them into convenient reusable plugin format (concept from some of leki's mods). Will contribute some of my own models as well eventually and follow that with custom dungeon.
Re: Material issue (normal map)
Holy Hail, that is truly impressive! 3.41 Kudos given!
Currently conspiring with many modders on the "Legends of the Northern Realms"project.
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
