0
$\begingroup$

I would like to use Blender for construction sequence animation. (Like this https://www.youtube.com/watch?v=g6sSbazsyLw)

Since the nature of construction sequence animation, I need to turn on and off(or fade in and out) in Visibility Option(Or Material Alpha) a lot.

I usually faces 3 types. Construct, Temporary and Demolition.

The Construct sequence is starting from Off and then On at specific keyframe.

The Temporary sequence is starting from Off and then On at specific keyframe and off at specific keyframe as well.

The Demolition sequence is starting from On and then Off at Specific keyframe.

I have been doing this by inserting keyframes manually but i got too many object. And to make fade in and out i need to separate material from original too many times.

If you know any good addon or function in Blender to make the process easy, please comment below.

Thank you!

$\endgroup$
1
  • $\begingroup$ @Gorgious this is lovely idea! thank you for the information. I really appreciate. $\endgroup$
    – DY Lim
    Jul 29 at 8:38
2
$\begingroup$

It's a complex topic and I think people underestimate the time it takes to make this kind of animation. Most of the time it's hand animated and it takes several weeks to do it, not even factoring in the modelling time.

That being said, with more recent versions you can use custom properties per-object to fade objects in and out. You then don't have to animate materials individually, but object properties.

Using an Attribute node set to Object, type in the name of the attribute (can be whatever you want).

enter image description here

Select the object, add a custom property. Edit it and rename it exactly like in your Attribute node.

enter image description here

Now you can have multiple objects that share the same material and animate the alpha individually.

enter image description here

If you have multiple materials in your scene (wood, steel, glass, PVC, etc.) you can turn it into a node group. Select the Attribute, Transparent and Mix Shader nodes and press CTRL + G or Node > Make Group to make a node group.

When inside the node group (you'll notice the backdrop has a green tint now), press TAB or click on the arrow in the top right to go back to the base shader.

enter image description here

enter image description here

Now you can just plug the new node group in every material just before the Material Output node and you'll be able to control the object's transparency with a custom property on the object itself.

enter image description here

If you want to create sub-groups with the same fade behavior, you can drive the custom properties easily :

enter image description here

If the custom property is animated using keyframes, you can link them by selecting your target objects and selecting the source object last, and using CTRL + L > Animation Data or Object > Link/Transfer Data > Animation Data.

enter image description here

Note : The cubes will now share the same animation data. In case you change the keyframes of one property, all the other objects with linked animation data will behave the same.

If after linking the Animation Data you want to make each object's animation independant, use F3 and search for "Make Single User", then check "Animation data" and click OK. You can also go Object > Relations > Make Single User > Animation Data. You can alternatively go into the outliner, expand the object properties, right click on the Action and choose "Make Single User".

enter image description here

$\endgroup$
5
  • $\begingroup$ Hi Gorgious thank you for sharing the lovely idea and your kind explanation. I didn't know that i can use object attribute to material. One quick question, Do you have any idea that i can just copy the animation data to another but not link(cus it has problem like you mentioned in "Note"). $\endgroup$
    – DY Lim
    Jul 29 at 8:56
  • $\begingroup$ @DYLim thanks :) you can "make single user" on the animation data block, that means they lose their links to each user. I've added a paragraph to the end of the answer $\endgroup$
    – Gorgious
    Jul 29 at 9:03
  • $\begingroup$ thank you for the answer. Yes, "Make single user" can solve the problem of the link. However, In the middle of work, If i link the animation to another which already had keyframes, the action would remove the whole progress. $\endgroup$
    – DY Lim
    Jul 29 at 9:11
  • $\begingroup$ @DYLim You can copy and paste only certain keyframes from object to object. you can access them in the Timeline or graph editor $\endgroup$
    – Gorgious
    Jul 29 at 9:55
  • $\begingroup$ +1 ....but...where is the rotating screw animation...!? 😎 $\endgroup$
    – Chris
    Jul 29 at 12:56
2
$\begingroup$

you could create a transparent shader like this so what will happen whenever the camera goes closer to the any object so the object will fade automatically which you can control ..... there will be many objects so you have to run a script which will apply this shader to every object in the sceneenter image description here

script

import bpy

#group = bpy.data.node_groups['your_node_group_name']
group = bpy.data.node_groups['1CameraBasedTransparency']

#get all non grease pencil materials
materials = [mat for mat in bpy.data.materials if mat.use_nodes and not mat.is_grease_pencil]
for mat in materials: #iterate over materials
    node_tree = mat.node_tree #get node-tree of material
    
    output_node = node_tree.nodes['Material Output'] #get output node of material
    principled_node = node_tree.nodes['Principled BSDF'] #get Principled node of material
    
    #add a group node in material
    group_node = node_tree.nodes.new('ShaderNodeGroup')
    group_node.node_tree = group

    #link it to Principled node
    node_tree.links.new(principled_node.outputs[0],group_node.inputs[0])
    #link it to output node
    node_tree.links.new(group_node.outputs[0],output_node.inputs[0])
$\endgroup$

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.