bearstampede / piccolo2d

Automatically exported from code.google.com/p/piccolo2d
0 stars 0 forks source link

visual artifacts when rendering (node disapearance, ghosts, etc) #184

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I was a great fan of Piccolo... I'm still running a custom version of the 
original framework from the university of Maryland.

I have tried to switch to Piccolo 2D, but the rendering quality is simply 
catastrophic to a point where it is not usable at all. The major issues are
- Nodes that disapear without apparent reason and
- Ghosts lines and shapes left on the canvas while moving around.

I have searched in my code without success until I decided to start from 
scratch again to find where run the samples (kind of like going back to school) 
This is where I found that even the exemples were not working !

What steps will reproduce the problem?
1. try the OffsetVsTranslateExample (that is only one sample among others)
2. remove all activities. only keep the following code:
        offset.addActivity(new PActivity(-1L) {
            double speed = 3.0d;
            /** {@inheritDoc} */
            protected void activityStep(final long elapsedTime) {
                offset.offset(speed, 0.0d);
                if (offset.getOffset().getX() >= 282) {
                    speed = 0.01f;
                }
                System.out.println("offset " + offset.getOffset());
            }
        });

What is the expected output? What do you see instead?
I expect to see the node moving from left to right endlessly
What happens is that when offset == 285.0d the node disappears !!!
Plus at the begining of the 'translation' the offset of 3.0d leaves ghosts on 
the canvas ! (see 
http://lionel.victor.free.fr/Capture-OffsetVsTranslateExample.png)

What version of the product are you using? On what operating system?
I have just compiled from trunk (rev 1031)
I already had the problem with older versions but I thought it was comming from 
my coded (being ported from Piccolo to Piccolo2D). Now I know it was not.

Please provide any additional information below.
Linux 2.6.32 x86_64 GNU/Linux
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

I know that Java 1.6 is not 'supported' but I require it for some drag and drop 
features. Besides these visual artifacts have never been visible with Piccolo 
so I'm not sure it comes from the JDK version?

As most examples share the same behaviour/problem, I assume it is a bug.

A quick search on the issues list with keywords like "rendering" "render" 
"visual artifact", "draw", "paint" etc... did not report anything similar.

am I the only one having the problem ?

Original issue reported on code.google.com by lionel.v...@gmail.com on 26 Jul 2010 at 8:43

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for submitting this issue -- it is a duplicate of Issue 180.

Original comment by heue...@gmail.com on 2 Aug 2010 at 2:22

GoogleCodeExporter commented 9 years ago
I'm not 100% sure that the problem in Issue 184 is the same as the one in Issue 
180.  For example, the problem indicated in Issue 184's screenshot suggests a 
bounding problem caused by Piccolo not accounting for antialiasing in computing 
PNode bounds:
http://lionel.victor.free.fr/Capture-OffsetVsTranslateExample.png

The problem in Issue 180 looks like it may have a different cause.

Original comment by samrr...@gmail.com on 2 Aug 2010 at 5:00

GoogleCodeExporter commented 9 years ago
Fair enough, I'll move it back to New.

Original comment by heue...@gmail.com on 2 Aug 2010 at 5:25

GoogleCodeExporter commented 9 years ago
Sorry about the duplicate. I searched for "ghost", "cheese", rendering, etc... 
I should have spotted it...

In Issue 180 you say that Issue 184 (this issue) may be related to Piccolo "not 
accounting for antialiasing in computing PNode bounds". I have taken the 
liberty to attach another screenshot taken with the same modifications above to 
the sample code.
I juste changed the offset to "double speed = 6.0d;" so the node offsets 
faster... As you can see, the remaining chuncks are pretty large... not sure it 
just leaves the antialiasing marks... it really lokks like it istn't cleaned at 
all. ?? strange...

Further more, I insist on the fact that the code offsets forever while in the 
screenshot I've just added, we can clearly see that the moving node just 
disapears without trace when the offset >= 282 ??? Which is indeed even 
stranger... Maybe... There are two bugs in one here... One could be a 
dupplicate of Issue 180, I'm not sure for the other ...

The same sample code linked with Piccolo1.2 from the university of maryland 
works as expected on the same platform... so I do not know if it is related to 
java6 or to the 64 bits linux host.

hope it helps.

Original comment by lionel.v...@gmail.com on 2 Aug 2010 at 6:11

Attachments:

GoogleCodeExporter commented 9 years ago
Please check if r1040 also happens to fix this issue.

Original comment by heue...@gmail.com on 6 Aug 2010 at 4:04

GoogleCodeExporter commented 9 years ago
Yes indeed, I have updated to r1042 and ran the same code.

Damaged areas are redrawn, cheese is gone.

Plus, the node no longer disapears when the offset gets larger than 282.

Everything works as expected and the bug seems fixed.

Thanx for that.

Original comment by lionel.v...@gmail.com on 6 Aug 2010 at 10:04

GoogleCodeExporter commented 9 years ago
Thank you for your review.  Closed as duplicate of issue 180.

Original comment by heue...@gmail.com on 24 Aug 2010 at 2:46