4

I created a webgl animation using scenejs library (start it by clicking the button at the bottom left, note it plays music as well which you can't currently disable).

The problem I am encountering is that the floor/plane in the middle starts flickering and continues to flicker/blink through out the animation. Only towards the very end does the flickering lower and by the end stops completely (when the plane is about to end).

If I reduce the size of the plane to 10% of its size (from ~26000 to ~2600), it does not flicker at all.

I've tried adjusting the texture scales, has no effect. Lowering the fps didn't seem to have an effect either. Does WebGL have problems rendering large objects? Are there any work arounds this?

Could probably make the plane static, and have the texture of it moving, but it certainly would make a lot more things trickier, especially when more elements are added to it.

Setting the requestAnimationFrame had no effect, nor did removing the flash video. The only time it works fine is when the plane is significantly smaller, or when it is reaching the end of it.

Niklas
  • 29,752
  • 5
  • 50
  • 71
  • What kind of textures are they? did you make them in something like 3DS max? This looks like a lighting/materials problem. Try changing the texture maybe? – Darren Reid Jun 03 '11 at 23:53
  • @Layoric it is a simple jpg with some shine/specular on it. It renders fine if the object is a lot smaller, or when the camera reaches the end of the object. – Niklas Jun 03 '11 at 23:55
  • just as a test, could you remove all shine off it? also maybe try with a single point light? It is a strange problem, I just don't think it is to do with the size of the object. Sorry if this is in the wrong direction. – Darren Reid Jun 04 '11 at 00:00
  • It didn't unfortunately make any difference. Removed both the shine and the specular and the flickering is still there as intense as before. – Niklas Jun 04 '11 at 00:05

1 Answers1

1

Scene looks fine to me - what happens when you remove the Flash?

PS. Share this on a jsFiddle if you like..http://jsfiddle.net/

Also, what happens when you use the requestAnimationFrame option for the render loop?

Example here: http://scenejs.wikispaces.com/scene#Starting

user563124
  • 36
  • 3
  • Sorry for the very late reply. The `requestAnimationFrame` had no effect, nor did removing the flash video. The only time it works fine is when the plane is significantly smaller, or when it is reaching the end of it. – Niklas Jun 09 '11 at 13:52