PDA

View Full Version : 3d Text with Transparent Borders


vjosh
11-29-2004, 09:02 PM
Hey,

I'm getting an unwanted transparent border around 3d text. I declared a group (within a class) with the following code:
self.group = viz.add(viz.GROUP,viz.SCREEN).
Also, I added some "subgroups" to self.group, including the group "scale" and then added 3d text to the "scale" group with the following code:
self.text = self.scale.add(viz.TEXT3D,'text')
Moreover, I added an on-the-fly viz.QUADS object to serve as the background behind the 3d text. The on-the-fly object was added to a subgroup of self.group (not self.scale).

The 3d text shows up correctly in front of the on-the-fly background, but there is a transparent border around the text itself. The "transparent border" around the 3d text shows through the on-the-fly background to whatever is behind it. Is there any way to get rid of this transparent border?

Thanks! I can provide code if that'd be helpful...

-Josh

farshizzo
11-30-2004, 10:05 AM
Hi,

Try translating the text so that it has a higher z-value than the OTF object. text objects are rendered as squares and each letter is a texture with alpha values in it. If the text has a higher z value then the OTF object will be drawn over it.

vjosh
11-30-2004, 09:09 PM
Hey,

I tried to do what you advised, but I don't see any difference. I translated the text along the z-axis to ridiculously high and ridiculously low values, but nothing seems to change. The text does not even get bigger or smaller as it should due to perspective if it were in 3d space. I'm guessing this is because the group containing the text was added with the argument "viz.SCREEN" ...?

Is there any other way to get rid of the transparent border?

-Josh

farshizzo
12-01-2004, 10:50 AM
Hi,

My mistake, what you need to do is modify the draworder of the text object and disable DEPTH_TEST.self.text.draworder(11)
self.text.disable(viz.DEPTH_TEST)This will force the text object to be drawn after the quad and make sure it appears on top of it.