material / material override?

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: material / material override?

Post by minmay »

AndakRainor, I can't reproduce your problem at all. Does your sx_town_window_light material use a shader or blend mode that doesn't work in low rendering quality? As of 2.2.4 reflections are mostly rendered as if rendering quality was set to Low.
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.
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: material / material override?

Post by AndakRainor »

Here are my two materials:

Code: Select all

defineMaterial{
  name = "sx_town_window",
  diffuseMap = "mod_assets/sx_town/textures/sx_town_window_dif.tga",
  specularMap = "mod_assets/sx_town/textures/sx_town_window_spec.tga",
  normalMap = "mod_assets/sx_town/textures/sx_town_window_normal.tga",
  doubleSided = false,
  lighting = true,
  alphaTest = false,
  blendMode = "Opaque",
  textureAddressMode = "Wrap",
  glossiness = 150,
  depthBias = 0,
}

defineMaterial{
  name = "sx_town_window_light",
  diffuseMap = "mod_assets/sx_town/textures/sx_town_window_dif.tga",
  emissiveMap = "mod_assets/sx_town/textures/sx_town_window_emi.tga",
  specularMap = "mod_assets/sx_town/textures/sx_town_window_spec.tga",
  normalMap = "mod_assets/sx_town/textures/sx_town_window_normal.tga",
  doubleSided = false,
  lighting = true,
  alphaTest = false,
  blendMode = "Opaque",
  textureAddressMode = "Wrap",
  glossiness = 150,
  depthBias = 0,
}
So it seems the problem comes from the use of emissiveMap!
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: material / material override?

Post by minmay »

Yep, that'll do it. Emissive maps and emissive colors won't have an effect with Low render quality. Really wish the reflection thing was a config option :(
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.
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: material / material override?

Post by AndakRainor »

I tried without the emissive map, but with the emissive texture replacing the diffuse one. It works if I use lighting = false (but with those parameters my texture is then a little too bright compared to the emissive rendering I had... I will need to change it a bit).

A not so cool side effect is that I loose the glossiness which felt good for a window.
Post Reply