-
Notifications
You must be signed in to change notification settings - Fork 269
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 demo #471
Add lightmap demo #471
Conversation
Signed-off-by: Ian Chen <[email protected]>
I'm not sure exactly where the problem lies, but I get this (followed by maybe a dozen similar errors) when running it:
The files are actually found in
so it seems the username is incorrect as well as the caplitalization/space-vs-underscore of the generated filename |
oops, I've fixed the paths in model.sdf and have updated the model on Fuel |
I think you also need to add Otherwise it's not getting converted to the URL, i.e.
And results in these errors:
|
src/Conversions.cc
Outdated
@@ -301,6 +301,14 @@ msgs::Material ignition::gazebo::convert(const sdf::Material &_in) | |||
asFullPath(workflow->EnvironmentMap(), _in.FilePath())); | |||
pbrMsg->set_emissive_map(workflow->EmissiveMap().empty() ? "" : | |||
asFullPath(workflow->EmissiveMap(), _in.FilePath())); | |||
|
|||
// todo(anyone) add light_map to material.proto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we ticket an issue for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ticketed gazebosim/gz-msgs#109
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was addressed on gazebosim/gz-msgs#111. We could wait until ign-gazebo5
is updated to use ign-msgs7
and use the new field here (gazebo-tooling/release-tools#362)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure sounds good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is unblocked now
Signed-off-by: Ian Chen <[email protected]>
ah good catch, created pull request: gazebosim/gz-fuel-tools#146 |
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
@@ -218,6 +218,7 @@ TEST(Conversions, Material) | |||
workflow.SetEmissiveMap("emissive_map.png"); | |||
workflow.SetGlossinessMap("dummy_glossiness_map.png"); | |||
workflow.SetSpecularMap("dummy_specular_map.png"); | |||
workflow.SetLightMap("light_map.png", 1u); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the light_map.png
file suppose to exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think this is just testing that the conversion between SDF and messages works fine, without worrying about resolving the file.
Signed-off-by: Ian Chen <[email protected]>
@@ -218,6 +218,7 @@ TEST(Conversions, Material) | |||
workflow.SetEmissiveMap("emissive_map.png"); | |||
workflow.SetGlossinessMap("dummy_glossiness_map.png"); | |||
workflow.SetSpecularMap("dummy_specular_map.png"); | |||
workflow.SetLightMap("light_map.png", 1u); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think this is just testing that the conversion between SDF and messages works fine, without worrying about resolving the file.
Signed-off-by: Ian Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #471 +/- ##
=======================================
Coverage 77.38% 77.39%
=======================================
Files 213 213
Lines 11954 11958 +4
=======================================
+ Hits 9251 9255 +4
Misses 2703 2703
Continue to review full report at Codecov.
|
depends on:
Add lightmap to 1.7 spec and PBR material DOM sdformat#429released in 10.1.0Add support for lightmaps in ogre2 gz-rendering#182Add Lightmap to material gz-common#132released in 3.9.0Fix light map URI in materials gz-fuel-tools#146released in 5.1.1This PR demo's the new lightmap feature added in ign-rendering. It reads a new lightmap parameter from SDF and creates a material with lightmap using the new ign-rendering APIs.
One caveat is in the sdf-to-msgs conversion functions. I didn't add a lightmap field to the material.proto file in ign-msgs as that breaks ABI. So it's temporarily stored to the header. We can consider bumping ign-msgs if this is too much of a hack.
An indoor environment model has been uploaded onto Fuel. To run the demo:
Signed-off-by: Ian Chen [email protected]