gz-rotary-rendering: drop freeimage - #3394
Conversation
Adds a new formula for use in rotary based on the 2.3.3 tag and three patches for stb support so that the freeimage dependency can be removed. Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
* Switch from ogre2.3 to gz-rotary-ogre2.3-vendor * Drop ogre1.9 Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
c55b132 to
0ea1b70
Compare
|
I see some differences when loading the fuel_textured_mesh.sdf example world in Jetty vs Rotary: Jetty
Rotary
|
|
I confirm that I see the same color swap in our Nix environment with the same patches as in |
stb_image always returns pixel data in RGB byte order, but the variable names in the 3-component conversion loop (b, g, r) assume BGR order. The code then writes r, g, b — which actually outputs B, G, R — into a buffer declared as PFG_RGBA8_UNORM (R first), swapping the red and blue channels. Fix by writing b, g, r (preserving stb's native RGB order), which matches the correct behaviour already present on master (v3-0). The visual effect of this bug is that all 3-channel RGB textures rendered through the STB codec have red and blue swapped (e.g. brown skin appears blue, lime-green appears teal). See the screenshots in osrf/homebrew-simulation#3394 (comment 4101535199) for an example. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
There is an issue with RGB-to-RGBA conversion in ogre-next v2.3 when using STB. I've created OGRECave/ogre-next#567 to fix the issue and have tested locally. |
thanks! I've approved the upstream PR and am adding the patch to |
|
we agreed at Monday's Gazebo meeting to fully drop freeimage on macOS on the main branch by dropping support for ogre 1.9 so I think we are ready to merge this. I will wait a few hours in case any Gazebo maintainers want to officially mark their approval |
azeey
left a comment
There was a problem hiding this comment.
LGTM!
However, I noticed that gz-rotary-ogre2.3-vendor depends on gz-jetty-plugin
Is that intentional?
Also, if freeimage is going to be dropped altogether, shouldn't we be patching the ogre2.3 formula itself instead of creating gz-rotary-ogre2.3?
|
I'll answer these in reverse order
I created the
yes it does currently declare a more context:
|
|
Makes sense. Thanks for the explanation! |
stb_image always returns pixel data in RGB byte order, but the variable names in the 3-component conversion loop (b, g, r) assume BGR order. The code then writes r, g, b — which actually outputs B, G, R — into a buffer declared as PFG_RGBA8_UNORM (R first), swapping the red and blue channels. Fix by writing b, g, r (preserving stb's native RGB order), which matches the correct behaviour already present on master (v3-0). The visual effect of this bug is that all 3-channel RGB textures rendered through the STB codec have red and blue swapped (e.g. brown skin appears blue, lime-green appears teal). See the screenshots in osrf/homebrew-simulation#3394 (comment 4101535199) for an example. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>




Part of #3298.