You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm hitting a glGetError on GL_SHININESS because OBJ file range for this is 0-1000 whereas OpenGL's is 0-128. This is just an exponent, i.e. pow(x,y) so it makes sense to clamp the OBJ loader. But I wonder if MM3D should go over 1 too? Or is that just not a realistic setting?
EDITED: I should note, I didn't even set up shininess for the OBJ file exported from Blender, so it's apparently defaulting to something like 225 I think it was? Is that an astronomical setting? If not MM3D is probably low-balling by limiting to 1.0 maximum. To my mind MM3D is not letting it be a power function as opposed to square-root style fractional exponent.
EDITED: Never mind (I guess?) the materials property window scales the value to 0-1 from 0-100.
The text was updated successfully, but these errors were encountered:
Fortunately it's very simple. In the specular computation there's a pow function, so shininess is just pow(x,shininess). Edited: It's also called the "specular exponent" and the error that can arise (repeating OP) is OpenGL hits an error if the exponent is higher than 128 for some reason. Clamping it is all that's required. (MM3D's valid range seems to be 0 to 100. 28 less than OpenGL's.)
Actually that reminds me. If there are valid reasons to use an exponent less than 1, I think the Qt setup I saw yesterday may be limited to 100 ticks. Probably a value can be inputted by hand to under 1, but the ticks would only allow 0 or 1 and not anything between. Anyway the code I looked at divided the slider value by 100.
I'm hitting a glGetError on GL_SHININESS because OBJ file range for this is 0-1000 whereas OpenGL's is 0-128. This is just an exponent, i.e. pow(x,y) so it makes sense to clamp the OBJ loader. But I wonder if MM3D should go over 1 too? Or is that just not a realistic setting?
EDITED: I should note, I didn't even set up shininess for the OBJ file exported from Blender, so it's apparently defaulting to something like 225 I think it was? Is that an astronomical setting? If not MM3D is probably low-balling by limiting to 1.0 maximum. To my mind MM3D is not letting it be a power function as opposed to square-root style fractional exponent.
EDITED: Never mind (I guess?) the materials property window scales the value to 0-1 from 0-100.
The text was updated successfully, but these errors were encountered: