[vtkusers] Molecule structure

Rasmus Hemph rasmus.hemph at chalmers.se
Thu May 19 10:46:22 EDT 2005


 > How much is "dramatically"?

I am simulating particles in a fluid, where the particles are 
represented by a position and a diameter. Previously I would set 
spherical glyphs on all positions, but when I got to over 3000 
particles, I typically had to set the sphere resolution to about 4 which 
made the spheres look like pyramids..

If I wanted to render an animation, I would increase the resolution and 
leave it on for off-screen rendering wich took about 2 hours typically. 
My first try with OpenGlPolyDataPointSpriteMapper produced the same 
images in about 5-10 minutes. Clearly impressive!


 > Size sorting. Not that hard to do, perhaps you want to have a go
 > yourself. I'm assuming you have a scalar array of sizes (one per >atom),
 > then just sort by either increasing or decreasing size and then do a
 > glend glpointsize glbegin in the mapper between changes of size.,
 > Clearly a size which is related to atomic number (ie integral steps)
 > will be most viable, if there are thousands of sizes all 0.00x apart,
 > then things are going downhill.


Unfortunately as I take it, my particles (can) have a Gaussian size 
distribution. The glpointsize can only be an integer right?
I will try and see how far I get, but currently the particles I am 
simulating are monosized, so it is not an immediate problem at the moment.

 > No problems like this for me. But I think I did find a bug that I 
 >didn't
 > call glDisable(stuff) correctly somewhere and possibly this is leaving
 > gl in a funny state, but I  don't really believe it. I can send my
 > latest versions if you want just to try.

Yes, I would like to try a later verion. My root window gets a bit 
"garbled" sometimes when I am running my case, perhaps this is related?

Best Regards
Rasmus H



John Biddiscombe wrote:
> 
>> I can confirm that the code is working with the current cvs (from two 
>> days ago). It has dramatically helped reduce rendering time for my 
>> case (3000-20000 particles). I would be very interested to know 
>> if/when you get size sorting to work!
> 
> 
> How much is "dramatically"?
> 
> Size sorting. Not that hard to do, perhaps you want to have a go 
> yourself. I'm assuming you have a scalar array of sizes (one per atom), 
> then just sort by either increasing or decreasing size and then do a 
> glend glpointsize glbegin in the mapper between changes of size., 
> Clearly a size which is related to atomic number (ie integral steps) 
> will be most viable, if there are thousands of sizes all 0.00x apart, 
> then things are going downhill.
> 
> NB. Size sorting is not going to be compatible with any blending unless 
> the two simple modes (occlude/accumulate) are used as they don't require 
> depth sorting. (I've not implemented depth sort for blending yet, but it 
> is planned at some point).
> 
>> One caveat. For some reason my computer locks up (X freezes, and I 
>> have to log in from another computer to kill it..) about every third 
>> time when I try to exit my application with the new 
>> OpenGlPolyDataPointSpriteMapper. I am running Debian linux 2.6 with 
>> the latest Nvidia display drivers. Have anybody experienced the same 
>> problem?
> 
> 
> No problems like this for me. But I think I did find a bug that I didn't 
> call glDisable(stuff) correctly somewhere and possibly this is leaving 
> gl in a funny state, but I  don't really believe it. I can send my 
> latest versions if you want just to try.
> 
> JB
> 
> 
> 




More information about the vtkusers mailing list