- Contrassegnare come Nuovo
- Preferito
- Iscriversi
- Disattiva notifiche
- Iscriversi a feed RSS
- Evidenziare
- Stampare
- Segnalare contenuto inappropriato
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 copiato
- Contrassegnare come Nuovo
- Preferito
- Iscriversi
- Disattiva notifiche
- Iscriversi a feed RSS
- Evidenziare
- Stampare
- Segnalare contenuto inappropriato
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.
- Contrassegnare come Nuovo
- Preferito
- Iscriversi
- Disattiva notifiche
- Iscriversi a feed RSS
- Evidenziare
- Stampare
- Segnalare contenuto inappropriato
Hi, Sven
Can't figure out your idea. Yes, I can create some UserGeometry but whay to do with it then?
Thx
- Contrassegnare come Nuovo
- Preferito
- Iscriversi
- Disattiva notifiche
- Iscriversi a feed RSS
- Evidenziare
- Stampare
- Segnalare contenuto inappropriato
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.
- Contrassegnare come Nuovo
- Preferito
- Iscriversi
- Disattiva notifiche
- Iscriversi a feed RSS
- Evidenziare
- Stampare
- Segnalare contenuto inappropriato
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
- Contrassegnare come Nuovo
- Preferito
- Iscriversi
- Disattiva notifiche
- Iscriversi a feed RSS
- Evidenziare
- Stampare
- Segnalare contenuto inappropriato
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.

- Iscriversi a feed RSS
- Contrassegnare la discussione come nuova
- Contrassegnare la discussione come letta
- Sposta questo Discussione per l'utente corrente
- Preferito
- Iscriversi
- Pagina in versione di stampa