Sprite-edge Problem Important!
Blitz3D Forums/Blitz3D Programming/Sprite-edge Problem Important!
| ||
Hi, I've got a big problem, i have written a little 3d-programm.. So, you have got a sprite, and in it's middle, there is a black field(on the texture..). In this black field comes another tile with another black field, in which i put again a sprite in. But the problem is, that the edge where one tile goes into the other, produces a flickering, not goodlooking edge. it is brighter than it should be. So you can see exactly, where one sprite goes into the next one, and it shoul look more fluently! Please, look at this sample, you use it, by pressing the arrowkeys, it is very important for me, and sorry für my really bad englich. Please download and help me correcting the graphical mistakes, please, i did everything i can Demo: http://izewind.ohnitsch.net/Scaler.zip cya |
| ||
Hi, I think you'll have to rewrite the whole thing. It could be better to make it simply 3D with a number of planes if the textures are too big. But thats just my way of doing/thinking things. Maybe you could also position the sprites as they should be aligned in 3D space and make one big plane consisting of many of them one inside another inside another inside another, you know, aligning them properly. Using "ScaleSprite" seems unlikely to work :) Just a few ideas, otherwise a useless post :P maybe I get time to work it out tomorrow and send you something! I'm new to Blitz3D full version , (but i learned in the Demo) so i like doing anything right now! :)))) YAY !! ahm... |
| ||
This would be great, i'm not shure, if this works, i tryed such a thing with cubes.. but please try, thank you |
| ||
Theoretically it should work, but I suspect there is some sort of floating point inaccuracy going on. I've tried everything to fix it but to no avail. A shame, as that is a really cool effect! |
| ||
Hi, Give this a go, really cool effect you got there. Ive dropped using sprites and heres the result. Graphics3D 800,600,32,2 SetBuffer BackBuffer() Global x# = 1 ClearTextureFilters m=CreateMesh() md=1+4+16+32 xx#=5.0 yy#=4.0 zz#=0 For d=0 To 9 s=CreateSurface(m, LoadBrush("step"+(d+1)+".jpg",md)) AddVertex s,-xx,yy,zz,0,0 AddVertex s, xx,yy,zz,1,0 AddVertex s, xx,-yy,zz,1,1 AddVertex s,-xx,-yy,zz,0,1 AddTriangle s,0,1,2 AddTriangle s,0,2,3 xx=xx/2.0 yy=yy/2.0 zz=zz-0.01 Next EntityFX m,1 camera = CreateCamera() PositionEntity camera,0,0,-4 CameraRange camera,0.1,10 Repeat If KeyDown(1) Then End If KeyDown(200) x# = (x# + 0.01 + x#/1000.0) End If If KeyDown(208) x# = (x# - 0.01 - x#/1000.0) End If ScaleEntity m,a+x,a+x,1 RenderWorld() Flip Cls Forever |
| ||
Wow thats nice (with birdies code). Great stuff lads! |
| ||
Wow thats nice (with birdies code). Isn't it :) L8r, |
| ||
OK, try this out Minecrawler - on my PC this gives a perfect result, maybe a graphics card dep. thing though - let me know if it works. Graphics3D 800,600,32,2 SetBuffer BackBuffer() Global a# = 4.2 Global x# = 1 Global b# = 4 ClearTextureFilters step1 = LoadSprite("step1.jpg",5+16+32) step2 = LoadSprite("step2.jpg",5+16+32) step3 = LoadSprite("step3.jpg",5+16+32) step4 = LoadSprite("step4.jpg",5+16+32) step5 = LoadSprite("step5.jpg",5+16+32) step6 = LoadSprite("step6.jpg",5+16+32) step7 = LoadSprite("step7.jpg",5+16+32) step8 = LoadSprite("step8.jpg",5+16+32) step9 = LoadSprite("step9.jpg",5+16+32) step10 = LoadSprite("step10.jpg",5+16+32) ;WBuffer 1 ;AntiAlias 1 ;HWMultiTex 1 ;Dither 1 camera = CreateCamera() PositionEntity camera,0,0,-4 EntityOrder step1,0 EntityOrder step2,-1 EntityOrder step3,-2 EntityOrder step4,-3 EntityOrder step5,-4 EntityOrder step6,-5 EntityOrder step7,-6 EntityOrder step8,-7 EntityOrder step9,-8 EntityOrder step10,-9 CameraRange camera,0.000000000001,100 Repeat If KeyDown(1) Then End If KeyDown(200) x# = x# + 0.01 + x#/1000 End If If KeyDown(208) x# = x# - 0.01 - x#/1000 End If ScaleSprite step1,a+x,a+x ScaleSprite step2,a/1.99+x/1.99,a/1.99+x/1.99 ScaleSprite step3,a/1.99/1.99+x/1.99/1.99,a/1.99/1.99+x/1.99/1.99 ScaleSprite step4,a/1.99/1.99/1.99+x/1.99/1.99/1.99,a/1.99/1.99/1.99+x/1.99/1.99/1.99 ScaleSprite Step5,a/1.99/1.99/1.99/1.99+x/1.99/1.99/1.99/1.99,a/1.99/1.99/1.99/1.99+x/1.99/1.99/1.99/1.99 ScaleSprite step6,a/1.99/1.99/1.99/1.99/1.99+x/1.99/1.99/1.99/1.99/1.99,a/1.99/1.99/1.99/1.99/1.99+x/1.99/1.99/1.99/1.99/1.99 ScaleSprite step7,a/1.99/1.99/1.99/1.99/1.99/1.99+x/1.99/1.99/1.99/1.99/1.99/1.99,a/1.99/1.99/1.99/1.99/1.99/1.99+x/1.99/1.99/1.99/1.99/1.99/1.99 ScaleSprite step8,a/1.99/1.99/1.99/1.99/1.99/1.99/1.99+x/1.99/1.99/1.99/1.99/1.99/1.99/1.99,a/1.99/1.99/1.99/1.99/1.99/1.99/1.99+x/1.99/1.99/1.99/1.99/1.99/1.99/1.99 ScaleSprite step9,a/1.99/1.99/1.99/1.99/1.99/1.99/1.99/1.99+x/1.99/1.99/1.99/1.99/1.99/1.99/1.99/1.99,a/1.99/1.99/1.99/1.99/1.99/1.99/1.99/1.99+x/1.99/1.99/1.99/1.99/1.99/1.99/1.99/1.99 ScaleSprite step10,a/1.99/1.99/1.99/1.99/1.99/1.99/1.99/1.99/1.99+x/1.99/1.99/1.99/1.99/1.99/1.99/1.99/1.99/1.99,a/1.99/1.99/1.99/1.99/1.99/1.99/1.99/1.99/1.99+x/1.99/1.99/1.99/1.99/1.99/1.99/1.99/1.99/1.99 RenderWorld() Flip Cls Forever |
| ||
Wow! Great thanks to all of you, especially birdie and Vorderman! Really cool, that you helped me with my problem. Thank you |
| ||
Did you do that artwork? It's very nice. |