Loading material textures
Closed this issue · 8 comments
Hi Nick,
Just wondering if you knew how to approach loading a FBX file with textures attached. Cant seem to find anything obviously implemented in the addon.... Is this still a missing feature or am I blind?
Thanks,
josh
Hi Josh,
It should be implemented here:https://github.com/NickHardeman/ofxFBX/blob/master/src/ofxFBXScene.cpp#L177
If there is supposed to be a texture attached and you don't see it, it might print out in the console something like "Error loading texture from: ".
I don't think the addon handles multi-layer textures on a single model or anything too fancy. Just a texture attached to a material.
You probably will need to call: ofDisableArbTex(); before loading the fbx scene.
Just out of curiosity, what 3D program are you using to export the fbx file? I have used Blender and it states in the docs that the FBX exporter has a bunch of kinks, so it took a while to figure out the correct export settings.
Best,
Nick
Hi Nick, thanks for the response. I haven't tried my own exports yet. Just downloading .fbx models from the net that contain a bunch of textures and was hoping to use them. ill try baking the textures into the model using Blender and reexport as a .fbx file.
Dear Nick,
Great work! Here is my contribution;
I have also included file format tga for the following function inside ofxFBXScene.cpp and it works;
bool ofxFBXScene::isValidTexturePath( string aPathToTexture ) {
ofFile tfile = (string)aPathToTexture;
if(!tfile.exists()) return false;
return (tfile.getExtension() == "tga" || tfile.getExtension() == "jpg" || tfile.getExtension() == "png" || tfile.getExtension() == "bmp");
}
Kind regards
Thanks @selcukartut. I just pushed the change.
greetings. looking forward to see some improvements on ofxFBXSkeleton
class. I have been trying long to integrate Kinect sensor skeleton data
into openframeworks models, no success so far.
best
Selcuk ARTUT
On Sun, Aug 23, 2015 at 9:20 PM, Nick Hardeman notifications@github.com
wrote:
Thanks @selcukartut https://github.com/selcukartut. I just pushed the
change.—
Reply to this email directly or view it on GitHub
#2 (comment).
I am working on the bones and skeleton classes right now. It is under active development, but I am pushing to the develop branch. Trying to make it easier to control the bones. Also making an example for controlling bones.
great, good luck!
looking forward to hear any progress.
Selcuk ARTUT
On Sun, Aug 23, 2015 at 9:44 PM, Nick Hardeman notifications@github.com
wrote:
I am working on the bones and skeleton classes right now. It is under
active development, but I am pushing to the develop branch. Trying to make
it easier to control the bones. Also making an example for controlling
bones.—
Reply to this email directly or view it on GitHub
#2 (comment).
Textures are supported on meshes in master branch.