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

Add lightmap to 1.7 spec and PBR material DOM #429

Merged
merged 5 commits into from
Dec 15, 2020
Merged

Add lightmap to 1.7 spec and PBR material DOM #429

merged 5 commits into from
Dec 15, 2020

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Dec 2, 2020

Here's an example of specifying lightmap in SDF:

          <pbr>
            <metal>
             ...
             <light_map uv_set="1u">light_map.png</light_map>
            </metal>
          </pbr>

Typically lightmaps use a different texture coordinate set from other maps so added an attribute uv_set to let users specify this. It's optional and defaults to 0.

Signed-off-by: Ian Chen ichen@osrfoundation.org

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@github-actions github-actions bot added 🏢 edifice Ignition Edifice 🔮 dome Ignition Dome labels Dec 2, 2020
@codecov-io
Copy link

codecov-io commented Dec 2, 2020

Codecov Report

Merging #429 (45c74d4) into sdf10 (5558a53) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            sdf10     #429      +/-   ##
==========================================
+ Coverage   87.53%   87.54%   +0.01%     
==========================================
  Files          61       61              
  Lines        9343     9357      +14     
==========================================
+ Hits         8178     8192      +14     
  Misses       1165     1165              
Impacted Files Coverage Δ
src/Pbr.cc 98.49% <100.00%> (+0.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5558a53...45c74d4. Read the comment docs.

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a couple of small comments.

src/Pbr.cc Outdated Show resolved Hide resolved
test/sdf/material_pbr.sdf Outdated Show resolved Hide resolved
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
sdf/1.7/material.sdf Outdated Show resolved Hide resolved
sdf/1.7/material.sdf Outdated Show resolved Hide resolved
/// if an light map has not been set.
/// \return Filename of the light map, or empty string if a light
/// map has not been specified.
public: std::string LightMap() const;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this matches the name of the SDF element, but I think it would be more informative if this accessor was called LightMapFileName

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh I'm going back and forth on this. I'm trying to keep consistency with the sdf spec, the msg field in proto, and ign-rendering API. I think there is advantage to keeping the the public APIs consistent. If a more informative function name is preferred here, maybe we can also consider deprecating other functions in this class in favor of *MapFilename()?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I hadn't thought about the API of other packages. it's fine as is

src/Pbr.cc Outdated Show resolved Hide resolved
@scpeters scpeters merged commit 5e46adb into sdf10 Dec 15, 2020
@scpeters scpeters deleted the lightmap branch December 15, 2020 06:30
scpeters added a commit to scpeters/sdformat that referenced this pull request May 17, 2021
* originally added to 1.7 in gazebosim#429

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
scpeters added a commit that referenced this pull request May 19, 2021
* sdf 1.8: Add <double_sided> to material from #410
* sdf 1.8: Add lightmap to 1.8 spec from #429
* sdf 1.8: document Add L16 camera pixel format from #487

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* sdf 1.8: Decrease far clip lower bound from #435

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* sdf 1.8: Added render_order to material from #446

Signed-off-by: ahcorde <ahcorde@gmail.com>

* sdf 1.8: Add camera type aliases to docs. from #514
* sdf 1.8: Improve docs of collision_bitmask from #521

Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>

* sdf 1.8: support nested models in @attached_to from #316

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@iche033 iche033 mentioned this pull request Jul 29, 2021
7 tasks
jennuine pushed a commit that referenced this pull request Jul 30, 2021
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Co-authored-by: Steve Peters <scpeters@openrobotics.org>
@jennuine jennuine mentioned this pull request Jul 30, 2021
jennuine pushed a commit that referenced this pull request Aug 4, 2021
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Co-authored-by: Steve Peters <scpeters@openrobotics.org>
@scpeters scpeters mentioned this pull request Aug 12, 2021
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔮 dome Ignition Dome 🏢 edifice Ignition Edifice
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants