comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » questionable display of an IDLgrPolygon Object with some transparency
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
questionable display of an IDLgrPolygon Object with some transparency [message #42052] Tue, 21 December 2004 00:55 Go to next message
Karsten Rodenacker is currently offline  Karsten Rodenacker
Messages: 98
Registered: July 1997
Member
I have a bit surprising display of an IDLgrPolygon object with some
transparency using xobjview, which shows under certain directions some
rippling (Windows XP SP 2, IDL 6.1.1). A reduced screenshot is stored
under http://ibb.gsf.de/homepage/karsten.rodenacker/Misc_WWW/Examp le.jpg.

The same object I have saved into a VRML File. It does not show this
behaviour using the Cortona viewer, although transparency does not come
out. It can be found under
http://ibb.gsf.de/homepage/karsten.rodenacker/Misc_WWW/Examp le.wrl. Be
patient, it is about 10 MB long!

If there is some experience in the group any hints are appreciated to
avoid this rippling.

--
Karsten Rodenacker
------------------------------------------------------------ -------- :-)
GSF - Forschungszentrum Institute of Biomathematics and Biometry
D-85758 Oberschleissheim Postfach 11 29
Karsten.Rodenacker@gsf.de | http://ibb.gsf.de/ | DEL _ for reply
http://ibb.gsf.de/homepage/karsten.rodenacker/
Tel: +49 89 31873401 | FAX: ..3369
Re: questionable display of an IDLgrPolygon Object with some transparency [message #42139 is a reply to message #42052] Wed, 22 December 2004 00:14 Go to previous message
Karsten Rodenacker is currently offline  Karsten Rodenacker
Messages: 98
Registered: July 1997
Member
Rick, thank you for your contribution.

What I don't derive from your explanation is the 'regularity' of the
rippling.
In fact I generate the polygons using isosurface. The rippling occurs only
in in Z-Direction (so to say I have an x,y,z array (cube) and have rotated
it near total projection either to y-z (green-blue axis) or x-z (red-blue
axis), in
http://ibb.gsf.de/homepage/karsten.rodenacker/Misc_WWW/Examp le12.jpg the
effect is even doubled). Hence the sequence of faces does play a role, as
you state (it comes directly from the way isosurface is calculating them).

However I suspect additionally a truncation or rounding error in the
renderer visible only under very small angle differences between the
original coordinate system and the viewing coordinate system. And it
appears only either for positive or negative differences. Unluckily I
don't know how to describe the problem in acceptable and comprehensible
terms for the graphics experts.

I will follow your tips since I can easily reproduce the effect.

Best wishes for the coming season
Karsten

On Tue, 21 Dec 2004 09:11:57 -0800, Rick Towler
<rick.towler@nunya.noaa.gov> wrote:

> Karsten Rodenacker wrote:
>> I have a bit surprising display of an IDLgrPolygon object with some
>> transparency using xobjview, which shows under certain directions some
>> rippling (Windows XP SP 2, IDL 6.1.1). A reduced screenshot is stored
>> under
>> http://ibb.gsf.de/homepage/karsten.rodenacker/Misc_WWW/Examp le.jpg.
>> If there is some experience in the group any hints are appreciated to
>> avoid this rippling.
>
>
> This looks like the nefarious polygon z-order rendering issue that has
> been discussed many times before. Google the group for "pimento
> problems". Robert Schaefer had a similar problem recently so you may
> want to search for that thread too.
>
> The rippling occurs during rotation as polygon drawing order and their
> position relative to others in Z get out of whack. IDL uses a simple
> painters algorithm to render to the screen. For each polygon thrown at
> it, it looks at the z-buffer to see what is already there and if this
> poly is semi-transparent, takes that value and uses it to calculate the
> new z value at that pixel. This works wonderfully if you always draw
> your polys from back to front. But if you don't, the near polygon is
> drawn with nothing but space behind it and the far polygon is never
> drawn since it fails the z-test.
>
> In your case, the banding is caused when some of the triangles are in
> the correct order and some are not. The areas that are lighter show the
> far side of the object as well as the near while the darker bands do not
> show the far side since the near side triangles are rendered before the
> far side.
>
> There are no easy fixes for your complex object. Karl Shultz played
> around with some BSP code which re-orders triangles properly in Z for
> every transformation. I played around with it a bit but found it wasn't
> robust enough to handle my data. It would be worth a shot though. Check
> the RSI user contrib site for IDLbspPolygon or something like that.
>
> Also, and I can't stress this enough. Put in a feature request for a
> new renderer that doesn't have these limitations. Your case is a prime
> example why this needs to be addressed. The competition doesn't suffer
> from this limitation...
>
> -Rick
>
> P.S. My news server has been acting up. If this isn't posted to the
> group, can you forward it on?



--
Karsten Rodenacker
------------------------------------------------------------ -------- :-)
GSF - Forschungszentrum Institute of Biomathematics and Biometry
D-85758 Oberschleissheim Postfach 11 29
Karsten.Rodenacker@gsf.de | http://ibb.gsf.de/ | DEL _ for reply
http://ibb.gsf.de/homepage/karsten.rodenacker/
Tel: +49 89 31873401 | FAX: ..3369
Re: questionable display of an IDLgrPolygon Object with some transparency [message #42146 is a reply to message #42052] Tue, 21 December 2004 09:11 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
Karsten Rodenacker wrote:
>
> I have a bit surprising display of an IDLgrPolygon object with some
> transparency using xobjview, which shows under certain directions some
> rippling (Windows XP SP 2, IDL 6.1.1). A reduced screenshot is stored
> under http://ibb.gsf.de/homepage/karsten.rodenacker/Misc_WWW/Examp le.jpg.
>
> If there is some experience in the group any hints are appreciated to
> avoid this rippling.


This looks like the nefarious polygon z-order rendering issue that has
been discussed many times before. Google the group for "pimento
problems". Robert Schaefer had a similar problem recently so you may
want to search for that thread too.

The rippling occurs during rotation as polygon drawing order and their
position relative to others in Z get out of whack. IDL uses a simple
painters algorithm to render to the screen. For each polygon thrown at
it, it looks at the z-buffer to see what is already there and if this
poly is semi-transparent, takes that value and uses it to calculate the
new z value at that pixel. This works wonderfully if you always draw
your polys from back to front. But if you don't, the near polygon is
drawn with nothing but space behind it and the far polygon is never
drawn since it fails the z-test.

In your case, the banding is caused when some of the triangles are in
the correct order and some are not. The areas that are lighter show the
far side of the object as well as the near while the darker bands do not
show the far side since the near side triangles are rendered before the
far side.

There are no easy fixes for your complex object. Karl Shultz played
around with some BSP code which re-orders triangles properly in Z for
every transformation. I played around with it a bit but found it wasn't
robust enough to handle my data. It would be worth a shot though.
Check the RSI user contrib site for IDLbspPolygon or something like that.

Also, and I can't stress this enough. Put in a feature request for a
new renderer that doesn't have these limitations. Your case is a prime
example why this needs to be addressed. The competition doesn't suffer
from this limitation...

-Rick

P.S. My news server has been acting up. If this isn't posted to the
group, can you forward it on?
Re: questionable display of an IDLgrPolygon Object with some transparency [message #42147 is a reply to message #42052] Tue, 21 December 2004 07:30 Go to previous message
Karsten Rodenacker is currently offline  Karsten Rodenacker
Messages: 98
Registered: July 1997
Member
On Tue, 21 Dec 2004 08:23:12 -0700, David Fanning <davidf@dfanning.com>
wrote:

> Karsten Rodenacker writes:
>
>> I had Hardware rendering, and tried Software but without difference in
>> the
>> displayed result. In
>> http://ibb.gsf.de/homepage/karsten.rodenacker/Misc_WWW/Examp le1.jpg
>> there
>> is a nice Jalousie effect. Unluckily my objects behind the Jalousie are
>> not so extraordinary...
>
> Humm, well then, following my reading of Sherlock Holmes,
> I would have to conclude this is how it is *suppose* to look!
>
> Cheers,
>
> David
>
> P.S. I think what you are looking at is the "quantum foam"
> I've been reading about in Brian Greene's latest books. If
> you are still shopping for your physics friends, I highly
> recommend both The Elegant Universe and The Fabric of the
> Cosmos. They both confirm my suspicion that the world is
> a mystery. :-)
>

If I translate "quantum foam" into "liberal minded calculatorical base" (a
quite rare thing nowadays) we might speek about the same phenomenon. Thank
you for the book recommendation.


--
Karsten Rodenacker
------------------------------------------------------------ -------- :-)
GSF - Forschungszentrum Institute of Biomathematics and Biometry
D-85758 Oberschleissheim Postfach 11 29
Karsten.Rodenacker@gsf.de | http://ibb.gsf.de/ | DEL _ for reply
http://ibb.gsf.de/homepage/karsten.rodenacker/
Tel: +49 89 31873401 | FAX: ..3369
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: reading f77_unformatted and writing it as ascii file
Next Topic: Problems reading ASCII data

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:05:14 PDT 2025

Total time taken to generate the page: 0.00637 seconds