#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
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) |
#3
|
|||
|
|||
That worked nicely. Still have a little bit of light corners on the leafs but atleast it looks like a actual tree now.
|
#4
|
|||
|
|||
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) |
|
|
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 |