New ring engine and polygon engine - rendering issues

Hi,

As you may have noticed I have been adding a few new engines recently.
They are all still in development and at various stages of development.
The newest engines, the ring and the polygon engines, have some
rendering issues. They are the only engines that really render flat
surfaces an I am not sure if I have missed anything.

Testing the ring engine with the nanotube file in the testfiles
directory will show you the issues with the ring engine - apparently
normals pointing in opposite directions result in different lighting. As
the nanotube has a curvature you can see the turning point and the
discontinuities. I fixed that to a degree but it still doesn’t look
great. Looks better opaque but some triangles are not rendered.

The polygon engine looks pretty good. Not sure if Benoit will know if a
better algorithm than the brute force one I have used to tesselate the
polygon surface. You can test it with typ-Ru.sdf and it looks OK there.
Some faces are too dark though. Not sure if this can be improved upon.

Then there is the ribbon engine and various enhancements I need to
investigate. I would like to get transparency working but that may not
be possible (or even necessary) with the current rendering method. Then
there is the question of caching calculations using display lists. I
think all three engines do enough calculations and custom drawing that
caching would be beneficial - especially with the ribbon engine.

Hopefully the new engines are useful to people. I will probably try to
put some screen shots on my blog soon to show off their new features.
Surfaces are the next big challenge along with further polishing of
existing features. Hopefully we can get to the bottom of the rendering
issues soon.

Thanks,

Marcus

Hi Marcus,

All that sounds really good, I hope to get the time soon to svn up and try!

The polygon engine looks pretty good. Not sure if Benoit will know if a
better algorithm than the brute force one I have used to tesselate the
polygon surface.

You mean taking a plane polygon and tesselate it into triangle? There
definitely are various algorithms to do that and I think it’s a nontrivial
issue finding an efficient algorithm. Fortunately, any OpenGL implementation
provides that (glBegin(GL_POLYGON)) so at least for the GLPainter you should
have nothing to do. Then, I would assume that the same applies to POVRay and
hence the POVPainter. But I don’t know myself about these algorithms.

Also, by the way I think that Qt’s rasterization of polygons is very
efficient, but of course that’s only useful if you want to rasterize a
polygon into a bitmap.

Cheers,

Benoit

You can test it with typ-Ru.sdf and it looks OK there.
Some faces are too dark though. Not sure if this can be improved upon.

Then there is the ribbon engine and various enhancements I need to
investigate. I would like to get transparency working but that may not
be possible (or even necessary) with the current rendering method. Then
there is the question of caching calculations using display lists. I
think all three engines do enough calculations and custom drawing that
caching would be beneficial - especially with the ribbon engine.

Hopefully the new engines are useful to people. I will probably try to
put some screen shots on my blog soon to show off their new features.
Surfaces are the next big challenge along with further polishing of
existing features. Hopefully we can get to the bottom of the rendering
issues soon.

Thanks,

Marcus


This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft® Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/


Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-devel