Animation is lagging

  • #1, by EldarionIISunday, 21. December 2014, 15:06 10 years ago
    Hello,

    I've read this topic but didn't find a solution to my troublem.

    http://www.visionaire-studio.net/forum/thread/animation-lagg...


    My proublem is simular. I have 3 different animations beginning to play at the same time. Aaand it's laggy roll
    It's 6,6 Mb total and there are other animations looping all the time. My PC is capable to run "Dragon Age: Inqisition" with medium settings without any laggs, so I believe it's strong enought to run such animations.
    I tried to preload all 3 animations at once but it didn't help. I can create one united animation but it will be quite hard, cause there are several objects that move with different speed.

    Also I can try to split every animation, so there will be 6 half short animations. But it seems quite strange to me.

    So what whoud I do? roll

    P.S. When I'll solve this problem I'll be finally able to show You demo-version guys smile

    Newbie

    18 Posts


  • #2, by afrlmeSunday, 21. December 2014, 15:29 10 years ago
    Apparently VS now loads frame by frame, so preloading is not really much use anymore. What is the average size of the frames?

    You could optimize them into smaller file sizes by downloading a nice image batch converter tool (it's freeware) & converting all the images to webP format. Even at 100% quality the images should be at least 1/5 to 1/2 size smaller in file-size which should help reduce lag & increase loading speed of each of your frames. wink

    I too can run Dragon Age on my laptop, not sure about inquisition, but the second one on high settings, as well as other games like borderlands (all of them) & bioshock infinite etc. But they are all 3D games. 2D games require more memory/vram etc because animations tend to be larger in size than 3D versions. You could try increasing the memory cache whatsit in the main game properties tab to say 80mb or so - might help.

    Imperator

    7278 Posts

  • #3, by EldarionIISunday, 21. December 2014, 15:41 10 years ago
    Well, I've set 500 Mb cache but it did't help (btw is there could be problems if I left cache like that?)

    I'll try to follow your advise but is there a difference if I unte all 3 animations in one peice?

    Thanks!

    Newbie

    18 Posts

  • #4, by EldarionIISunday, 21. December 2014, 15:50 10 years ago
    Average size:
    1)22kb
    2)80kb
    3)360kb - affects light in a room

    Newbie

    18 Posts

  • #5, by afrlmeSunday, 21. December 2014, 15:54 10 years ago
    you mean inside of same animation? well I guess the file-size per frame will go up.

    What is the light animation doing? You might be able to get away with a single image & adjust transparency with the set visibility action part - well depending on what it is for.

    Imperator

    7278 Posts

  • #6, by EldarionIISunday, 21. December 2014, 17:00 10 years ago
    I think it will be more simple if i tell you what's going on smile

    Our hero climbs on boxes (1st animation) and falls on a flor. When she falls she reaches light bulb (2nd animation) and a rope (3rd one). They are strating to swing, light bulb is blinking and in a second a room becomes dark (for a 2 seconds). We have no time to draw hero trying to stand up after falling so we've decided to do like this smile So we use different transparency darkness with light bulb animation.

    Sorry for my English :S

    P. S. if you didn't get me, I can upload demo verision for you and tell you what to do smile

    P.S. Yes it was average size for each frame inside every animation.

    Newbie

    18 Posts

  • #7, by gustySunday, 21. December 2014, 18:13 10 years ago
    Are there any plans on re-working preload feature in upcoming versions?

    Forum Fan

    159 Posts

  • #8, by afrlmeSunday, 21. December 2014, 18:21 10 years ago
    If you could provide me with a demo .ved & resource files needed to run it, then that would be most helpful, cheers. wink

    English is fine, don't worry about it. It's actually more annoying to constantly read: "please forgive/sorry for my English" from all non-native English speakers. Compared to how most native English speakers talk/write these days I prefer to read/listen to non-native speakers! razz

    As long as the lighting is essentially just an overlay type of image & doesn't actually change any of the lighting/shadows in the main scene/background then you can do that with a single image file & use the set opacity action part or lua script to control the transparency of it.

    Check out this dynamic lighting tutorial I wrote in the wiki @ here. There's a .ved file linked at the bottom of the page too.

    It's also possible to control lighting with lua & the openGL shader. I've shown an example of using shader to generate/control lighting in this hotspot tutorial - I've applied an openGL shader spotlight around the camera & using a loop the light strength etc is dynamically updated & if you click on the candle then the light will go out & then flicker back on.

    Imperator

    7278 Posts

  • #9, by afrlmeSunday, 21. December 2014, 18:32 10 years ago
    @ gusty: all the preload feature did was preload the entire animation. The new method loads frame by frame instead of the entire animation, thus loading & lag should be severely reduced for both modern & older machines.

    If you use webP format for your images & animations then loading/lag will be even further reduced. Check out the screenshots in the image encoding page I just added to the wiki. In particular the second & fifth images - I highlighted the combined file-size for all of the animation frames for .png & again in .webP format. I ended up compressing the animation down by almost 50% (1.5mb to 800kb approx) with no difference in quality. wink

    Imperator

    7278 Posts

  • #10, by EldarionIISunday, 21. December 2014, 18:53 10 years ago
    https://drive.google.com/file/d/0Bw_R7mOLQc8BTmhyS181TllGVkU...

    This is PC version. It may require some C++ files, but I guess you have them anyway smile

    It still lack some sound files but you can fiinsh this demo anyway. To find animations that are lagging 1st use photo near main hero, 2nd go to a warehouse, 3rd use aceton object in right top corner.

    Do not forget to read tips and feel free to share this link. Have fun! =P

    P.S. I would be really greatful if you'll tell me about test translation quality and everything else.

    Newbie

    18 Posts

  • #11, by EldarionIISunday, 21. December 2014, 19:15 10 years ago
    Ok. I've used XnConvert and it's not lagging anymore! Thank you smile

    Now I'll polish timing.

    Thank you for tip about light I'll read this later.

    Newbie

    18 Posts