2011 Software releases
Learn about the 2011 versions of some of Autodesk’s Digital Entertainment Creation tools.
  • 1/2
You are here:Forum Home / Autodesk® FBX® / FBX SDK / DirectX Viewer for FBX files (v 0.996). [Source Code Posted]
  RSS 2.0 ATOM  
6 pages: 1.2.3.4.5.6 first last

DirectX Viewer for FBX files (v 0.996). [Source Code Posted]
Rate this thread
 
22625
 
Subscribe to this thread
avatar
  • Total Posts: 192
  • Joined: 2008-02-19 00:25:02

Updated to 0.5, see original post.



Replies: 0
avatar
  • _Flame_
  • Posted: 28 February 2009 10:31 PM
  • Total Posts: 38
  • Joined: 2009-02-17 09:17:02

Cool! Normals is good! I will research.
I calculation cross product for vertices of triangles, but sometimes i have inverted normals.



Replies: 0
avatar
  • c00ler
  • Posted: 01 March 2009 01:20 AM
  • Total Posts: 1
  • Joined: 2009-01-19 21:15:16

Ohhhh man,

Thats what i’m looking for since long time, can you give to source code here or pm it to me ? I really need it :S

Thanks also for the great work :D

Peace



Replies: 0
avatar
  • _Flame_
  • Posted: 01 March 2009 02:20 AM
  • Total Posts: 38
  • Joined: 2009-02-17 09:17:02

I have found in what was my problem with normals. It`s not normals. It is - “GetPolygonSize” :-)



Attachment Attachment
Replies: 0
avatar
  • _Flame_
  • Posted: 01 March 2009 05:55 PM
  • Total Posts: 38
  • Joined: 2009-02-17 09:17:02

Doug, how do you get texcoods? I really don`t understand this.



Replies: 0
avatar
  • Total Posts: 192
  • Joined: 2008-02-19 00:25:02

_Flame_ 01 March 2009 12:55 PM

Doug, how do you get texcoods? I really don`t understand this.

I’m still working on it too. Most of what I have is gotten from ViewScene and ImportScene.
See this thread: http://area.autodesk.com/forum/Autodesk-FBX/fbx-sdk/getuv-and-getlayerelementoftype-mismatch/

There is only one texture coordinate set per layer.  Each texture element that uses that coordinate set is in that layer.

for (int i 0pMesh->GetLayerCount(); i++)
  
{

    KFbxLayer 
pLayer pMesh->GetLayer(i);
    if (
pLayer == NULL)
      continue;

    for 
each element type you support (ELayerElementType  pTypeIdentifier)
   
{   
      KFbxLayerElementTexture 
pTextureElement = (KFbxLayerElementTexture *)pLayer->GetLayerElementOfType(pTypeIdentifier);

     if (
pTextureElement == NULL)
       continue;  
// no element of that type

     
KFbxLayerElementUVpLayerUV pLayer->GetUVs();
      if (
pLayerUV == 0)   
         continue;  
// no texture coordinates

     
KFbxLayerElement::EMappingMode mappingMode pTextureElement->GetMappingMode();
      
KFbxLayerElement::EReferenceMode referenceMode pTextureElement->GetReferenceMode();

      
      
// get coordinates
      
KFbxLayerElementArrayTemplate<KFbxVector2> &lUVArray pLayerUV->GetDirectArray();
  
      
// now get the coordinates depending on reference mode and mapping mode
   
}
  }


Replies: 0
avatar
  • _Flame_
  • Posted: 02 March 2009 08:48 PM
  • Total Posts: 38
  • Joined: 2009-02-17 09:17:02

Doug, do you use TriangulateInPlace? Scene5 have strange problem, probably with z-buffer.



Replies: 0
avatar
  • Total Posts: 192
  • Joined: 2008-02-19 00:25:02

Yes, I do.  Where is Scene5?



Replies: 0
avatar
  • _Flame_
  • Posted: 02 March 2009 10:10 PM
  • Total Posts: 38
  • Joined: 2009-02-17 09:17:02

Where is Scene5?

Post #24



Replies: 0
avatar
  • Total Posts: 192
  • Joined: 2008-02-19 00:25:02

The problem is in the scene.  Scene5 has lamina faces (or very nearly so) in original mesh which causes the z fighting.  You need to remove them from the original.



Replies: 0
6 pages: 1.2.3.4.5.6 first last




   
  Settings Choose Theme color: