No problem. Im conflicted anyway, because this rendering fix makes my need for yabee to support rigidbody obsolete.
Directional Lighting not working when imported with panda3d-gltf, but does when imported with assimp
So everything is functiona, but the texture is very dull. I can of course ramp up the abmient and directional lights. But then the light ramps are off. The problem is, the lights are already pretty powerful!
self.sun.setColor((0.8, 0.8, 0.8, 1))
self.ambient_light.setColor((0.4,0.4,0.4, 1))
Im wondering if I could do something to the texture itself to brighten it up?
In all fairness, a main-light value of 0.8 isnât that brightâit should I think mean that your colours should be seen at a maximum of 0.8 of their designed colours (outside of specular highlights).
Its not, I thought it goes only to 1?
It does: a lighting value of â1â essentially means that, at brightest, you should see exactly the colours that you designed.
(Although it occurs to me that Iâm not sure offhand of how ambient lighting factors into that in fully-lit regions, so I may be offâŚ)
hmmm. Ill experiment. The values were the same with the egg version and the texture appeared its original, bright and poppy.
Ambient lighting for self-shadowing and shadows.
Sorry, i dont understand?
You can switch to the diffuse definition of the material, where I commented out the transformation.
material = render_state.get_attrib(MaterialAttrib).get_material()
material.set_diffuse(Vec4(*material.get_base_color()))
material.set_twoside(False)
material.set_refractive_index(1)
material.set_shininess(0)
material.clear_metallic()
#material.clear_diffuse()
material.clear_base_color()
material.clear_ambient()
material.clear_emission()
But it looks terrible. Another point is related to the texturing mode, you need to use linear mode in the blender, not srgb
okay, ill try.
The most interesting thing is that in updating the module the fix, I removed the manipulations with the material. So there is no point in this, mapping via base_color is more correct.
mind sending me update? Is it above? I fixed the dullnes by simply increasing the level on my light ramp. Now everythign POPS
I havenât finished it yet, at the moment Iâm thinking about adding it as a NodePath
method, but I donât think rdb will approve it. In principle, I can make it a plug-in for extending NodePath
methods.
Yeah, I understand why that could be a challenge to get in as a nodepath method. Probably better as a package extension?
I mean, it seems more like something to be fixed in blend2bam or panda3d-gltfâperhaps a switch to be set when outputting for non-PBR rendering, or something like that.
A new version of the module to fix the gltf pipeline. The archive contains the module itself and the code demonstrating its use.
sourse.zip (447.4 KB)
Perhaps over time I will place it in the code examples, if it passes the tests, and it will work as users expect it to.
Sound sgreat serega, ill update this evening. You might consider a pip package?
Too trivial for a whole package.
It looks like a normal map will not work, since it requires the conversion of columns with tangents and bi tangents into a clear view for the auto shader.
Hmm, under the hood you can place this example that will generate everything from scratch.