Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / Instancing
  RSS 2.0 ATOM  

Instancing
Rate this thread
 
42888
 
Permlink of this thread  
avatar
  • slongay
  • Posted: 05 May 2010 10:52 AM
  • Total Posts: 6
  • Joined: 07 April 2010 03:06 AM

Hi,

I am trying to use the new instancing feature but I am getting mixed results. In the new quicktime player plugin (released today) everything looks great, but when I import the same file into 3dsMax 2011 (with the latest FBX plugin installed), my first instance shows up as expected but the other instances are just dummy objects (positioned and scaled correctly).

Here is what I am doing:

I create a Nurbs object:

KFbxNurbmySphere KFbxNurb::Create(mScene,"Sphere")
//Add some control points and stuff

Then when I want to create an instance I do the following:

KFbxNodelNode KFbxNode::Create(mSceneObjectName)
lNode
->SetNodeAttribute(mySphere)

//Set the local pose
...
//Add it to the scene
mRootNode->AddChild(lNode)

Any ideas?

I have attached a sample FBX file if anyone wants to take a look. All the spheres are instances of one Nurbs object.
Edit: Actually for some reason it wont let me attach the .fbx file, sorry

Thanks
-Steve



Replies: 1
/userdata/avatar/3yvwf23us_doug100x100.png

Make the attachment a .zip file

Author: Doug Rogers

Replied: 09 May 2010 02:35 AM  
avatar
  • slongay
  • Posted: 08 May 2010 07:24 PM

To better explain, take the example from the documentation ExportScene01.

Add the following lines to the end of the CreateScene function

KFbxNodelPatch2 KFbxNode::Create(pScene,"Patch2")
lPatch2
->LclTranslation.Set( KFbxVector4(5,0,0) )
lPatch2
->SetNodeAttribute(lPatch->GetPatch())
lRootNode
->AddChild(lPatch2)

Just creating a new node, and setting its attribute to something that already exists in the scene. This should essentially create an instance of the first patch slightly translated. This works as expected in the quicktime viewer, but under 3ds max 2011 with the newest fbx loader (i dont know about any other versions), I get one patch (the first one) and the second patch is just a dummy object named and transformed properly but with no geometry.

If anyone has suggestions or spare time to just verify that they get the same results I would appreciate it.

Thanks
-Steve



Replies: 0
avatar
  • slongay
  • Posted: 10 May 2010 06:49 PM

So, after further investigation it seems that the proposed method for instancing works for Mesh’s but not for NURBS objects. Although I think this is just a bug as the documentation says it should work for all attributes.



Replies: 0
avatar

Hi Steve,

We will log this issue as a bug and investigate it. Thank you.

Viviane, FBX Team



Viviane Rochon
Maya Data Platform
Autodesk

Replies: 0