2
$\begingroup$

I'm working on a film-project where the scene plays out in a huge landscape and the camera moves back and forth within it of course we also have actors, animals, vegetation and other elements moving within this landscape.

Now this scene is to be composited onto real book pages which are being turned to reveal the new scenes & landscapes as we go in and out of the scene. But since the pages are being turned for real, they dont move perfectly stable so that I could use a simple bend-deformer or anything of that sort.

The thing that worked best for me so far is a lattice since I can have as many control-points and keyframe it to go with the pages. But the problem is, that the lattice can only deform single meshes and not an entire collection. Of course I can put modifiers on all meshes in my scene referencing the same lattice, which is nice, but since the scenes will be huge, it would be quite a pain and also during testing I noticed the lattice modifier breaking other modifiers like booleans or mirrors.

My ideal solution would be a deformer (like the lattice) that deforms an entire collection instead of each single mesh in it.

Does anyone have an idea how something like this could be achieved? I'm grateful for any hint in the right direction!

Cheers

$\endgroup$
5
$\begingroup$

I'll lead with a warning : This solution has some drawbacks (which will hopefully be fixed in the next official patch) :

  • This completely destroys UV maps so if you have PBR materials that depends on UV mapping, you won't be able to use it. It's being worked on.
  • It doesn't remember the individual objects' materials. This can be worked around but it may be complicated if any object inside the collections contains more than 1 material. V.3.0 hopefully will bring more tools to not destroy instance materials.

Put all your objects inside their own collection. Note every individual object has a different material.

enter image description here

Create a mesh object with a single vertex. Add a Geometry nodes modifier with this very simple setup : A Point Instance node set to instance a Whole Collection.

enter image description here

Add a Lattice modifier to this object. Create a lattice, and set it as a target in the instancer object's lattice modifier.

enter image description here

It works ! (Kinda...) Now that the lattice is applied, the geometry is "real", and in the process all objects lost their materials...

The workaround :

Add all the materials in use by your objects to your instancer object. Note the order in which materials are listed in the material slots.

enter image description here

Now select one of your individual objects and add this GN modifier :

enter image description here

This will fill the geometry's material_index attribute by the input value. This is used in the instancer object to dictate which material will be displayed. With the object selected, select all the other objects in the instanced collection and make sure the first object is active (yellow outline).

enter image description here

Then click on "copy to selected" next to the modifier to add it to all objects.

enter image description here

Now, the tedious part : Change the index in the modifier of all instanced objects.

enter image description here

Hide the instanced collection, and play with the lattice :

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ Hey Gorgious, thanks for this amazing in-depth explanation! Loosing textures is a problem but maybe I can find another workaround for that. For now I will try out your approach and see where it gets me with my scene. Thanks a ton! $\endgroup$
    – Tillomat
    Jul 19 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.