c++ - FBX SDK - Texture scale and rotation not applied -


i'm adding texture via material mesh using fbx sdk. wonder why texture scale not applied - neither texture rotation. source code looks follows:

// create texture gtexture = fbxfiletexture::create(gscene, "diffuse texture"); fbxstring ltexpath = "c:\\users\\padmalcom\\crate.jpg"; gtexture->setfilename(ltexpath.buffer()); gtexture->settextureuse(fbxtexture::estandard); gtexture->setmappingtype(fbxtexture::euv); gtexture->setmaterialuse(fbxfiletexture::emodelmaterial); gtexture->setswapuv(false); gtexture->settranslation(0.0, 0.0); gtexture->setscale(0.01, 0.01); gtexture->setrotation(45.0, 0.0);  // create material fbxstring lmaterialname = "material"; fbxstring lshadingname = "phong"; fbxdouble3 lblack(0.0, 0.0, 0.0); fbxdouble3 lred(1.0, 0.0, 0.0); fbxdouble3 ldiffusecolor(0.75, 0.75, 0.0); gmaterial = fbxsurfacephong::create(gscene, lmaterialname.buffer()); gmaterial->emissive.set(lblack); // generate primary , secondary colors. gmaterial->ambient.set(lred); gmaterial->diffuse.set(ldiffusecolor); gmaterial->transparencyfactor.set(40.5); gmaterial->shadingmodel.set(lshadingname); gmaterial->shininess.set(0.5); 

now scale , rotation should set not. ideas? missing rotation

i found out rotation , scaling values set official autodesk renderer (fbx review) not support them! importing model unreal engine 4 results @ least in right texture scale guess there no error in code.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -