WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-15-2011, 06:51 AM
sleiN13 sleiN13 is offline
Member
 
Join Date: Dec 2008
Posts: 83
Tree object

I've got a tree object in my scene with multiple polygons with transparent textures. These polygons aren't all drawn in the correct order causing the front leaves to draw the sky in their transparent parts instead of the leaves behind it.

Is there a way to solve this problem in vizard or during export?

I had this problem before with scene object consisting out of multiple transparent faces where they weren't drawn in the correct order (depth test style) I resolved that by separating the different faces into multiple scene object and let the depth test resolve the draw order problems. But for this tree it going to be to much work.
Reply With Quote
  #2  
Old 09-27-2011, 11:09 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Try enabling viz.SAMPLE_ALPHA_TO_COVERAGE on the tree model. You will need to enable multisampling in order for this to work.
Code:
viz.setMultiSample(8)
viz.go()

model = viz.add('tree.osgb')
model.enable(viz.SAMPLE_ALPHA_TO_COVERAGE)
Reply With Quote
  #3  
Old 10-04-2011, 12:13 AM
sleiN13 sleiN13 is offline
Member
 
Join Date: Dec 2008
Posts: 83
That worked nicely. Still have a little bit of light corners on the leafs but atleast it looks like a actual tree now.
Reply With Quote
  #4  
Old 10-04-2011, 08:45 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
I forgot to mention, you should also disable blending when using alpha to coverage. This might fix the issue with the corners:
Code:
model.disable(viz.BLEND)
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to render a texture of the transparent object and then blur it whj Vizard 1 09-25-2012 03:15 PM
how to hide 3D virtual object behind real object? Darkmax Vizard 3 05-29-2012 09:39 AM
Remove link and have object drop/collide? cgibb Vizard 6 03-02-2010 04:18 PM
retrieve Object names Geoffrey Vizard 11 12-11-2009 04:26 AM
rotate to object jargon Vizard 1 08-08-2005 12:20 PM


All times are GMT -7. The time now is 11:40 AM.


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