From 0c8d6afc33531761e8dd69760907d730a8440ed3 Mon Sep 17 00:00:00 2001 From: Wolfgang Hess Date: Thu, 6 Oct 2016 16:53:31 +0200 Subject: [PATCH] Disable culling for submaps and reduce overdraw. (#85) We disable backface culling so that submaps also show when looked at from below. We add a depth bias to move submaps further to the back, so that submaps do not overdraw the visualization of laser scans which makes the latter sometimes hard to see. --- cartographer_rviz/src/drawable_submap.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cartographer_rviz/src/drawable_submap.cc b/cartographer_rviz/src/drawable_submap.cc index a840764..e61abb9 100644 --- a/cartographer_rviz/src/drawable_submap.cc +++ b/cartographer_rviz/src/drawable_submap.cc @@ -67,6 +67,8 @@ DrawableSubmap::DrawableSubmap(const int submap_id, const int trajectory_id, GetSubmapIdentifier(trajectory_id_, submap_id)); material_->setReceiveShadows(false); material_->getTechnique(0)->setLightingEnabled(false); + material_->setCullingMode(Ogre::CULL_NONE); + material_->setDepthBias(-1.f, 0.f); material_->setDepthWriteEnabled(false); scene_node_->attachObject(manual_object_); connect(this, SIGNAL(RequestSucceeded()), this, SLOT(UpdateSceneNode()));