Page 1 of 1

Red slime problem

Posted: Fri Apr 26, 2013 12:44 am
by Torquemada
I am trying to make red slime as opposed to the predefined green slime. The red slime should look identical to the green one except it should be red. I followed guide at http://grimwiki.net/wiki/Model_Retexturing_Tutorial it worked except my red slime isn't red at all. Infact it isn't translucent anymore. When you look at the original green slime it has greenish translucent cover that gives it it's color but that cover is missing in my model, all that remains is the opaque lightbrownish mass, which makes it look more like a lump of clay instead of slime.

Image

I must be missing something because even if I make a copy of the original model and make it reference my custom material which has the same attributes as the original the results are still the same i.e opaque clay instead of slime.

Does anyone have any idea how to do this?

Re: Red slime problem

Posted: Fri Apr 26, 2013 2:17 am
by Komag
Neikun made a zillion slimes already, maybe one of them would suit you?

Re: Red slime problem

Posted: Fri Apr 26, 2013 2:20 am
by Leki
green slime uses hardcoded shader - like healing crystal (you can try to change material in GMT from green_slime to healing_crystal to see effect).
If you want red one - try to change material in GMT from green_slime to zhandul_orb and then in your monster script definition change light vectot from (0,2.0) to (2,0,0) to get red light. As you can see, you have red slime, but without "slime shader effect".
zhandul_orb uses red texture - it's just to see difference between slime shader and "simple material" - it does not fit 100% on slime - you can make your own "red texture", based on green_slime.dds

Re: Red slime problem

Posted: Fri Apr 26, 2013 2:26 am
by Neikun
True enough the green slime uses a custom shader. Your best bet is to give it the red_gem material, (Better than zhandul_orb because it has a custom shader too) and just change it's light.
http://grimrock.nexusmods.com/mods/49
My custom slimes.
I have another pack in progress, but it'll be a little while longer before I can release it.

Re: Red slime problem

Posted: Fri Apr 26, 2013 2:42 am
by Grimfan
Yeah, I'm going to put in a mention for Neikun's slimes. They are very very good and include a great red slime!

Re: Red slime problem

Posted: Fri Apr 26, 2013 3:43 am
by Neikun
I don't even remember if I made the red slime with a light. o:

EDIT: I did indeed. but unlike green_slime, red_gem isn't exceptionally translucent.
Also, you're going to want to add the slime's normal map to the red_gem materials definition.
But bear in mind that will have some impact on the red_gem item.

Code: Select all

defineMaterial{
	name = "red_gem",
	diffuseMap = "assets/textures/env/red_gem_shadetex.tga",
	specularMap = "assets/textures/common/white.tga",
	normalMap = "assets/textures/monsters/green_slime_normal.tga",
	doubleSided = false,
	lighting = true,
	alphaTest = false,
	blendMode = "Opaque",
	textureAddressMode = "Wrap",
	glossiness = 20,
	depthBias = 0,
}
Place this in your red_slime monster definition

Code: Select all

	lightName = "capsule",
	lightColor = vec(2.0, 0.0, 0.0),
	lightBrightness = 5,
	lightRange = 3,
You should end up with something like this:
SpoilerShow
Image

Re: Red slime problem

Posted: Sun Apr 28, 2013 1:37 am
by Torquemada
What I did is make a new model and have it reference a new custom material which is a copy of red_gem, that way I don't have to change red_gem material. It looks ok except it does not have translucent cover and it does not glow in dark like the green slime.

Image

Re: Red slime problem

Posted: Sun Apr 28, 2013 5:08 am
by Neikun
Don't make a copy of the red gem material.
You won't notice a difference on the gem, but it makes a huge difference for the slime.
Trust me.
Take the material definition I provided, and place it as is in your materials.lua

What it is gaining from this that the red slime in the pack does not, is the slime's normal map.
Like I sad before, you won't notice it on the gem item at all.

Re: Red slime problem

Posted: Sun Apr 28, 2013 11:36 pm
by Torquemada
That made all the difference, however I had come to the conclusion that the slime shouldn't glow anyway, it was supposed to be a living puddle of blood :)
Had to rework the hit_slime.dds too since when hitting the slime produces green splatters.