Shadowgate 2014 "Inspired" (Resource Pack)

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!
kelly1111
Posts: 321
Joined: Sun Jan 20, 2013 6:28 pm

Re: Shadowgate 2014 "Inspired" (Resource Pack)

Post by kelly1111 » Wed Jul 24, 2019 12:16 pm

Those crystal beds look neat. Someone is going to puncture there leather boots on them for sure...
Love how you created the lava edges to make the stuff more random and less square ...
Praying to the grimrock gods for release of this asset pack !

User avatar
vanblam
Posts: 243
Joined: Sun Nov 09, 2014 12:15 am

Re: Shadowgate 2014 "Inspired" (Resource Pack)

Post by vanblam » Wed Jul 24, 2019 8:42 pm

I had to remove the custom shader from the crystals, for some reason on the new crystals that I set up, the normal map gets removed . I tried everything I could think of to get it to work. On the ceiling crystals the normal map works fine with the custom shader, So I tried turning the new ones upside down in a ceiling position (I know this shouldn't do anything, well it didn't lol). I tired recalculating the tangents and normals, I tried flipping the normals( just to see if it had an effect). I even set a "Normal Center" in blender and that also had no effect( tired many posistions on the normal center). Nothing seems to work, but once I remove the custom shader the normal map works just fine. Has anyone else ran into this issue?

minmay
Posts: 2657
Joined: Mon Sep 23, 2013 2:24 am

Re: Shadowgate 2014 "Inspired" (Resource Pack)

Post by minmay » Thu Jul 25, 2019 12:11 am

If this is the "crystal" shader you're talking about, that shader only uses the normal map in its effect if you have lighting = true in the material definition (despite the shader ignoring all actual lighting). If lighting = false then it ignores the normal map.
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
vanblam
Posts: 243
Joined: Sun Nov 09, 2014 12:15 am

Re: Shadowgate 2014 "Inspired" (Resource Pack)

Post by vanblam » Thu Jul 25, 2019 5:02 am

minmay wrote:
Thu Jul 25, 2019 12:11 am
If this is the "crystal" shader you're talking about, that shader only uses the normal map in its effect if you have lighting = true in the material definition (despite the shader ignoring all actual lighting). If lighting = false then it ignores the normal map.
That's what I thought the shader used, that's why its confusing me :P. Both of the objects ( original ceiling crystal and the new one) use the same material, one works fine and the other does not. They have the same exact settings in the object definition as well. Because they are an FBX import it might just be the model, that's the only other thing I can think of that might be the problem.

User avatar
vanblam
Posts: 243
Joined: Sun Nov 09, 2014 12:15 am

Re: Shadowgate 2014 "Inspired" (Resource Pack)

Post by vanblam » Thu Jul 25, 2019 5:12 am

Here is with the shader OFF

Image

And with the shader ON

Image

If you open them in a new tab you can zoom in and see that the normal map is not working on the floor crystals.

EDIT: To be honest I kind of like them without the shader, I adjusted the emissive map to have a little more brightness and contrast, it looks pretty good :)

minmay
Posts: 2657
Joined: Mon Sep 23, 2013 2:24 am

Re: Shadowgate 2014 "Inspired" (Resource Pack)

Post by minmay » Thu Jul 25, 2019 9:19 am

Um...those show it "not working" on both the floor and ceiling crystals, as far as I can tell. I don't suppose you'd be willing to share the material definitions or object definitions or anything so that it's possible to actually help you?

Do note that the effect of a normal map is different with the "crystal" shader vs. no shader (or a shader that uses actual lighting), since, again, the "crystal" shader ignores light. Instead the normal map modifies the normals for the purposes of "reflecting" the shadeTex.

It does look to me like your floor crystal model has most of its triangles separated and the ceiling one doesn't, resulting in flat shading behaviour. Perhaps you didn't mean to do this?
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
vanblam
Posts: 243
Joined: Sun Nov 09, 2014 12:15 am

Re: Shadowgate 2014 "Inspired" (Resource Pack)

Post by vanblam » Fri Jul 26, 2019 1:23 am

Yea I should have given the details, sorry about that.
The image shows with the shader active, with a closer view. Both models are set to smooth with most the edges set to sharp.

Image

The Material
SpoilerShow

Code: Select all

