www.jpct.net
jPCT - a 3d engine for Java => Support => Topic started by: efaj on December 28, 2011, 12:57:28 pm
-
Is it possible to get a function like Loader.readTextureNames3DS(String filename) -or at least for what I guess it does- but for OBJ files? I see the OBJ Loader already prints outs the names to the standard output, so I guess it's not that hard. -though maybe lengthy-
I'm writing a function to load an obj as I want simply and shortly, and with my naming rules to auto load the correct textures before the model.
-
A simple mtl parser could do that.
-
Yes. That's the reason why i never did this...it's obvious. Just load the .mtl file, scan for lines starting with "map_Kd", collect the rest of the line in a set and you are done.
-
Yes. That's the reason why i never did this...it's obvious. Just load the .mtl file, scan for lines starting with "map_Kd", collect the rest of the line in a set and you are done.
I know, but I was trying to avoid parsing it twice. But oh well, I haven't seen .mtl files to be large.