Page 1 of 1

Lightmap + specular?

PostPosted: Thu Sep 03, 2015 5:46 am
by Aloys
Has anyone tried to make a material that uses both a lightmap and a specular highlight?

How do you set a material to use a lightmap and not have its diffuse be affected by the lights in the scene, and yet have it use those same lights to pick up a specular highlight? I'm sort of stumped by this right now.. :shock:
I need this for my Myst island project which is using Unity, but I now I'll be needing this for Uru too.. Unity can solve this in various ways, if only through custom written shaders, but in plasma I haven't yet found how.

I'm not at home right now so I can't check, but from the top of my head I can't remember any specific instance of this in Cyan's Ages... (that being said most of the Ages use vertex colors..) Aren't some of the metallic parts in Garrison or Ercanna lightmapped?

[edit]
I'm silly, here's how I'd do it on a custom shader :
Have the 'main' texture as 'unlit', multiply it by the lightmap (from the 2nd UV channel), and have the specular as usual. Sounds to me like it would work.. In Korman/PyPRP I don't need to set the material to Shadeless do I ? (which would deny the specular IIRC)

Re: Lightmap + specular?

PostPosted: Thu Sep 03, 2015 6:21 am
by Sirius
From what I remember, PyPRP supports it: you only need to set your light as "No Diffuse", and it will still cause specularity highlights - I guess it is compatible with lightmaps.
But remember specularity is vertex-shaded in Plasma (just like lighting), which is an eyesore for most objects.

Re: Lightmap + specular?

PostPosted: Thu Sep 03, 2015 7:45 am
by Aloys
Sirius wrote:From what I remember, PyPRP supports it: you only need to set your light as "No Diffuse", and it will still cause specularity highlights - I guess it is compatible with lightmaps.

Yay. :)
But remember specularity is vertex-shaded in Plasma (just like lighting), which is an eyesore for most objects.

Argh.. I'd forgot that.. 2003 techonology. :oops: I'll give it a try tonight see how it looks...