diff --git a/code/NFFLoader.cpp b/code/NFFLoader.cpp index b914fecee..341fb90f1 100644 --- a/code/NFFLoader.cpp +++ b/code/NFFLoader.cpp @@ -197,7 +197,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector& output, else if (TokenMatch(sz,"diffuse",7) || TokenMatch(sz,"ambientdiffuse",14) /* correct? */) { AI_NFF_PARSE_TRIPLE(c); - curShader->diffuse = c; + curShader->diffuse = curShader->ambient = c; } else if (TokenMatch(sz,"specular",8)) { diff --git a/include/aiDefines.h b/include/aiDefines.h index 541b56cba..4707952b0 100644 --- a/include/aiDefines.h +++ b/include/aiDefines.h @@ -48,11 +48,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ************************************************************ - // Define ASSIMP_BUILD_NO_XX_LOADER to disable a specific - // file format loader. The loader will be excluded from the - // build in this case. 'XX' stands for the file extension - // of the loader, e.g. ASSIMP_BUILD_NO_X_LOADER will disable - // the X loader. + // Define ASSIMP_BUILD_NO_XX_IMPORTER to disable a specific + // file format loader. The loader is be excluded from the + // build in this case. 'XX' stands for the most common file + // extension of the file format. E.g.: + // ASSIMP_BUILD_NO_X_IMPORTER disables the X loader. // ************************************************************ // ************************************************************ diff --git a/test/models/NFF/NFF/cone.nff b/test/models/NFF/NFF/cone.nff index 744c2d1c9..84be503a2 100644 --- a/test/models/NFF/NFF/cone.nff +++ b/test/models/NFF/NFF/cone.nff @@ -1,6 +1,6 @@ #red -f 1.0 0.0 0.0 0.5 45.2776 0 1 ./../../LWOFiles/LWo2/MappingModes/EarthCylindric.jpg +f 1.0 0.0 0.0 0.5 45.2776 0 1 ./../../LWO/LWo2/MappingModes/EarthCylindric.jpg tess 4 @@ -12,13 +12,13 @@ c -10 -10 -10 6 -f 1.0 1.0 1.0 0.5 0.5 45.2776 0 1 ./../../LWOFiles/LWo2/MappingModes/EarthSpherical.jpg +f 1.0 1.0 1.0 0.5 0.5 45.2776 0 1 ./../../LWO/LWo2/MappingModes/EarthSpherical.jpg s -10 -10 -10 2 s 10 10 10 3 #white -f 1.0 1.0 1.0 0.5 0.5 45.2776 0 1 ./../../LWOFiles/LWo2/MappingModes/EarthCylindric.jpg +f 1.0 1.0 1.0 0.5 0.5 45.2776 0 1 ./../../LWO/LWo2/MappingModes/EarthCylindric.jpg # another cone, closed this time c diff --git a/tools/assimp_view/assimp_view.cpp b/tools/assimp_view/assimp_view.cpp index f0a76a4e7..971acdeee 100644 --- a/tools/assimp_view/assimp_view.cpp +++ b/tools/assimp_view/assimp_view.cpp @@ -126,22 +126,28 @@ DWORD WINAPI LoadThreadProc(LPVOID lpParameter) // get current time double fCur = (double)timeGetTime(); - // Remove allline and point meshes from the import - aiSetImportPropertyInteger(AI_CONFIG_PP_SBP_REMOVE, + // Remove all line and point meshes from the import + aiSetImportPropertyInteger(AI_CONFIG_PP_SBP_REMOVE, aiPrimitiveType_LINE | aiPrimitiveType_POINT); - // call ASSIMPs C-API to load the file + // Call ASSIMPs C-API to load the file g_pcAsset->pcScene = (aiScene*)aiImportFile(g_szFileName, - aiProcess_CalcTangentSpace | // calculate tangents and bitangents - aiProcess_JoinIdenticalVertices | // join identical vertices - aiProcess_Triangulate | // triangulate n-polygons - aiProcess_GenSmoothNormals | // generate smooth normal vectors if not existing - aiProcess_ConvertToLeftHanded | // convert everything to D3D left handed space - aiProcess_SplitLargeMeshes | // split large, unrenderable meshes into submeshes - aiProcess_ValidateDataStructure | aiProcess_ImproveCacheLocality - | aiProcess_RemoveRedundantMaterials | aiProcess_SortByPType | - aiProcess_FindDegenerates | aiProcess_FindInvalidData | - aiProcess_GenUVCoords | aiProcess_TransformUVCoords); // validate the output data structure + aiProcess_CalcTangentSpace | // calculate tangents and bitangents if possible + aiProcess_JoinIdenticalVertices | // join identical vertices/ optimize indexing + aiProcess_Triangulate | // triangulate polygons with more than 3 edges + aiProcess_GenSmoothNormals | // generate smooth normal vectors if not existing + aiProcess_ConvertToLeftHanded | // convert everything to D3D left handed space + aiProcess_SplitLargeMeshes | // split large, unrenderable meshes into submeshes + aiProcess_ValidateDataStructure | // perform a full validation of the loader's output + aiProcess_ImproveCacheLocality | // improve the cache locality of the output vertices + aiProcess_RemoveRedundantMaterials | // remove redundant materials + aiProcess_SortByPType | // make 'clean' meshes which consist of a single typ of primitives + aiProcess_FindDegenerates | // remove degenerated polygons from the import + aiProcess_FindInvalidData | // detect invalid model data, such as invalid normal vectors + aiProcess_GenUVCoords | // convert spherical, cylindrical, box and planar mapping to proper UVs + aiProcess_TransformUVCoords | // preprocess UV transformations (scaling, translation ...) +// aiProcess_PreTransformVertices | + 0); // get the end time of zje operation, calculate delta t double fEnd = (double)timeGetTime(); diff --git a/workspaces/vc8/assimp.vcproj b/workspaces/vc8/assimp.vcproj index 3e1907397..d3c6f2a1a 100644 --- a/workspaces/vc8/assimp.vcproj +++ b/workspaces/vc8/assimp.vcproj @@ -1763,6 +1763,10 @@ > + +