ywywdh / papervision3d

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

BitmapMaterial rendering #182

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Orbiting with the cam around a Plane.
2. From the angle of 179-180 graphics.beginBitmapFill has some performance 
problem, app hangs sometimes more than 1 sec.

What is the expected output? What do you see instead?
smooth anim

What version of the product are you using? On what operating system?
latest trunk (?, dunno, too much versions, i'm always confused), xp

Please provide any additional information below.

this lasy solution makes a bit faster, please take a look at it
and tell me what do you think, or how could be better implemented:

in BitmapMaterial.as
in function drawTriangle

  if( bitmap )
  {

    if ( Math.abs(tri.v0.y - tri.v1.y) < 1 )
     if ( Math.abs(tri.v1.y - tri.v2.y) < 1 )
    return;

  .
  .

 Checks if the y coordinates of the vertices of triangle are almost
 in the same plane (diff < 1) and returns (no rendering).

 I could also check for x, but i didnt notice any problem with upright
 planes.

  Regards,

    Atys

Original issue reported on code.google.com by atys....@gmail.com on 24 Mar 2009 at 10:58

GoogleCodeExporter commented 9 years ago
We could add the extra check for high angle faces - but it will slightly degrade
performance.  All you need to do is set the tiled property to true when using
smoothing and the issue should disappear.  This is a bug in the flash player 
rather
than the engine.  I'll check with the rest of the team to make sure we don't 
want to
implement the extra checks to automatically turn on tiling when below a certain
threshold.

Original comment by azu...@gmail.com on 30 Mar 2009 at 1:16

GoogleCodeExporter commented 9 years ago

 Hm, tiled solves the problem, thank you! ;)

Original comment by atys....@gmail.com on 31 Mar 2009 at 8:18