Re: IDL Objects Graphics cache and crash [message #29677 is a reply to message #29673] |
Mon, 11 March 2002 10:50   |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
>> In IDL online help topic "The Graphics Object Hierarchy -> The
>> Rendering Process" one can read about draw cache: "Subsequent draws
>> of this graphic atom to the same destination can then be drawn very
>> efficiently."
>
> Hey cool! I never noticed that paragraph before. (I've never noticed
> the behaviour it describes, either.)
I whipped up a little hack to test this and I do see the benefits in high
polygon scenes. I suspect that what is being cached are the vertex normals
used to compute lighting. Low poly scenes aren't limited by these extra
calculations so you don't see the benefit. My test used an orb with a
density of 10. Without changing the vertex data I would get around 65
frames/second. When I did change the vertex data on each frame I got around
15 fps (you need to comment out the "self->BuildPoly" line in
orb::setproperty for this to work).
>> But it seems not to work as declared. When I change HIDE property of
>> some graphic atom and then draw window it takes the same time as
>> first drawing. What's wrong?
>
> Probably the documentation.
>
> By the way, I find the paragraph immediately before the one you refer
> to particularly amusing--the one that begins, "The order in which
> objects are added to the hierarchy will have an impact...". It fails
> to mention the fact that the visibility of all OG atoms, except
> images, is controlled by position in 3D space, not by drawing order.
>
Not totally true. Visibility of OG atoms is controlled by position in 3D
space AND by drawing order. The latter only comes into play when your atoms
are transparent (textured with a image containing an alpha channel). Karl
might have to correct me but as the view heirarchy is traversed the atoms
are drawn negative z verts to positive. This has implications both in the
visibility of the scene as a whole (seeing thru one atom to another) and for
the visibility of the atoms themselves (seeing the back side of a
transparent 3d object). For a full discussion on this search the newsgroup
for "pimento problems".
>> I tried different renderer and retain, but can not get any
>> acceleration. I use Win98, IDL 5.4, video ASUS AGP3800.
>
How do you know that you aren't seeing any acceleration? In simple scenes
you will probably not see a difference. Have you tried an OG benchmark?
The TNT2 chipset on that card is fairly decent and should provide an
improvement over the software renderer. I suggest running time_test_gr2.pro
with both the software and hardware renderers. (if you don't have a copy,
myself or others on the list can provide one)
On the subject of general stability, I second Mark's comments. The video
driver can be one source of problems but only when rendering in hardware
mode. If you use the software renderer and still run into problems it is
probably not your driver. Also, win9x is very unforgiving when you are
sloppy with OO programming in IDL. I have had much better luck with Win2k.
-Rick
|
|
|