Semi-transparent entity acting inconsistent

Blitz3D Forums/Blitz3D Beginners Area/Semi-transparent entity acting inconsistent

Kendo(Posted 2008) [#1]
I have an .x model acting as a terrain.

I have created a cylinder and textured it so that it looks like water and made it semi-tranparent, positioned it into an appropriate "dip" in the terrain so that it looks like a water pool.

My problem is that from a distance the water pool looks like it should: semi-transparent water. But as the camera moves closer and maybe looks over a bump in the terrain the water texture "disappears" to all intents and purposes although you can still tell that "something" is there. Then suddenly the semi transparent texture will kick back in and look like it should. Then just as suddenly it can "disappear" again.

I have read somewhere here about occlusion problems - is this what is happending here?

Advice please, and thanks as always for your time


Ross C(Posted 2008) [#2]
Try increasing the near range of your camera?

Try moving the mesh further from the terrain?

Does the problem still happen?


Kendo(Posted 2008) [#3]
Hi Ross - i tried both your suggestions but unfortunately the problem remains. I appreciate your time


SLotman(Posted 2008) [#4]
It's the alpha bug. Alpha textures/entities should be Z-sorted (from the camera) to avoid those problems, but Blitz3D don't sort them.

Or you sort them manually, or you use some other way (like changing entityblend) to make it translucid.


Ross C(Posted 2008) [#5]
That sucks. I thought the alpha issue only raised it's head when blending two or more alphaed textures together.


IPete2(Posted 2008) [#6]
Slotman,

I dont think the alpha bug applies here. I regularly use water in mesh environments and have no issues at all. Check out the CASTLE demo in the blitz3d samples (inside MAK folder) - there's no issue there, so something else is happening.

Kendo can you post an image so we can see what you are talking about, as there could be other reasons - gfx card drivers could be an issue so update them too.

IPete2.


Ross C(Posted 2008) [#7]
It could be a problem with a blitz terrain if your using one?


Kendo(Posted 2008) [#8]
aploogies for delay in replying guys.

Ross - I am not using a blitz terrain. I am using an .b3d model as terrain (as generated by the ALE terrain system).

I am now wondering if it is a transparency problem because yesterday I abandoned making my water (i.e. the textured cylinder entity) "transparent" but noticed i was getting the same distorted effect evry now and then - the distorted effect being that the fully textured cylinder (which is buried within the main terrain model) ceases to show a full texture but leaves a partial residual "colouring" on parts of the area it covered).

However, upon my reducing the cylinder height dimensions so that it is now little more than a thin wafer (which nevertheless still has parts embedded in the main terrain model) I am now getting the problem far less so that i can almost forget about the problem occurring. So I am back to wondering if it is a 3d Z ordering effect (not that i know about such things!).

I have tried altering the entityorder of the "water" entity but it is either overwritten by the terrain model or conversely is drawn completely over the terrain model, i.e. is not embedded to all intents.

IPete2, I cant post an image Im afraid as I dont have a website.

You have made me think though - I am using a laptop with an ATI 9000 Mobility graphics card. Could be the problem although it deals with transparency in Blitz3D ok, at least with models that are not "buried" into others. So I am going to transfer the program to a PC to see if it still goes wrong


Stevie G(Posted 2008) [#9]
@ Kendo, It will be a transparency problem. As soon as you use alpha on an entity it's z-ordering is disabled and it's drawn based on it's distance from the camera. if you use additive blending on the water it will retain it's z-ordering so should show up as you expect it.

You can upload an image to imageshack.com and various other places without webspace.


Kendo(Posted 2008) [#10]
Stevie - thnks for your input. Just tried entityblend water, 3 (additative) and I thought youd cracked it for me - water does look apparently transparent (a little garish, but acceptable ). But then . . .

I have planted in the "water" various "plant", "grass", "rock" entities(.b3d). Whereas these were consistently displayed, now they appear/disappear apparently randomly or else their z-order is changed from sometimes in front of water, sometimes behind!!!

Thanks for tip about webspace - i looked at imageshack but couldnt see anything about uploading pictures?


IPete2(Posted 2008) [#11]
Kendo,

to get around any alpha troubles you can use a less pretty mask color. You have to cut the edge of your textures clean (no anti aliasing to a bgd colour) to get a much sharper edge, and one which is not z-order problematic.

IPete2.


Ross C(Posted 2008) [#12]
Are you using more textures on your terrain, than your graphics card is capable of rendering in one pass? Try and reduce the number of textures being multi textured, and it should fix this problem, if it's the same one as i was having a few years back. My old card could only render 4 textures in one pass.


Kendo(Posted 2008) [#13]
IPete2, Ross C

Thanks to you both for your suggestions which I will implement. I will report back if success achieved!

Regards, Kendo