I confused with the problem of intersecting translucent 3D objects.
I have a plenty of translucent objects which (potentially) can intersect each other. So, when I'm displayng them, in the case of intersection happened, I can see common parts of intersected objects inside each other.
What I want to do is to hide this common parts while rendering is being performed (it should looks like as a union of objects).
I'm new to OpenGL, but I've done some research and found that potentially it could be done by playing with Stencil/Depth/Color buffers and multi-rendering.
I wonder if someone can give me some advises about this proccess or techniques. Thanks.
Asked
Active
Viewed 71 times
0

tema
- 1,115
- 14
- 33
-
Do you want any shading on them? – Henk De Boer Jan 14 '16 at 14:11
-
@HenkDeBoer at this moment shading is not critical, so I think the answer is no – tema Jan 14 '16 at 14:14
-
1Well if it stays no, you could consider rendering all translucent objects as opaque to an offscreen buffer, then render the total buffer back to the main buffer with a certain opacity. keep in mind that without shading, it may be very hard for the viewer to properly see depth in your scene if you go this way. – Henk De Boer Jan 14 '16 at 14:17
-
@HenkDeBoer oh, I see, and what if later I'll need shading? The proccess will be another? – tema Jan 14 '16 at 14:20
-
1If this sounds like a bad idea, try a depth prepass before you render. This way only the foremost triangles are rendered. It becomes a little more complicated if you have other non-translucent objects that should be visible intersecting the translucent ones. Perhaps make a picture of what you have in mind :) – Henk De Boer Jan 14 '16 at 14:20
-
Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/100677/discussion-between-tema-and-henk-de-boer). – tema Jan 14 '16 at 14:29