-
Notifications
You must be signed in to change notification settings - Fork 266
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
Alembic support (www.alembic.io) - [✨ new feature] #260
base: master
Are you sure you want to change the base?
Conversation
Alembic is an open source file format for exchanging 3D computer animation information between different platforms and applications. Any app can write their 3D information out in the Alembic format which can then be read in by any other app that supports Alembic, such as Maya, 3dsmax, Houdini, Katana, Nuke to name a few. Beyond that, it stores 3D geometry in a format that is very efficient with a small file size that is quick to read and unpack.
Hi @SergeyShlyaev, Thanks a lot for this PR!
For this you will need to use the
You will need to instanciate the BSDF yourself using the
No there isn't. And we probably won't support this in the future. Mitsuba 2 being a research-oriented framework, it is unlikely that we will add support for "fancy" shaders to do things like "shader, attribute, and visibility assignments". I am worried about the |
Given the very heavy nature of Alembic, USD, and similar packages, I don't think that such a contribution can be merged directly into Mitsuba master. :(. (The policy of Mitsuba 2 is that all dependencies are automatically built using a self-contained build system) |
Hi guys, Thank you for the tips.
Both of them are already part of Mitsuba I believe, so Alembic does not seem to bring any new dependencies. While working on spectral video, found myself spending too much time preparing datasets for render and debugging why something does not work. I believe there should be simpler way to do it. Having it should reduce preparation time. And free time for actual research work in Mitsuba which is amazing.
Click to expand> For this you will need to use the mitsuba::Object::expand() methodThanks, Doing it like:
What am I doing wrong? Need to make it pick up material specified in xml file as usual:
Tech question: Do you recommend inherit AlembicMesh class from
Sure. Actually, Blender addon has very similar feature for exporting mesh with multiple materials assigned. For Alembics we could do it same way if needed, it answers the question. Cheers |
Thank you, found the example in shape.cpp:80 on how to create bsdf. But is there a way to specify bsdf by name, not to create bsdf? <ref id="my_diffuse_bsdf"/> This is for extra option to be able to follow material assignment from Alembic file. |
Would this name correspond to the I suggest we focus on the "geometry" part of this plugin for now. Adding support for BSDF binding might require changes in the rest of the codebase which would make this PR quite heavy. |
Added support for loading multiple meshes from file Added support for `shape_name` to specify object by name
Added support for loading multiple meshes from file Added support for `shape_name` to specify object by name
delete file accidentally placed in wrong place
Pushed new version with support for loading multiple objects from file.
Yes, correct.
Agree, it looks slightly more complicated after deeper look. Probably to make it work, need to instantiate bsdf and all of it’s nested references manually and attach it via |
Description
Alembic is an open computer graphics interchange framework. (www.alembic.io)
It is file format for exchanging 3D computer animation information between different platforms and applications. Any app can write their 3D information out in the Alembic format. Which can then be read in by any other app that supports Alembic, such as Maya, 3dsmax, Houdini, Katana, Nuke to name a few.
Alembic stores 3D geometry in a format that is very efficient with a small file size that is quick to read and unpack.
Using alembics makes it a ton easier to get complex scenes into Mitsuba.
Current plugin implementation supports arbitrary meshes made of triangles, quads or any n-gons with optional UV coordinates, vertex normals and other custom vertex or face attributes.
Mentioned in #211.
Testing
Tried with various types of geometry, including n-gons, degenerate geo, various vertex and face attributes. Tested on light, medium and very heavy geo. Test scene attached.
Questions
We can specify material assignment in alembic file, would be great to be able to use it in plugin.
This may open the road to tighter integration cause we can specify bsdf assignment directly in DCC.
Supposedly, I’ll need to manipulate m_bsdf somehow?
Faceset is a set (or group) of faces in an existing mesh. This is useful in order to more easily re-select them later when making shader, attribute, and visibility assignments to a sub-set of faces on a single mesh.
Prerequisities
Requires alembic
git clone http://github.com/alembic/alembic
Checklist:
[+] My code follows the style guidelines of this project
[+] My changes generate no new warnings
[*] My code also compiles for
gpu_*
andpacket_*
variants. If you can't test this, please leave below.Packet variants – Yes. Gpu can't test as I'm on Mac.
[+] I have commented my code
I have made corresponding changes to the documentation
Need help on how to do that. Doc for the plugin is included in cpp file.
I have added tests that prove my fix is effective or that my feature works
Need help on how to do that
[+] I cleaned the commit history and removed any "Merge" commits
[+] I give permission that the Mitsuba 2 project may redistribute my contributions under the terms of its license
mitsuba_alembic_test.zip