Hello Artur -

Modern graphics cards draw polygons to subpixel accuracy, and use strict rules
for deciding which pixels to draw.  As you have surmised, a pixel is drawn if and
only if it is inside (or, in some cases, on the boundary of) a triangle.  Drawing tiny
polygons will produce exactly the behavior you are seeing - as the polygons move
around in screen space, they will appear and disappear based on their pixel
coverage.

You've already mentioned most of the simple solutions.  You could draw the raindrops
with small vectors; just make sure the length of each vector is at least 1.0 in screen
space.  Polygon antialiasing may help, although be aware that the supersampling
algorithms used for today's AA can still produce the behavior (it just takes smaller
polygons).  You could also consider using point primitives if you want to light only
a single pixel per drop.

Regards,

Brad Cain
Conceptual Integrity, Inc.

> -----Original Message-----
> From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]]On Behalf 
>Of Artur Biesiadowski
> Sent: Sunday, April 08, 2001 7:56 AM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] Subpixel polygon sizes
>
>
> What are the exact rules for displaying polygons which have width less
> than one pixel on output screen ?
>
> During playing with my particle system I was trying to create a rain
> effect. I'm using thin rectangles to simulate rain drops. Everything is
> ok as long as they won't get too thin - they suddenly start to
> disappear/reappear randomly (depending on fact if they cross pixel
> boundary I suppose).
>
> This is not critical for my work - I can use textured polygons, which
> are a bit wider, or play with LineArray instead. But this is a bigger
> problem - do polygons are supposed to disappear when they are smaller
> than one pixel in some dimension ? Will antialiasing help here to get
> subpixel shapes drawn ? Is this graphic card dependent ?
>
>
> 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".

Reply via email to