Forum

User posts hpi3D
14 December 2016 20:31
Just to let you know, I set the max number of frames to 48 and changed the four armature animations I have to match that. Now the plate animation doesn't wobble anymore like it did with the earlier 24 frame animation. Fortunately, it didn't affect the loading time at all so everything's fine now. And I'm really, really happy! Still don't know what exactly caused it but it doesn't matter now, problem solved.

Cheers, Harri
14 December 2016 19:32
Glad that our problem solvet but if you can reproduce the issue it will be helpfult for us to find a bug or a problem in that incorrect animation.

Yeah, well, the problem still exists in the actual scene and I really don't know why. It just doesn't appear when the object is in a separate file with its armature (see attach.) I checked the Graph Editor but it didn't help. The sticky keyframes still appear on the timeline.

I'm about to finish the project this week, just finalizing things really, so I don't have time to delve into this much longer. If I can't find the solution for the wobbliness I leave it there. I think I try first those 48 frame animations and see how much it will affect the initial loading time (which, by the way, was reduced to 30 secs instead of nearly 60 secs, thanks to your material tips! ).

Cheers, Harri
14 December 2016 18:58
Hi Mikhail,

Hi. Why you used bone animation instead of simple object animation?

That's because I need to treat it as one selectable object, where part of it (the plate and arms) rotates and the rest of it (the base) stays put. I figured this was the way to do it, so that when selected the whole object is highlighted appropriately. If the whole object rotated, the object animation would do fine.

Can you attach a simple blend file with this objects and animation on it?
You know what? When I appended the object and its armature to a new blend file, the problem disappeared altogether! It works just perfectly there! What is going on here? In the complex scene it causes problems but on its own all is fine. Go figure! Anyway, there's no point sending you that sample file since it's working.

I'm a bit baffled to say the least. I already (accidentally) deleted all the animations from my scene and had to put them in place again, so there can't be anything wrong there. However, I noticed there are couple of really sticky keyframes that hang around in the timeline but won't show up in the dopesheet at all - not even with the ghost button (show hidden) on. I think they could be some of the original ones I had before I decided to make the animations shorter, and this plate object was one of the first ones I animated. This might be really far fetched but is it possible that they affect the scene for some reason? Where can I find / delete the sticky keyframes if they are not in the dopesheet?

Cheers, Harri
14 December 2016 16:38
Hi guys,

As I've been struggling with keeping my visualization as compact as possible, I've also shortened the animations to max 24 frames each. As a result of that, one of the animations goes wrong. The animated object seems to be jumping (or scaling up/down - don't know which) while rotating 360 degrees around its Z axis (see attach.). This happens both in the viewer and when running the application. As 24 frames is too short a time for the object's rotation, I've slowed the animation in javascript with m_anim.set_speed().

My first thought was that the armature was not in the center, but actually it was dead center and everything looks fine in Blender when you run the animation there. I then tried to increase the number of max frames so that the object rotates 360 degrees in 36 or 48 frames instead of 24. The jumping effect is barely noticable in 36 frames and non-existent in 48 frames. So it looks like it has something to do with the length of the animation in frames.

At this point I think the only solution is to increase the max number of frames to fix the problem, or do you have other ideas?

Cheers, Harri
08 December 2016 19:05
Just a quick question: What are the RTs mentioned in the viewer? That seems to stick to 80 MiBs even though I've done a lot of cleaning already.

I've combined textures and got rid of obsolete ones, and also scaled down few of them and with all that managed to get the total size of the textures down to 50 MiBs (originally 95MiBs) and also the geometry is down a few megs. The result? The load time is still 50 secs. Well, back to the grind…

That's why I'm really curious about the RTs…

Cheers, Harri
07 December 2016 17:52
I've finished all but one animation and then I'm done with that (I hope). The next task is to simplify the model which is sort of an ongoing process for me. If that won't help enough I will then send you the files for inspection. The 3D model and textures are not yet in too good state which explains a lot of the slowness.

I noticed in the HUD that the shadows and glow materials take some processing time but do they affect the initial load as well? I might be able to bake some shadows in places that never change and would benefit from baking. Also, the glow materials are not essential for my visualization, even if they look nice.

Cheers, Harri
07 December 2016 12:51
Hi Mikhail,

I managed to combine some of the animated materials together (had 5 animated water and 2 gas materials before, now 1 each) and got rid of the extra mask textures (before 4, now 2). I cleaned up all the extra materials from the Blender file as well. I took new screenshots from the viewer (see att.) and as you can see the textures take now nearly 30 megs less than before. Unfortunately, the result was really minimal, the load still takes about 50 seconds instead of 30 as before adding the animations. Any other ideas - besides cleaning up the meshes (which I will do anyway soonish…)?

Cheers, Harri
06 December 2016 19:51
So, you need optimize your objects in that way: combine as many materials into one material, may be you can make one animation for longer part of tubes and then play it step by step using NLA animation strip. It's only the way. So, than less the draw calls then better for perfomance, than less the dynamic objects than better for perfomans. You can add huge amount of animations but if they all will be played on only one dynamic object - this will increase perfomance of your application.

Thank you again, Mikhail! I will try combining the materials as far as I can. The mask textures may make it a bit tricky as I've used them for changing the colors of the water/gas objects along the length (that's how I got the long water tubes change from blue to red…). I may find a better solution for them as well. Once I know now what's causing it, I can hopefully do something about it.

Cheerio, Harri
06 December 2016 18:14
Thanks Mikhail,

Here are the screenshots, hope they help to analyse what's going on in the scene. Clearly the geometry and the textures take both a huge junk of MiBs, so I think they are the ones I need to go through first. However, the loading process slowed down remarkably when I added the animations and with them the new transparent materials. Any tips would be greatly appreciated!

Cheers, Harri
06 December 2016 12:58
Hi guys,

I tried several different transparency combinations for my chp plant visualization but unfortunately I couldn't make any of them work the way I wanted. Then I came up with a quite clever (imho) solution where I turned the whole setting around. I changed the water and gas (that run inside the pipes) as opaque and static meshes. To give them a feel of movement I added a simple texture animation where stripes move along the materials. I haven't actually tried the Inherit material node in the Logic editor, so I don't know if there's any difference between these two approaches.

Then I changed also the steel material for pipework transparent (or actually translucent) when the animation is running. I animated the steel material with the Value node so that the default Value is 0, and during the animation the value is set to 1. The Value is then used for switching between two different base materials and alpha values.

Here's the node setup for the woodgas :



and this is the "clever" part, the animated steel material:



This is how it looks when all the animations (a lot of them) are running at the same time. Because of the complexity of the scene it was very difficult to get all the bits and pieces work together with transparencies.



Only downside with this setting is that because of all the animations, the loading time of the data in the beginning has nearly doubled even though the amound of data in MiBs hasn't actually grown much at all. Is there any way optimize the animations so that the load wouldn't take that long? Or is there an better way to change the materials, perhaps?

Cheers, Harri