kiss3d
kiss3d copied to clipboard
mtl parses wrong filename for map_Kd
Hey there!
I really dont know much about that whole 3D stuff and just start to get into it. So please pardon me, if this is a user problem :)
So, i created a fairly simple .obj in blender, which is a cube, where one face got deleted. It shall become a room eventually. That worked all pretty well, kiss3d had loaded the room.obj
and room.mtl
just fine. Basic textures on it were also rendered properly.
Now, I started to put on some tiling for just one face (floor), and have a basic color material on the remaining faces (walls). And here I run into a panic when calling window.add_obj(..)
, stating that there is a file missing. I tracked that down to loader/mtl.rs::parse
performing a match
on the material file's lines. The case for map_Kd
then calls loader/mtl.rs::parse_name
. The value on my material file looks like this:
map_Kd -s -15.000000 -15.000000 -3.700000 wood_tile.jpg
Which unfortunately gets parsed to assets/-s -15.000000 -15.000000 -3.700000 wood_tile.jpg
, where assets/
is the base directory. And yep, there is no such file, sure.
So, i guess my question is: Did I fuck up the material in the first place? Which is totally reasonable, since I'm no good at blender :)
Or maybe this is just not supported for a KISS engine. If so, any hope I could extend / switch the material loading in a pretty manor? Like, instead of manually patching the kiss3d repo
Big thanks in advance, and again sorry if this is just me being stupid!