question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

User-defined clipping planes

See original GitHub issue

For example, to reveal the interior of a CAD model in a 3D tileset.

Support up to 6 planes so a user can create a cube.

The classic implementation of this is a fragment shader with a 1D alpha texture (or maybe just discard).

Probably expose this for 3D tilesets and glTF models. We can add it to primitives, terrain, etc. if those cases come up.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
nmschultecommented, Jan 23, 2018

I’m not sure what you mean by having the planes themselves be “shaded”, if you could provide an image similar to what you mean that would be helpful.

After playing with this some more I can clarify now. I’m focusing on clipping the globe, for subterranean concepts, but the idea should generalize. What I had in mind is this: – Where the clipping planes intersect the geometry/mesh, shade the intersection face(s). E.g. when clipping the globe to slice it in half, allow to shade (with a full blown material/shader, or a simpler interface like ARGB color) the resulting ellipse of the intersection.

Bigger picture: I want to provide a better back-drop for entities/primitives/meshes placed inside the clipped region of the globe. If this was done with actual geometry/mesh, this could improve the current default camera behavior too (as it is, it seems one can “pick” a point “inside” the globe as the camera manipulation ref. pt., see the attached animations).

I also want to show the original clipped surface with a different shading (material/shader), much like this “other idea”:

Implement as a material? This would allow modifying the color of the clipped area or just do regular discard.

More than six planes may be handy for more complex geometry carving; the ability to specify an arbitrary geometry would be amazing, but that might be out of scope given the tech in focus here.

Last, if it matters, the ability to clip entities/primitives would be neat. I don’t have a concrete grasp on the technical limitations though; I haven’t yet dug into how this is implemented.


clip_cam

2reactions
lilleysecommented, Oct 12, 2017

clip-planes-master branch is ready.

Read more comments on GitHub >

github_iconTop Results From Across the Web

User-Defined Clip Plane - OpenGL Wiki
User -Defined Clip Plane. From OpenGL Wiki. Redirect page. Jump to navigation Jump to search. Redirect to:.
Read more >
Clipping Plane - an overview | ScienceDirect Topics
The clipping plane is responsible for reporting its orientation and position to the volume renderer, which handles the actual clipping when it draws...
Read more >
User-defined clipping planes, TInputShortcut example
ClipPlane allows you to define custom clipping planes. See our documentation of nodes, X3D documentation of ClipPlane, and a simple demo or very ......
Read more >
Clipping planes - PTC Support
There are two types of clipping planes available: Clipping feature: Here, you can define up to six clipping planes positioned relative to the...
Read more >
User clip planes on feature level 9 hardware - Win32 apps
A clip plane is defined by a vector with 4 components. The first three components define an x, y, z vector that emanates...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found