facebookresearch / audio2photoreal

Code and dataset for photorealistic Codec Avatars driven from audio
Other
2.66k stars 250 forks source link

How to pass avatar renderer conditions #47

Closed vishakg closed 5 months ago

vishakg commented 7 months ago

Firstly, thank you for the code and sample models! Really helps push the research in this field to new heights.

Based on https://arxiv.org/pdf/1808.00362.pdf or https://arxiv.org/pdf/2105.10441.pdf, seems like the avatar renderer can take a view vector/condition to change the view of the rendered avatar. Is there a way to parameterize this so that we can correct the head position? I'm assuming this is now hard coded somewhere for this sample set to render a fixed view angle. Also, can we render multiple avatars into the same video? If yes, which object/parameter controls the placement and camera location?

evonneng commented 7 months ago

Hi! thank you for your interest in this work! Perhaps this is related to #34. So you will have to change the K and Rt. the renderer uses this to calculate a campos, for which it then renders out a camera dependent texture map. Please keep in mind the rendering of the texture might look strange if the campos is not passed in correctly to the renderer.

And yes! It is totally possible to render multiple different avatars. You can treat the existing geometry as a single mesh. Then, you would essentially have to merge the meshes together and then render them together. This conversion might be a bit tricky, but it involves merging the vertices, the faces list accordingly, and the textures into a "single" mesh.