ok, all sides have same brightness for some reason
Now I propose to look at the settings of the material of the Principled BSDF node. Maybe thereβs something wrong there. Or you use a lot of ambient lightβ¦
Try applying custom material in Panda3D to the box.
mat = Material()
box.setMaterial(mat, 1)
Mysticism!!!, attach the model to the message, tomorrow I or someone else here will study it.
obj export works better but i dont like this textures
I tested this with my example.
from direct.showbase.ShowBase import ShowBase
from panda3d.core import AmbientLight, DirectionalLight
class Game(ShowBase):
def __init__(self):
ShowBase.__init__(self)
model = loader.loadModel("cube.glb")
model.reparentTo(render)
model.setPos(0, 0, 0.5)
model1 = loader.loadModel("box")
model1.reparentTo(render)
model1.setScale(10, 10, 1)
model1.setPos(-4, -4, -1)
alight = AmbientLight("alight")
alight.setColor((0.2, 0.2, 0.2, 1))
alnp = render.attachNewNode(alight)
slight = DirectionalLight('slight')
slight.getLens().set_film_size(10)
slight.getLens().set_near_far(0.1, 17)
slight.setColor((1,1,1,1))
slight.show_frustum()
slight.setShadowCaster(True, 1024, 1024)
slnp = render.attachNewNode(slight)
slnp.setPos(0, 10, 5)
slnp.setHpr(180, -20, 0)
render.setShaderAuto()
render.setLight(alnp)
render.setLight(slnp)
game = Game()
game.run()
I think for prevention, you should not watch YouTube in order to acquire knowledge in the field of using the Panda3D engine.
i also tested in your example, code is exactly the same
i think problem in panda3d gltf?
Most likely, maybe it works for me since I donβt have a plugin. Assimp is used.
yes it is, ok, but how to make my texture not blurry
Alternatively, do not use filtering, but this is fraught with a moire pattern. Use anisotropic filtering. But the most valid way to make a texture in sufficient resolution. Perhaps another problem is that your texture is not a power of two.
In this case, you just need to set the texture filter mode for that texture to βnearestβ to make it sharp, and disable mipmapping.
Increasing the resolution of the texture will also work.
Okay, so im suffering the same and yes using a diffierent importer works. We suggest blend2bam in the docs though, and this is a significant issue in there still. Ive had some break throughs, when i applied texture colors to my model and made sure it was twosided, it responded to directional light.
That suggests to me that the problem may in part be an issue with the modelβs normalsβit might be worth checking that they not pointing the wrong way.
Good suggestion, i did. And they are pointing outward!
I suppose i could flip them for science!
Nope, didnt help. Youd probably very interested in the journey that has taken place, and maybe you could provide some insight, ill transfer my journey to this thread.
You guys will probably be interested.