Jump to content

Strange image glitch


joshcamas
 Share

Recommended Posts

Well, so far, I have to assume a lot of things to figure out how your scene is done :

Do you have several planes to make your clouds ? Do you have several planes in only one single object? What is the depth of the alpha channel of the opacity texture?

To me, I feel that it is related to multiple overwritting in the alpha buffer, in that case.

Are your clouds single objects  aligned to the camera (facing sprites)? in that case it may be a glitch of the alpha channel  in the intersection of two facing sprites (when two sprites are too close, they fall Under the minimal accuracy -the Zbuffer accuracy- and, may be,  generate a Z fight (two faces trying to be the last in the display order) .

I will try to investigate on that....

Link to comment
Share on other sites

Sorry to interrupt, but... it's Michel Rousseau!!!  Holy cow!!!  Good to have you with us on the forum, and thanks for the TONS of things you've done for BJS!  Wow!  You're a local superhero, ya know?  (sigh)  (drool)

Check it out, gang!  Another one of the "founding fathers" finally showing his face.  Excellent!

Ok, continue the fun with the blotchy sprite texture.  I made a playground if anyone wants to play.  Set your opacities, because I didn't.

http://playground.babylonjs.com/#24B7DR

Wow, Michel Rousseau!  (Wingnut sweeps Michel's parking spot near the front door.)

Link to comment
Share on other sites

Never been so amazed to read something on a forum. You got it right, Wingnut, Your problem is now my problem.

So, so far, I think you're using several planes to make each single cloud look deeper, Am I right ? And these cloud planes are locked to the camera, still right ?

In that case I think that probably, the planes are rotating around their respective centers 'till they intersect. In that case they're generating a Z fight, I think.

Could you confirm ?

By the way, using too much facing sprites may reduce the overall performance of your 3d scene.

Link to comment
Share on other sites

I realized I need an example, so here it is!

http://playground.babylonjs.com/#9VC8L#2

After waiting a bit of time you can see the sky get dark, as well as...

The cloud Sprite changing colors: Both color and alpha (BABYLON.Color4)

 

Also, sprites reduce performance a lot? I always thought sprites and particles were super optimized :o

Link to comment
Share on other sites

hmmmm....

 

Well I'm pretty sure a sprite manager is simply a mesh, correct? So the vertices are rectangles floatin' around and such? Hmm...

 

A very intersmesting puzzle! 

 

EDIT: I noticed if you have only two sprites in your example and move the camera around, something very interesting shows up: The splotch will only show up on the sprite closest to the camera! Try it!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...