-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any example of loading objects in the scene? #185
Comments
For example, how should I pre-process and load google scanned objects for simulation and rendering? |
Hi, Two part answer: Firstly, for ShapeNet and Google Scanned Objects there should be very little work on your part required. import kubric as kb
...
gso = kb.AssetSource.from_manifest("gs://kubric-public/assets/GSO/GSO.json")
obj = gso.create(asset_id="Marvel_Avengers_Titan_Hero_Series_Doctor_Doom")
scene += obj See the movi_c_worker for a full example. The same works for ShapeNet with the only exception that you first need to register at the shapenet.org and agree to their terms, to find the corresponding AssetSource link. See shapenet.py for a full example. The second part about preprocessing custom objects is slightly more complicated. We do not yet have documentation on that. obj = kb.FileBasedObject(
asset_id="custom",
render_filename="custom.obj",
bounds=((-1, -1, -1), (1, 1, 1)),
simulation_filename=None)
scene += obj To make this work for simulation you would need to create a collision mesh in |
Thank you for your help! |
Hi Thank you very much for the helping! I have successfully added '.obj' file into scene using function: kb.FileBasedObject(). I'd like to ask if I can add '.mtl' or '.jpg' texture information into this object? Thanks. |
Hi,
Thank you for your great work! It must take a great amount of effort to implement such a system!
Current only APIs for loading simple primitives and ShapeNet shapes are presented in the examples. Is there any simple way to load our own objects (maybe in the form of an obj file)?
The text was updated successfully, but these errors were encountered: