Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BillboardChain not (always) facing camera #2482

Closed
rhaschke opened this issue May 28, 2022 · 6 comments · Fixed by #2493
Closed

BillboardChain not (always) facing camera #2482

rhaschke opened this issue May 28, 2022 · 6 comments · Fixed by #2493

Comments

@rhaschke
Copy link

We use a BillboardChain to show various line strips in rviz: ros-visualization/rviz#1287 (comment)
However, camera updates are not correctly considered when rendering the BillboardChain: we can look "behind" the billboard, because the object is not camera-facing as it should.
Only if the same scene is rendered into a RenderTexture (when the mouse gets into the aabb of the BillboardChain), the camera pose is updated and the object correctly displays again.
We use Ogre::Root::renderOneFrame() to render the scene into all RenderTargets. Doesn't that call the required update() methods?
Any hints on what is missing are highly appreciated.

screen-recording.mp4
@rhaschke
Copy link
Author

This seems to be an issue with OGRE 1.9 only (still the default for ROS in Ubuntu 20.04). Updating to OGRE 1.12 this works!
Any ideas, how to fix this in rviz with (existing) OGRE 1.9? E.g. calling some update() manually?

@paroj
Copy link
Member

paroj commented May 29, 2022

no idea. I am afraid you will have to git bisect for the fix.

Closing as it is fixed in master.

@paroj paroj closed this as completed May 29, 2022
@rhaschke
Copy link
Author

rhaschke commented Jun 6, 2022

I would like to reopen this issue: Preparing a git bisect, I noticed that the bug is still existing in OGRE 1.12.4 (Ubuntu 20.04 system version). It seemed to work last time I checked, because I explicitly updated/recreated the BillboardChain frequently.

I verified that BillboardChain::preRender and thus BillboardChain::updateVertexBuffer are frequently called for rendering, which I assume are responsible for updating the view. However, the line isn't facing the camera...

@paroj paroj reopened this Jun 6, 2022
@paroj
Copy link
Member

paroj commented Jun 6, 2022

does this also happen with a BillboardSet? chain and set are using different methods to obtain the current camera

@rhaschke
Copy link
Author

rhaschke commented Jun 6, 2022

No idea. Our code doesn't use BillboardSet.

@paroj
Copy link
Member

paroj commented Jun 6, 2022

you could try using it at the same place where you use BillboardChain to mark the vertices or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants