joshcamas Posted November 6, 2014 Share Posted November 6, 2014 Hey guys! Warning: I thought I remembered having someone with this problem here, but I couldn't find it. I'm having strange stuff happen to sprites! When their colored! http://i.imgur.com/jT3PMII.jpg D: It looks REALLLYYY ugly! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 6, 2014 Share Posted November 6, 2014 hum could you reproduce it in the playground? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 6, 2014 Share Posted November 6, 2014 It was me who had that problem. the answer is here. http://www.html5gamedevs.com/topic/9405-strange-effect-on-sprites/ I never solved this problem. Quote Link to comment Share on other sites More sharing options...
Supermitch Posted November 7, 2014 Share Posted November 7, 2014 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.... Quote Link to comment Share on other sites More sharing options...
joshcamas Posted November 7, 2014 Author Share Posted November 7, 2014 Single plane for each cloud. If I make it be a single sprite all by itself it still does the same thing Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 8, 2014 Share Posted November 8, 2014 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.) Quote Link to comment Share on other sites More sharing options...
Supermitch Posted November 12, 2014 Share Posted November 12, 2014 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. Quote Link to comment Share on other sites More sharing options...
joshcamas Posted November 12, 2014 Author Share Posted November 12, 2014 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 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 13, 2014 Share Posted November 13, 2014 Using instances of sprites, it can optimize, It is also possible according to the distance between the camera and the particles decrease or increase the number of particles, which may improve performance. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 13, 2014 Share Posted November 13, 2014 Gosh Josh, is your PG demo gaudy enough? Lets try a simple one. http://playground.babylonjs.com/#9VC8L#4 Sprite overlap causes the blotchies, apparently. Why? I have no idea. But there it is, with 3 cloud sprites. *scratch scratch* An interesting puzzle. Quote Link to comment Share on other sites More sharing options...
joshcamas Posted November 14, 2014 Author Share Posted November 14, 2014 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! Quote Link to comment Share on other sites More sharing options...
Supermitch Posted November 14, 2014 Share Posted November 14, 2014 Try to make a very simple scene with planes . No glitches. If it can be of interest, find the babylon file here :http://1drv.ms/1x0lUUN Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.