Hot answers tagged

8

The FBX documentation is painful at times, and this is definitely one of them. There are two ways I've used to access animation data. The first is used in the ImportScene sample that comes with the SDK, and it's the way you seem to be trying to do things. In your sample, now that you have a valid lAnimCurve, you would need to query the number of keyframes ...


7

The range [-1 ; 1] x [-1 ; 1] x [0 ; 1] mentioned in the tutorial refers to the canonical view volume. It is the final coordinate space vertex data gets mapped to before everything is rasterized to your screen. To understand what exactly this means, it helps to take a look at what a rendering pipeline typically looks like. Coordinate spaces A coordinate ...


5

In general you don't use any such format directly as an asset in production. It's fine to add code for loading them, and to use them as an intermediate format for development, but for production you don't really go down that route. Instead, for production you want to use e.g. a model format that you can load fast and directly; e.g. and in OpenGL, you'd ...


5

Simply drag the .fbx file to the project assets folder.


4

The advantages of binary FBX over ASCII FBX are most immediately; speed of reading and the size of the file. Another significant advantage would be that it is possible to build your own parser and asset importer for the ASCII flavour. The binary format has never been (officially) publically documented. I would also challenge the degree of advantage ASCII ...


4

I experienced this problem as well but since no one actually answered the question I'll say what I did to solve it. You are correct that it seems to be a version issue, I fixed it by simply making a new project in an older version (2018.4.7f1 specifically), and then I dragged the fbx file into the project. Once I imported it, I then exported it as a unity ...


3

To load up a 3D model in run time from a server, you need to use AssetBundles. You create an AssetBundle and upload it to a server. You can then download that AssetBundle with the unity WWW class. There is a another way to do it, which is suggested here. In this solution you read the text file construct the model from that. Very difficult and time consuming....


3

Binary files load much faster than ASCII files -- // open it FILE *fin = fopen( "binary.fbx", "r" ) ; // get size in bytes fseek( fin, 0, SEEK_END ) ; size_t size = ftell( fin ); rewind( fin ) ; unsigned char* bytes = (unsigned char*)malloc( size ) ; fread( bytes, size, 1, fin ) ; // THAT'S ALL FOLKS! Meanwhile, an ascii fbx parser is pretty significant ...


3

XNB is a binary container for all your content in programs that use the XNA content pipeline, this includes models, but also textures, fonts, audio, and sprites. While it is possible to extract information from an XNB file (see for example this plugin for paint.net that extracts the textures in an XNB file: ) I do not know of any programs that extract ...


3

