[osg-users] Rendering a Depthmap

32 views
Skip to first unread message

Lucas Amparo

unread,
Jun 12, 2019, 6:42:12 AM6/12/19
to osg-...@lists.openscenegraph.org
Hi, everyone

I'm trying to render a depthmap using shaders. Very simple, just using the distance from an arbitrary point P to the camera's eye. That map will be deprojected into a pointcloud.

The problem is an unexpected (by me lol) behavior from the deprojection. Using a tutorial (can't post links yet), I've done the work but the result seems weird.

For example, if I had a perfect wall on the scene, the depthmap is projected similar to a "rinnegan" (do you remember naruto? Is the best way to represent the problem kkkk)

Someone already did something similar to that? What's the best way to make a depthmap on OSG? Tutorials, examples, books are very welcomed.

Thank you!

Cheers,
Lucas

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=76186#76186





_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Glenn Waldron

unread,
Jun 12, 2019, 8:25:33 AM6/12/19
to OpenSceneGraph Users
Lucas,
Just guessing, but it sounds like you are experiencing a problem knows as "shadow acne." There's a good explanation of it here along with some possible mitigation ideas. Very common problem when projecting a depth map back onto the main camera.

 
Glenn Waldron

Trajce Nikolov NICK

unread,
Jun 12, 2019, 3:18:38 PM6/12/19
to OpenSceneGraph Users
Hi Lucas,

I have this working (Lidar scans simulation). If you post snippets I might be able to help you. You can private msg me too

Cheers
Nick
--
trajce nikolov nick

Tom Pollok

unread,
Jan 25, 2020, 11:48:58 AM1/25/20
to OpenSceneGraph Users
Is there a way to do this directly with osg or does it need a custom implementation? If no, is anybody able to share code for how to render a depthmap with intrinsic camera parameters as a 3d pointcloud using shaders?
Reply all
Reply to author
Forward
0 new messages