Community
FBX Forum
Welcome to Autodesk’s FBX Forums. Share your knowledge, ask questions, and explore popular FBX topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I've got the FBX SDK initializing from a Process() blues

1 REPLY 1
Reply
Message 1 of 2
Anonymous
425 Views, 1 Reply

I've got the FBX SDK initializing from a Process() blues

Good morning,

 

I will start off by saying I'm a total noob with the C++ programming language, but don't let that be a deterrence to offering me any suggestions or constructive criticism. I have one of those unusual memories that makes it possible for me to learn at an accelerated rate, so anything you need me to understand relative to the subject matter could be obtained within a matter of hours.

 

That said, my problem is this:

 

I'm trying to develop a plugin usinf the Autodesk FBX SDK (or should I say, I already have deleoped this plugin), but the problem has arrisen with the need of rendering a GameObject(in Unity3D).

 

As I have successfully implemented the Autodesk FBX SDK (although only in parts) such as snippets of ConvertScene and ViewScene as a start (I've fully tested the code against the FBX SDK without problems), it has become an increasingly important class in my project. The two classes I'm using at the present both work well with the C# wrappers which call them from the Game SDK (Unity3D) and convrt the written bytes of vertices, normals, etc.. from the GDK, they are then written to an OBJ file which is then passed to a wrapper class that sends them to the dll and returns a written FBX, DAE, and DXF file.

 

This all works fantastically, as well as the ViewScene, although the ViewScene is where I'm running into problems. Once I run the GameObject from the Hierarchy view through my main class, which writes the bare bytes to an array, then passes it through the series of classes to get an FBX, I then convert the Textures to a TGA, in order to be read by the .Targa class within the ViewScene library, and have been absolutely certain that the FBX points to the correct location of the newly created .tga images.

 

The Rendering Window does load the GameObject, and the converted TGA files correctly, but the "Scene" Window (the one created by the FBX SDK on initialize) either shows a black, empty window, or the texture is grainy, and seemingly only 10-12% rendered.

 

This only occurs when I run the ViewScene as an executable under Windows from an external operation using the .NET Process() class. If I run a bat script from within the ViewScene.exe or CMD.exe, everything comes out nicely.

 

Also, ASCII_TEXT will only load from direct execution, either a bat or cmd. Running it from a Process() returns a "Failed to load FBX_ASCII_TEXTURE, so no text will be displayed" warning. I don't use it in this project, but thought it might help track down my faults.

 

I have tried with an untouched build of the ViewScene Demo as well, but same results. If someone could shove me in the right direction, I would be eternally grateful.

1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

This was 100% user error. 

When the class is writing the material info to streamwriter as a .mtl, I forgot to add Tf filtering and sharpness. With those, it looks great.

 

I'm going to assume that MAX and Unity must add those onImport, since the exported file looks fine on re-import.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report