From: Kuzminski, S. R <SKu...@fa...> - 2004-09-09 12:12:07
|
I have also built up scenes that render quite slowly. My first thought is that the constructing python code ( the code that does the algorithms to build the shapes ) may be taking more time than you realize, especially if you are doing something recursive. You may wish to organize your code so you calculate everything you need, create a series of scenes or shapes and then line them up into a queue to be animated ( rather than calculating the next scene on the fly ). Of course if a simple rotate is slow, that is harder, perhaps there is some way of optimizing the calls to VPython so that it creates an tighter GLCallList ( precompiled OpenGL structure that you describe ) I don't know the VPython internals that well. If you are operating on matrixes or arrays ( for example calculating cellular automata ) use Numeric ( or Numarray ) matrixes, iterating over and operating on large arrays of regular python object is slow, you can use Numeric matrixes in expressions that are efficiently ( in C ) calculated. =20 S -----Original Message----- From: vis...@li... [mailto:vis...@li...] On Behalf Of Joel Kahn Sent: Thursday, September 09, 2004 3:40 AM To: vis...@li... Subject: [Visualpython-users] Speed Issues Jonathan Brandmeyer wrote: >Cluster? No, I think that would=20 >be a bad idea for VPython. =20 Bad as in "not cost-effective" (sort of your next point), or bad as in "no significant speed increase at all in a cluster"? I'd be interested in finding out more about whether VPython can benefit from any kind of parallel processing. >Any recent video card will be able=20 >to handle pretty much anything=20 >you can throw at it from VPython. =20 >A scene with several translucent=20 >and textured objects, some using a=20 >source image of 1024x2048 pixels,=20 >can be rendered in only a few ms on=20 >common PC hardware. You really=20 >can't notice that it takes any time at=20 >all, and the UI remains buttery-smooth. I can speak only from my own experience with my 2Ghz Athlon processor, 256MB system RAM, and S3 Graphics ProSavageDDR card (32MB graphics RAM), usually kept in 1024x768 true-color mode, all operating under Windows XP. In this environment, I have been able to put together objects that caused unacceptably slow renderings, "low virtual memory" warnings, and even the odd system crash. When I animate some complex scenes (usually using "rotate" commands in loops), this can produce more issues. Mostly the problems have resulted when I was working with either curves or faces, and running up into thousands of points, *and* doing fancy vector-based rotations as well. I suspect that this is just what happens when a nut like me starts trying to turn out artworks with a language designed for doing physics. :-) Seriously, though--VPython is a great system, and I fully intend to keep exploring it; but everything has its limits, and more powerful hardware *can* help. Joel __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around=20 http://mail.yahoo.com=20 ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=3D5047&alloc_id=3D10808&op=3Dclick _______________________________________________ Visualpython-users mailing list Vis...@li... https://lists.sourceforge.net/lists/listinfo/visualpython-users |