In supplemental to Syntac_'s example, here's how you could also load some keyframe and skeletal animation data. For a start, given you have an Fbx scene object initialized, you could pass fbxScene->GetRootNode() to a method like this: void MyFbxScene::LoadNode(FbxNode* fbxNode) { int numAttributes = fbxNode->GetNodeAttributeCount(); for (int i = ...


3

You will get materials attached when you import FBX from Blender into Unity but it will assign unity's standard material/shader. What you won't have is the texture assigned into the diffuse/albedo slot of the Unity standard material. Unfortunately, you will have to save the texture in Blender separately, then import it into unity before assigning it into the ...


3

Inside the import settings inspector for your model, change from "Use Embedded Materials" to "Use External Materials (Legacy)". You will then have a Materials Folder to modify.


3

FBX is indeed a file format for 3d models. Besides mesh data and materials it can also contain an animation rig and animation sequences for that rig. However, the models from this asset pack do not seem to contain an animation rig. So if you want to animate them, you have two options: Import the models into a 3d animation program of your choice and add a ...


3

I’m not an expert. I only just recently got into modding using Blender. I had a similar issue with a custom model I imported into MonoGame using FXB format. What fixed it for me was downgrading to Blender 2.79b. In 2.8, Blender stopped supporting the FXB 7.4 binary export format, which also had something to do with how the program handles bounding boxes. I’d ...


2

You can get the the texture information by following steps, FbxNode -> FbxSurfaceMaterial -> FbxLayeredTexture or FbxTexture -> Texture name (and other properties) The code looks like, int mcount = node->GetSrcObjectCount<FbxSurfaceMaterial>(); for (int index=0; index<mcount; index++ ) { FbxSurfaceMaterial *material = (FbxSurfaceMaterial*)...


2

Getting texture coordinates for models with one UV set Using FBX SDK 2013: // UV Container std::vector<float[2]> UVList; // Loop for each poly for ( int Poly(0); Poly < fbxMesh->GetPolygonCount(); Poly++ ) { // Get number of verts in this poly const int NumVertices = fbxMesh->GetPolygonSize( Poly ); // Loop for each vert in poly ...


2

I'm not sure exactly what you want to do but you can always export it from 3ds max in ascii format instead of binary and open it later in a text editor (notepad).


2

You probably don't need .obj if you want to use .fbx. _D usually indicates a diffuse texture, _N is a normal map. You must create a new material and assign those textures into it.


2

FBX supports a whole range of texture properties per surface material: diffuse, specular, etc.. The property names are stored in static char* fields in SDK classs FbxSurfaceMaterial. You can get a pointer to such a material by iterating across all materials of an FbxNode using functions GetMaterialCount() and GetMaterial(index). To load a texture, you first ...


2

I don't know about Unity 5, but in 4, you can click on your model in the Scene window. On the Mesh Renderer properties, there should be at least one material. To start, set the shader to "Diffuse", and click on "select" to select the texture. The character should appear textured. If you want to save these settings for future use, drag the object from the ...


2

You shouldn't be loading the model every frame. Just load it once and render it over and over as needed. Also, you should create the DGSLEffectFactory and CommonStates once and reuse it. The design is for you to implement your own IEffectFactory and then you can return your own custom IEffect for custom shaders. You can also control the individual subset ...


2

Merging multiple FBX files is actually fairly easy. You first need to bring all of the FBX files into Maya. As I have found out, this is fairly simple. Just open an empty scene, and drag and drop the files from a file explorer. Position all of the objects in Maya. If you are unfamiliar with Maya, itself, the basic transformation principles actually work ...


2

The use of FBX files in Unity is the same as the use of FBX files anywhere else. Searching for FBX leads you to sites like this one that explain it in detail: The Autodesk FBX file format is a popular 3D data interchange format utilized between 3D editors and game engines. It was originally created as the native file format for Kaydara’s Filmbox motion ...


2

Alright, I was able to answer my own issue. The root cause had to do with Blender using quads as opposed to tris. The way I morphed the mesh for the blendshape did not allow for very good quad->tri conversion. I modified the way I managed the blendshape (moved all 8 surrounding vertices in toward the pulled vertex), and the spikes now look... like ...


1

If you have conflicting comments and code, either one or both of them are incorrect. In this case, it seems likely that the 3D rotation in the comment is supposed to be a 3D translation. In general, a 4x3 transformation matrix is like a regular 4x4 transformation matrix, but the fourth part with [0 0 0 1] is omitted for saving space and work.


1

So I found it - posting the response here for future reference X/Y/Z = -7.189/0/10.136 in the Maya channel editor are rounded off values - the values themselves have a larger number of significant digits - e.g. -7.188707 so search for the first 2 decimal places only


1

Make sure that the culling order is correct. This depends on whether you're using LR or RH. If you're not sure, then just try both GraphicsDevice.RasterizerStates.CullFront and GraphicsDevice.RasterizerStates.CullBack to see which one looks correct. Also, you might want to try rendering with your camera's world matrix through Matrix.Transpose.


1

Once you have loaded your scene you can do the following to get a reference to all the meshes. FbxNode* pNode = m_pScene->GetRootNode(); if(pNode) { for(int nNode = 0; nNode < pNode->GetChildCount(); nNode++) { FbxNode* pChildNode = pNode->GetChild(nNode); // Search for mesh node if(pChildNode->...


1

Googling, I found these descriptions of the file formats: FBX (Filmbox) is a proprietary file format (.fbx) developed by Kaydara and now owned by Autodesk. It is used to provide interoperability between digital content creation applications. and ...compiled data files (.xnb) produced by the XNA Game Studio 4.0 Content Pipeline build process... ...


Only top voted, non community-wiki answers of a minimum length are eligible