Forum

animation with build modifier

21 November 2016 14:57
Hi guys,

I'm working on my app where I need a similar animation that was used in the dairy plant demo, i.e. "water" running through pipelines. The obvious way of implementing this is to add a curve that follow the pipes, convert it to a mesh and use the build modifier for the animation part. But, then I'm stuck, I don't know how to bake the animation in Blender!

I tried to baking an action but it doesn't seem to work as the animation disappears the moment I remove the modifier, and I can't apply the modifier either. Am I on the right track with this or is there a simpler way doing this? Any hints on how to do this?

I've already managed to add another animation to my app and it's working perfectly, but this one is a bit trickier, it seems.

Cheers, Harri
21 November 2016 15:31
'm working on my app where I need a similar animation that was used in the dairy plant demo, i.e. "water" running through pipelines. The obvious way of implementing this is to add a curve that follow the pipes, convert it to a mesh and use the build modifier for the animation part. But, then I'm stuck, I don't know how to bake the animation in Blender!

I tried to baking an action but it doesn't seem to work as the animation disappears the moment I remove the modifier, and I can't apply the modifier either. Am I on the right track with this or is there a simpler way doing this? Any hints on how to do this?

I've already managed to add another animation to my app and it's working perfectly, but this one is a bit trickier, it seems.
Hi, in the Diary Plant demo it was made using material animation only and it's the best way and the only (for now) to make such things. I prepeared a simple example for you. Pay atention to Value node that animated and UVMap that created for the geometry it's most important par of this setup.

pipe_animation.blend
Blend4web and that kind of thing.
21 November 2016 17:20
Many thanks for your example, Mikhail! It helped a lot.

The animation looks now perfect on the viewport and the viewer when the pipes have been hidden from scene, but I don't know how to make the "water" visible through the pipes. I tried Transparency and X-Ray in the Object settings and different Z Offsets in the Material settings. I checked that the animation was really running in the Viewer but you just can't see it through the pipes. Any ideas?

Also, I guess I'm still missing something essential as I'm not able to export the animation to the json file. When trying to export the file, I get an error message "The action 'Shader Nodetree action' has no fcurves." This may be something very simple and basic but I'm not very familiar with the animations stuff.

Cheers, Harri
21 November 2016 18:03
I tried Transparency and X-Ray in the Object settings and different Z Offsets in the Material settings. I checked that the animation was really running in the Viewer but you just can't see it through the pipes. Any ideas?
Can you attach an example of your setup?

"The action 'Shader Nodetree action' has no fcurves." This may be something very simple and basic but I'm not very familiar with the animations stuff.
It mens that you have a shader action that is empty, so there's no fcurves in it. You will need to do a revision of your acion manually to understand what action has no fcurves. This warning not critical but annoin.
Blend4web and that kind of thing.
21 November 2016 21:12
Here's a part of the model, and it's not that pretty. Still too much geometry that I need to clean up when I have time for it. But it should give a picture of what I'm dealing with. I couldn't make this version work either, so I would be happy if you could have a look what's wrong in there.

Btw, the export failed earlier because I had couple of curves on the scene. The export gave a warning "there's no geometry to export, converting to empty", but I think it failed after that since it didn't overwrite the old json file. Once I converted the curves to meshes (they were for the pipe animation) the export worked fine. Bug perhaps?

Cheers, Harri
22 November 2016 10:51
Here's a part of the model, and it's not that pretty. Still too much geometry that I need to clean up when I have time for it. But it should give a picture of what I'm dealing with. I couldn't make this version work either, so I would be happy if you could have a look what's wrong in there.
You can set "render above all" checkbox on "Kylmä vesi" material so it will be visible above all other materials, but you need to change Trancparancy Type to Alpha Blend or Sort.

Btw, the export failed earlier because I had couple of curves on the scene. The export gave a warning "there's no geometry to export, converting to empty", but I think it failed after that since it didn't overwrite the old json file. Once I converted the curves to meshes (they were for the pipe animation) the export worked fine. Bug perhaps?
I think it's a cash. You need to set Disable Сache in your browser console preferences and test your application with opened console.
Blend4web and that kind of thing.
22 November 2016 14:58
Thanks again, Mikhail!

Now you can finally see the animation there, but because of the Render Above All setting the water seems to be running all over the place… . This is a pretty tricky situation as optimally the water should be rendered above the pipe but not all the other objects and I honestly don't know if it's even possible. The screen capture is from the actual visulization project I'm currently working on..



Another issue that just came up this morning while having a meeting with my clients was the possibility to change the color of the water from blue to red (as when heating up). Again, I don't know if it's even possible, but I tried the following node setup where added keyframes for the Fac field in the ColorRamp node. Unfortunately, that intuition didn't work, since the animation uses the Fac field as it is at that moment, in this case the water stays blue for the duration of the animation. Do you know if it's "do-able" at all or should I just discard the idea?



Cheers, Harri
22 November 2016 15:23
Another issue that just came up this morning while having a meeting with my clients was the possibility to change the color of the water from blue to red (as when heating up). Again, I don't know if it's even possible, but I tried the following node setup where added keyframes for the Fac field in the ColorRamp node. Unfortunately, that intuition didn't work, since the animation uses the Fac field as it is at that moment, in this case the water stays blue for the duration of the animation. Do you know if it's "do-able" at all or should I just discard the idea?
It's not possible to make animation for every node, but you can animate Value and connect it to any gray input and RGBColor node and connect it to any color input. You can see one of implementation of this in the example.

Now you can finally see the animation there, but because of the Render Above All setting the water seems to be running all over the place… . This is a pretty tricky situation as optimally the water should be rendered above the pipe but not all the other objects and I honestly don't know if it's even possible. The screen capture is from the actual visulization project I'm currently working on..
I didn't know what kind of the complexity your scene is, so I prepered another exaple for you that can help. Pay attention to type of the trancparency and z-offset parameter of each material.

pipe_animation.blend
Blend4web and that kind of thing.
22 November 2016 16:01
Hey, that looks great! Yes, I should've sent the screen capture earlier but because of the complexity I thought the simpler blend file is enough. Glad you got it sorted out though.

I think I have now all the bits and pieces I need, at least until the next time. Thanks again for all your help!

Cheers, Harri
22 November 2016 16:48
Glad it was helpful.
Blend4web and that kind of thing.
 
Please register or log in to leave a reply.