Ranjan.George wrote:
Hi All, Been struggling with this issue for quite a while now. Requirement: To be able to display a molecule using spheres (for atoms) and cylinders (for bonds between the atoms) on the Canvas3D.
One shape for bond and for atom is probably out of question. You have to find some other way to optimize the stuff. One possible solution is to use immediate mode rendering. Yes, this will slow down everything, but you will have not problem with memory usage - one geometry for sphere, one for bond, few appearances to juggle. Please check out performance with that - maybe it will be enough and there is no need to look further. How much light effects do you want to use ? Maybe particle system would be a solution ? Use view-oriented quads with circle texture to display atoms (of course not oriented shape for each, because you are back at start - write your own system using one big quad array updated on each frame). This gives the problem of not taking light into account. If it is important, you can probably try to play with multitexturing, possibly using normal map and dot3 operator - there is a chance for getting very smooth shading without adding any vertices. There can be a problem with specular highlight - I'm not sure, but I think that java3d does not expose enough functionality to play with normal map and specular highlight in hardware. Benefit of his solution would be an extreme speed - you will update and display 10000 quads instead of 10000xhundred or more triangles for sphere. If you can live with no light effect, then you can probably even use point geometry with antialiasing - it makes very nice circles on screen. For bonds, think heavily about using thick lines. Once again, you are reducing number of shapes tremedously, here there would be even no need to update them in realtime. Artur =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