defineMaterial{
	name = "rc_crystal_3",
	diffuseMap = "mod_assets/vanblam/red_cave/textures/env/rc_crystal_3_dif.tga",
	specularMap = "mod_assets/vanblam/red_cave/textures/env/rc_yellow_orange.tga",
	emissiveMap = "mod_assets/vanblam/red_cave/textures/env/rc_crystal_3_emissive.tga",
	normalMap = "mod_assets/vanblam/red_cave/textures/env/rc_crystal_3_normal.tga",
	doubleSided = false,
	lighting = true,
	ambientOcclusion = false,
	alphaTest = false,
	blendMode = "Opaque",
	textureAddressMode = "Wrap",
	glossiness = 100,
	depthBias = 0,
	
	shader = "crystal",
	shadeTex = "mod_assets/vanblam/red_cave/textures/env/rc_crystal_shadetex3.tga",
	shadeTexAngle = 0,
	crystalIntensity = 4,
	onUpdate = function(self, time)
		self:setParam("shadeTexAngle", time*0.2)
	end,
}
The ceiling crystal object definition
SpoilerShow

Code: Select all

defineObject{
	name = "rc_ceiling_crystal",
	baseObject = "base_floor_decoration",
	components = {
		{
			class = "Model",
			model = "mod_assets/vanblam/red_cave/models/env/rc_ceiling_crystal_base.fbx",
			staticShadow = true,
		},
		{
			class = "Light",
			name = "crystal_light_big",
			offset = vec(0, 2.31, 0.62),
			range = 9,
			color = vec(1, 0.08, 0),
			brightness = 10,
			castShadow = true,
			staticShadows = true,
			shadowMapSize = 256,
			onUpdate = function(self)
				local noise = math.noise(Time.currentTime()*3 + 123) * 0.5 + 0.9
				self:setBrightness(noise * 10)
			end,
		},
		{
			class = "Light",
			name = "crystal_light_small01",
			offset = vec(0, 1, 062),
			range = 5,
			color = vec(0.75, 0.09, 0),
			brightness = 4,
			castShadow = true,
			fillLight = true,
		},
		{
			class = "Model",
			name = "crystal",
			model = "mod_assets/vanblam/red_cave/models/env/rc_ceiling_crystal.fbx",
			staticShadow = false,
			castShadow = false,
		},
		{
				class = "Particle",
				particleSystem = "rc_crystal",
				emitterMesh = "mod_assets/vanblam/red_cave/models/env/rc_ceiling_crystal.fbx",
		},
	},
	editorIcon = 88,
	tags = { "red cave", "vanblam", "light" },
}
The large crystal bed object definition
SpoilerShow

Code: Select all

defineObject{
	name = "rc_large_crystals_bed_1x1",
	baseObject = "base_floor_decoration",
	components = {
		{
			class = "Model",
			model = "mod_assets/vanblam/red_cave/models/env/rc_large_crystals_bed_1x1.fbx",
			staticShadow = false,
			castShadow = false,
		},
		{
			class = "Model",
			name = "ground",
			model = "mod_assets/vanblam/red_cave/models/env/rc_large_crystals_bed_1x1_ground.fbx",
			staticShadow = true,
		},
		{
			class = "Light",
			name = "light01",
			offset = vec(0, 1, 0),
			range = 7,
			color = vec(1, 0.15, 0),
			brightness = 9,
			castShadow = false,
		},
		{
			class = "Obstacle",
			hitSound = "impact_blunt",
		},
		{
				class = "Particle",
				particleSystem = "rc_crystal",
				emitterMesh = "mod_assets/vanblam/red_cave/models/env/rc_large_crystals_bed_1x1.fbx",
		},
	},
	editorIcon = 168,
	tags = { "red cave", "vanblam", "light" },
}

minmay
Posts: 2657
Joined: Mon Sep 23, 2013 2:24 am

Re: Shadowgate 2014 "Inspired" (Resource Pack)

Post by minmay » Fri Jul 26, 2019 1:54 am

Thanks, I can see the difference now. Unfortunately I don't think I can figure out what's causing the problem without looking at the floor crystal model file; would you be willing to share that as well?
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
vanblam
Posts: 243
Joined: Sun Nov 09, 2014 12:15 am

Re: Shadowgate 2014 "Inspired" (Resource Pack)

Post by vanblam » Sat Jul 27, 2019 1:10 am

Thanks to minmay I was able to solve the problem. If anyone else is having that issue, make sure in blender you apply the proper scale to your model, which is 1 to 1. Mine was set to 0.01 lol, I usually remember to do that, but I forgot on this one. Again thank you minmay.

User avatar
vanblam
Posts: 243
Joined: Sun Nov 09, 2014 12:15 am

Re: Shadowgate 2014 "Inspired" (Resource Pack)

Post by vanblam » Mon Jul 29, 2019 9:27 pm

I added a structural addition to the cave system if you wish to use it. Created a stone style ceiling and placed in a ceiling lantern as well.

Image

Post Reply