- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hello

A bit side question, sorry if it's misplaced. I need to find all polygons intersections in scene with some "gap", e.g. if an edge is closed enough to a poly - count this case as intersection too. A code to check polygon/polygon intersection is not a problem, but which to which polygons I have to check? Can I use Embree BVH data structures for this? If so how?

Thx

Link Copied

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

You could use the User Geometry feature for this. Create some user geometry that implements the proper polygon intersection and returns bounds enlarged by the "gap" to Embree.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi, Sven

Can't figure out your idea. Yes, I can create some UserGeometry but whay to do with it then?

Thx

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Using the User Defined geometry feature you write the ray intersection function for some primitive. Best look at the Embree tutorials to see how this works. You just have to calculate bounding boxes are that slightly larger than your polygons (such that Embree will also try to intersect them is they are some gay away of the ray) and pass your special ray/polygon intersection function to the User Geometry primitive.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi, Sven

Sorry, still unclear. Let me explain what I need with images. On first all walls are "good", poly edges are match in all places of walls contact. On second one the far wall (blue wireframe) is "bad" because there are no such edges on other walls. So I need to triangulate some red and green triangles to create needed edges. There is a some "gap". For example if bluе wall is slightly moved up I still need to break red triangles (if distance to floor is less than gap).

Anyway for potenyially large scene I need a data structure like bvh to detect which polygon breaks which. Thus I want to use Embree bvh - but don't know "how"

Thx

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Ok, therefore you need to build your own data structure that can find neighboring triangles or edges. Using the internal Embree data structures is not easily possible.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page