gazebosim / gazebosim/gz-rendering

Add swappable skybox texture

Open
#663 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
C++
Stars
81
Forks
90
Avg merge
1d 13h
Merged PRs (30d)
10

Description

## Desired behavior

Sky box URI can now be changed via sdformat ( https://github.com/gazebosim/sdformat/pull/1037 ), but that field is not being used by gz-rendering yet.

Currently, rendering uses a hardcoded stock sky texture in `ogre2/src/media/materials/textures/skybox.dds`.

## Alternatives considered

## Implementation suggestion

Change the code associated with this line:

https://github.com/gazebosim/gz-rendering/blob/22613092aa10c16c24aa560b4c6cd830faf41b66/ogre2/src/Ogre2Scene.cc#L1478

which loads the stock texture `skybox.dds` at https://github.com/gazebosim/gz-rendering/blob/ign-rendering6/ogre2/src/media/materials/textures/skybox.dds

Instead, load a texture from the sky box URI tag.

## Additional context

After rendering has been implemented, to add this to gz-sim, start in this line by checking children of `` SDF tag:

https://github.com/gazebosim/gz-sim/blob/f39bc25da4a93a0b2ccf5fca8c3e1b6863185a9d/src/gui/plugins/scene3d/Scene3D.cc#L3030

Contributor guide

Open the contributing guide

Research direction

Start in ogre2/src/Ogre2Scene.cc at the code associated with line 1478, which currently loads ogre2/src/media/materials/textures/skybox.dds. Follow the sky box URI from the SDF sky box data and replace the hardcoded texture source with that URI. Done means the Ogre2 renderer uses the configured sky box texture instead of the stock texture.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.