[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Object Graphics newbie question
> My first question is: should I be using Object Graphics? I have no feel
> for how complicated it would be to implement the
> zoom/translate/selection features in Direct Graphics.
This depends greatly on how you decide to navigate. Using idlgrmodel's
built in methods the best you can accomplish is something similar to the
flythrough in the demo programs. If you have used this you know how much
this approach sucks.
I have written a camera object that allows intuitive control of object
graphics scene composition based on the camera (or viewer location) and
either pitch, yaw and roll values or a lookat point. I am planning on
making it publicly available soon, but if you wish I could send you the .pro
files. You will have to put up with incomplete documentation and since you
would be the first person other than myself to use the objects I would ask
that you provide some feedback so I can work out any kinks before I set
these guys free. With that said, object is simple to use so I don't think
that would be too painful.
> My second question is: Suppose I should use Object Graphics, should I
> use IDLgrPolygon for each data point, or should I try to do this using
> IDLgrPlot with a self-defined IDLgrSymbol (I want a filled symbol in
> order to see its color clearly). The "Objects and Object Graphics" IDL
> manual gives both as a possibility, but I am unclear on the relative
> merits of each.
This is a good question and unfortunately I can't tell you what the most
efficient approach would be. Since you want to select each object you'll
have to define each object individually. It would be easier to go the plot
approach since using the polygon object you would have to define each vertex
in the symbol explicitly (instead of just defining the center). Maybe define
50 or 100 objects using each approach and look to see how much memory the
objects consume. I would assume they would be different, maybe one is
significantly different? For a symbol, I would define a 3d diamond. It
would only have 8 triangles which I think is as cheap as you can go.
On rendering speed, this will be totally platform dependent. I routinely
render scenes with over 150k triangles at 5-10 frames per second on a 700
MHz x86 with an Nvidia Geforce DDR graphics card. This is certainly fast
enough to navigate through in real time. The same program running on our
sun ultra 60 + creator 3d does maybe .5-1 frame per second, way too slow to
navigate in real time. In my case around half of the triangles comprise a
terrain model whose connectivity array is optimized. I would guess shoving a
lot of little objects down the renderers throat would be less efficient.
Fisheries Acoustics Lab
University of Washington
School of Aquatic and Fishery Sciences