Import multiple objects in OBJ file

Import multiple objects in OBJ file

Anonymous
Not applicable
1,732 Views
2 Replies
Message 1 of 3

Import multiple objects in OBJ file

Anonymous
Not applicable

Hi Experts,

 

I am trying to load an obj file containing multiple objects, looking like

 

o pillar_231
usemtl Wood
f 5789/7001 5790/7002 5791/7003 5792/7004
f 5793/7005 5794/7006 5795/7007 5796/7008
f 5797/7009 5798/7010 5799/7011 5800/7012
f 5801/7013 5802/7014 5803/7015 5804/7016
o pillar_232
usemtl Wood
f 5805/7017 5806/7018 5807/7019 5808/7020
f 5809/7021 5810/7022 5811/7023 5812/7024
f 5813/7025 5814/7026 5815/7027 5816/7028
f 5817/7029 5818/7030 5819/7031 5820/7032

 

However, after I load the scene and get the mesh, I can only find all the polygons but no grouping information. I tried GetPolygonGroup() and it only returns -1. So I am wondering if FBX preserves that information at all. If not, what is the alternative way to do this?  

 

Thanks in advance! 

 

0 Likes
Accepted solutions (1)
1,733 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

Can you add group info to the obj files?

 

g group_0

 

for example.

 

 

Message 3 of 3

Anonymous
Not applicable

Thank you Numerator! I have tried using "g" and instead of one entrie mesh now I can get a mesh for each of the group. GetGeometryCount() returns the number. 

 

Thank you again!

 

Yi

0 Likes