WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-29-2004, 09:02 PM
vjosh vjosh is offline
Member
 
Join Date: Sep 2004
Posts: 17
3d Text with Transparent Borders

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
Reply With Quote
  #2  
Old 11-30-2004, 10:05 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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.
Reply With Quote
  #3  
Old 11-30-2004, 09:09 PM
vjosh vjosh is offline
Member
 
Join Date: Sep 2004
Posts: 17
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
Reply With Quote
  #4  
Old 12-01-2004, 10:50 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

My mistake, what you need to do is modify the draworder of the text object and disable DEPTH_TEST.
Code:
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.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:06 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC