Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Intersecting meshs  (Read 1298 times)
Fusion32
Community Member
*
Posts: 12


« on: December 10, 2010, 06:41:18 PM »

I am creating a 3d interface for a kitchen design package and am really enjoying the exploration into the 3d world. For the most part I am having success with my endeavors but one of the things that is causing me grief is intersecting meshes.
Can any one tell me if there is a method to set one of the meshes to have dominance over an intersecting one. In this instance I have a basin inserted into a benchtop. The bench mesh is visible in the bottom of the basin.
Another issue is the floor texture showing in shelves?Huh??
thanks
Logged

i dream in triangles....
jviper
Community Member
*
Posts: 2130

Discipline in training


« Reply #1 on: December 11, 2010, 12:23:06 AM »

This would be because the depth buffer does not take transparency into account and it does not sort the triangles or fragments. What you are seeing when you see the wood in the shelves is the wood passing the depth test at that section of the screen, then the transparent shelf being rendered on top. Problem is nothing else can then be rendered between the shelf and the wood because it will fail the depth test even though the self is transparent.

Even if all you had were transparent objects and you disabled the depth testing, you will find that it still will look wrong, because blending operations requires knowing which is in front/behind.

To fix this, you must make sure all of your triangles are sorted from back to front. It may turn out to be easier to just break the mesh up into sections (shelves, the 4 sides, and the bottom), but if anything intersects you will have to break the mesh up even further. Depending on how complex your mesh is and how many different angles your camera looks at it, you may end up sorting triangle by triangle, which in some cases would not be practical performance wise (even the Utah teapot would be too complicated). The complete solution would be to sort fragment by fragment (look up depth peeling).
« Last Edit: December 11, 2010, 12:30:06 AM by jviper » Logged

JAbstract.....Don't just imagine, make it happen!
Fusion32
Community Member
*
Posts: 12


« Reply #2 on: December 11, 2010, 04:44:34 PM »

thanks jviper, that seems to have fixed the issue. All components are separate meshes created  on the fly from 2d elevations and floorplans and it seem the order of loading meshes may have significance.
The biggest problem i face is becoming familiar with basic concepts and terminology and I really appreciate your help, as well as the wealth of information available on this site.
Again, thanks.
Logged

i dream in triangles....
Mithrandir
Community Member
*
Posts: 325


« Reply #3 on: December 13, 2010, 05:44:30 AM »

TVScene.RenderAll has first parameter Alpha Sorting. Have you turned it on?
Logged
jviper
Community Member
*
Posts: 2130

Discipline in training


« Reply #4 on: December 13, 2010, 05:37:45 PM »

That should work as long as you don't have multiple transparent parts in the same mesh (which is what I assumed that transparent structure was), all your transparent meshes are convex and split up into small meshes, and none of them intersect or are inside of each other. The alpha sorting for example would not help if you have the painter algorithm situation.
« Last Edit: December 13, 2010, 05:42:10 PM by jviper » Logged

JAbstract.....Don't just imagine, make it happen!
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks