Replies: 3 comments 2 replies
-
I can't figure out specifically what you need from your description so it's not possible to give specific advice. Is it just rendering that you need to alter, or do you need to modify the mesh and vertex data or geometry? How is the original geometry created? How is the hole controlled? |
Beta Was this translation helpful? Give feedback.
-
Stencil buffer might be useful for doing cutouts. You'd render the cutout geometry to the stencil buffer then in main pass check the stencil buffer to decide which fragments to render or not. You can do something similar with use render to texture. |
Beta Was this translation helpful? Give feedback.
-
You might be able to render the water surface first, and not write into the
depth buffer, so anything rendered later will overwrite the pixels. Here is
an example in that vein:
(it does write the depth buffer , but always "1" (far clip plane)
Regards, Laurens.
StateSet {
DataVariance STATIC
rendering_hint DEFAULT_BIN
renderBinMode USE
binNumber -1
binName RenderBin
GL_CULL_FACE OVERRIDE|OFF
GL_LIGHTING OVERRIDE|OFF
GL_DEPTH_TEST ON
Depth {
function ALWAYS
writeMask TRUE
range 1 1
}
}
…On Tue, May 16, 2023 at 5:05 PM Daoudou ***@***.***> wrote:
Okay and if i want to do it with only to modify the mesh and vertex data ?
It will work the same way ? With Stencil buffer ?
—
Reply to this email directly, view it on GitHub
<#1230 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEXFTWS4NKQP77Y43VA3ATLXGOJRXANCNFSM6AAAAAAYDRPLIQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: <openscenegraph/OpenSceneGraph/repo-discussions/1230/comments/5917699@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Hello everyone
I would need help.
I have a surface created with geometry and I would like to cut out part of the surface to place an object on it without the surface being inside the object (I have an open boat and the blue surface crosses the boat and is therefore visible inside). (see picture)
For this I have 4 corner points and I would like to delete the geometry and primitives located inside these 4 corners. (the white square on the image)
For this how could I proceed?
A solution would be to obtain the position of these 4 points in a shader and to delete the fragments inside with the "discrad" method in glsl if I'm not mistaken? (However I don't have enough knowledge with shaders ^^')
Or do you have any other suggestions?
i found this source :
[osg-users] [osgOcean] Culling and intersects with ocean and model...
Thanks in advance
Cordially
Beta Was this translation helpful? Give feedback.
All reactions