Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: NevilleKemp

26. May 2012, 04:58:37 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)Trees
Pages: [1]
Print
Author Topic: Trees  (Read 232 times)
ahealingman
Just dropped in

Offline Offline

Posts: 14


View Profile Email
« on: 05. March 2011, 06:53:12 pm »

1. Is there a particular order in which models are drawn meaning is shape(0) always drawn before shape(1), (1) before (2), etc and is the order changed/affected when transparency is enabled?

I have a problem with transparency but it might be just because I'm using a public domain model which wasn't designed with depth buffering in mind. I have a model of a tree where the branches are triangles that display a transparent .gif.
With sortEnabled(true) it looks almost perfect when looking down on the tree (one face doesn't display the branch under it), from the side I can live with (2 or 3 don't display the gif behind it), but from a low angle looking up none of the branches show the branch behind it.

Logged
ChrisE
Becoming dependent
**
Offline Offline

Posts: 104


View Profile
« Reply #1 on: 07. March 2011, 06:48:08 pm »

Renderpasses are the only easy way to control what gets drawn over what; geometry is rendered in order of the renderpasses (but geometry inside a renderpass is sorted by some policies).

Transparency sorting policy can be set by using the Renderer.setTransparentSortingPolicy() and Renderer.setTransparentSorter() calls. This might help you to some extent, and is worth fiddling with. I'd suggest starting with TransparentSortingPolicy.SORT_BOUNDING_SPHERE_AND_EYE_RAY_INTERSECTION, and moving on from there.

You might try using straight alpha-testing to work around this; it looks pretty good on vegetation (STALKER and Halo:Reach do something similar to this).
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic