What's going on here?

Miscellaneous Forums/General Discussion/What's going on here?

Okay this probably the wrong place to post, but I could really do with a quick answer how to fix this.

My game in Blitz has decided to pay with the grass edges - they flicker from black to normal on a whim - I have only just started getting this problem, but the graphics for the grass haven't changed in about 3 years!! ( also happens on my notebook :( )

What could have happened? It's giving me ulcers.






Maybe another program is interfering.

Heh, I actually like the grass with black background more, it integrates better with the background :P

What's that? Blitz3D? Looks like an alpha Z-ordering problem... if it's not, then try to update your drivers to see if it fixes. Also check the depth the graphics is saved... I saw some cards having trouble setting mask/alpha with textures on 16 or 8bpp

Looks to me like a driver issue, meaning the drivers that you made it on top of, and since then, have been updated and introduced some sort of anomaly into your masking.

Perhaps it's something in Blitz that always worked, and now doesnt due to driver changes by the manufacturer? DX vx Blitz would be my guess.

Hmmm - can't be a driver. I have the same thing happening on 2 different machines ATI and Nvidia...plus I haven't updated the drivers for more than year. Only happens in certain parts too...

Is this Blitz3D?

A long shot but you can get problems to do with floating point inaccuracy when entities are a long distance from 0,0,0. I had problems with textures disappearing some years back because of this.

yes - it's Blitz3D...each map is no larger than 300 units square.

That shot is probably about -5 on the Y and - 50 on the X.

I'm wondering if I've hit a Blitz surface threshold or something.

Try running in a lower res and see if you have the same problem. Those screen shots are huge.

Already tried running it in 4 different resolutions - all the same :(

It would help no end in helping you if you you explained a bit more about exactly what we're looking at. I think the grass blade are textured, so I think it's either a masked texture or a texture with an alpha channel, but I can't tell which. I don't think you've modelled aroung the bottom of the grass blades, but perhaps I'm wrong.

It's hard to see where the dirt geometry underneath is actually layed out. Perhaps a wireframe of the scene would be handy here.

Other things would come into play too, depending on the above answers, like what format the texture is in.

Texture is a simple bitmap masked using colour 0,0,0.
The texture is clamped on the V - has to be clamped to avoid the horrid straight black line across the bottom of the grass. As I say it's just started happening.


The problem is it's only just started flickering from hard black edges to normal...and it only happens on certain parts of the map...one week ago it wasn't happening..Gaaah! Costing me time trying all sorts of junk to find out what it is.

Sorry, can't help, but +1 vote for keeping black edges around the grass. It really adds a sensation of depth.

My money (all 1p of it) is on it being a mip-mapping problem.

maybe another mesh is touching it?

Could it be that you're switching between an alphablended mode and a masked blend mode, where the mask mode is showing the usually partly non-solid pixels as black, versus applying an alpha blend to them, but still masking the pixels that have no alpha at all?

16bit or 32bit?

Is the grass a separate mesh/surface from the stone? If so it could be a bit of Zfighting going on.

Grass is a separate mesh yes. But I cannot see it as being the problem...This has only just started happening! What could I have done to set it off? It's not happening on the other levels that I can see so far.

Also - maybe you can't see in the pics above - this is a very heavy, jagged 1 pixel outline around the edges, no blending is happening for that 1 pixel and then alpha and completely transparent (normal) again

I can't just keep the dark edges to make the grass look better as they are flickering on and off with a will of their own - it just looks so amateur!

Try ClearTextureFilters()right after the graphics3d command. If it's a mipmap problem it should disappear after doing that

I tried that Ross - still happens except the one pixel (when it flickers on) edge which it adds is even more crisp and defined!

I've tried clamping UV on and off but to no avail. It only triggers after I've been in the top left area of the map - then it will start happening at other points too...but the further I get away from the original incident the less it happens until then not at all...I'm baffled.

visually I thionk the black edge actually makes it look better... Of course if it's flickering it won't do you a lot of good...

You could try a test with the grass and soil as the same mesh.

Are you loading those textures into VRAM (flag 256?) If not, try doing so; if doing it, try removing it...

But I still bet it´s a masked texture problem; try saving the texture with 0,0,0 as background, no anti-alias in the borders... and save it as 24bpp PNG or BMP, not JPG;

You could also try saving the texture as a PNG with alpha to see if it fixes the problem.

SLotman I just tried loading the grass texture into Vram - it has made a difference in that the edge still appears but is unfiltered which makes it less noticeable.

At the last resort that will have to do - thanks!

Markcw - I've tried all sorts with the damn mesh :(

I haven't got Blitz3D, but others may be able to help you more if could put together a runnable example with the source code and meshes?

Just an idea ;-)