Code Monkey home page Code Monkey logo

Comments (9)

rdb avatar rdb commented on May 16, 2024

Please attach a test case.

from panda3d.

rdb avatar rdb commented on May 16, 2024

Also, could you clarify what you mean by "terrible performance"? In PStats, which specific areas are you seeing a bottleneck in for your application? How many milliseconds are you seeing taken up by this?

Are any of the measures explained in the manual to help optimize your application having any effect, such as effectively using flatten groups?

from panda3d.

cmarshall108 avatar cmarshall108 commented on May 16, 2024

In a small environment with a few models all nodes flattened, i average around 40fps; i also don't experience any studdering during frame flips. Technical specs,

Processor: Intel Core i7-3770 CPU @ 3.40GHz
Ram: 32 GB DDR3 - 1600 MHz
Graphics Processing Unit: Nvidia GTX 1080 - Founders Edition

Pstats info:

https://gyazo.com/8d730725f190ce3fa59bb317ad65198b
https://gyazo.com/327f72423d32af6ae84bacd498326e4c

Flattening models does indeed help, but not by very much.

from panda3d.

rdb avatar rdb commented on May 16, 2024

That PStats chart is showing around ~14ms, which translates to 72 FPS. Were you seeing 40 FPS at that exact moment? If so, that leaves about 11ms unaccounted for in your chart; it would be useful to see which categories that is divided up into.

(Note, in case it was not yet clear, that you can double-click an area of the chart to subdivide it into components, which can be used to narrow down performance bottlenecks further.)

Either way, it does seem that your frame time is disproportionally dominated by Animation, which looks like a major bottleneck in your application; you could stand to significantly increase your FPS by optimizing that. This can be caused by excessive vertex animations or overuse of the RigidBodyCombiner. This gives you some indication where to look in your application - it could be, for example, that certain objects or parts of objects are being animated needlessly or with unnecessary detail.

However, an easy silver-bullet solution to address performance issues with CPU animation is to use the hardware skinning support in 1.10. It's not enabled by default since it is still experimental and requires use of shaders. You will need a recent build of Panda and these Config.prc settings to enable it:

hardware-animated-vertices true
basic-shaders-only false

And then you need to call .setShaderAuto() (or apply a custom shader that supports hardware skinning) on the animated objects, otherwise it will not take effect. If applied correctly, you should see most of the time spent in Animation melt away.

from panda3d.

rdb avatar rdb commented on May 16, 2024

I checked in a performance improvement for CPU animation, although I still recommend going the GPU animation route. Also, please note that compiling Panda3D with Eigen support enabled may drastically improve the performance of animation-bottlenecked applications.

from panda3d.

rdb avatar rdb commented on May 16, 2024

Could you provide an update on whether the suggested changes have had an impact on your application's performance issue?

from panda3d.

cmarshall108 avatar cmarshall108 commented on May 16, 2024

Hello, i've tested out a few things. It seems that older BAM files have issues when drawing geometry it could be too many Geom objects within the scene, i did convert the bam files to egg files but there still seems to be an issue with that.

from panda3d.

rdb avatar rdb commented on May 16, 2024

I'm afraid that's not a whole lot to go on. If you shared the .bam files in question, though, I might be able to help you identify the bottlenecks and give you advice on how the scene could be further optimized.

from panda3d.

rdb avatar rdb commented on May 16, 2024

I'm going to close this as a resolution has been offered for the only issue that was found in this thread. Feel free to open another GitHub issue if you identify another performance bottleneck. If you need help tracking down bottlenecks, just open a forum thread or join us on IRC and we'd be happy to help.

from panda3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.