Specular Map Shininess

I’m trying to get specular maps loaded and working correctly in my own code that loads collada files.

What I’m finding is that specular/shininess values taken from collada using the auto shader works most of the time, but sometimes the shine is way too high. Particularly when using a specular map.

For example, loading this model:
ourbricks.com/viewer/6e3f05c72e3 … 1fd5f10996
(webgl required to view)
looks like this:

The material properties are:

emission (0.0, 0.0, 0.0, 1.0)
ambient (0.0, 0.0, 0.0, 1.0)
diffuse <Map sampler=wire_000000001F-sampler texcoord=TEX0>
specular <Map sampler=wire_000000001F1-sampler texcoord=TEX2>
shininess 34.0

No matter what I set the shininess value too, the model is still too shiny. Anyone have any idea what I’m doing wrong? Maybe I’m not loading the specular texture correctly?

My material loading code is here:
github.com/pycollada/meshtool/b … re.py#L221

Shininess (the spec map, or shinyness sets the specular coefficient and the specular color controls the specular color and amount (with the color’s brightness). At least thats how I think it works, I don’t use the auto shader, but from my custom shader using panda’s materials, that seems to be what works. I might be a bit off, but be sure to screw with the specular color when trying to make things have less shine (set it to (.1,.1,.1) for example).

My reference for the materials is generally the row for attr_material in panda3d.org/manual/index.php … der_Inputs which shows all of the material properties. Thats probably mostly useful for people writing their own shader like me though.

Ah, I see. Collada’s materials let you set a specular color or a specular map, but not both. Panda3D’s specular color defaults to (1,1,1). If I set it lower, it reduces the shininess. If I set it to (0.3,0.3,0.3), it works nicely. Feels very arbitrary, but it works. Thanks!