princeton-vl/infinigen

Importing a scene graph

Opened this issue · 2 comments

Dear Infinigen authors,

Thanks for open-sourcing this great framework!

Besides "solving" a scene layout based on the constraints, I am trying to create a scene (i.e., sample procedural models, output blend file, and render images/videos) based on a given scene layout/graph. For instance, if I have coordinates of a room floor plan as well as locations and orientations of each object, how can I integrate these information into the Infinigen framework and generate a scenes based on the input?

I'm still learning to use this codebase so I haven't figured this out yet. Some advice/references would help a lot. Thanks!

Best,
Wufei

To import a scenegraph you would need to convert it into our State datastructure in state_def.py, which contains many ObjectStates (nodes) linked together by Relations (edges)

Importing objects should be fairly straightforward, you would just need to create a blender object at the correct location&rotation and assign it as the object. If you want the object to be populated by one of our procedural generators, you can retrieve one of our AssetFactories which matches your usecase, then assign it as the objstate.generator.

Importing floorplans would be useful but would take some figuring out. @wufeim is there a particular format (e.g filetype or datastructure) that is popular to store floorplans? If so we might be able to write an importer.

Just to confirm that state_def only works for indoor scene and it couldn't be used to describe the outdoor correct?