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

USD to SDF converter #736

Closed
wants to merge 30 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
04ac451
prototype
ahcorde Oct 21, 2021
fec7541
prototype
ahcorde Oct 26, 2021
9ce073f
prototype
ahcorde Oct 27, 2021
787e8f5
User ignition Math, common and sdformat typs
ahcorde Nov 2, 2021
5115f44
using sdf::joint
ahcorde Nov 2, 2021
d4cb4cc
Vehicle joint and some other fixes
ahcorde Nov 3, 2021
9b73015
materials and geometry subsets
ahcorde Nov 5, 2021
a74ee34
Improvements in materials, meshes and joints
ahcorde Nov 10, 2021
fe2ddb0
Improve materials, meshes and others
ahcorde Nov 11, 2021
ce46639
more updates
ahcorde Nov 13, 2021
8fc9666
improvements
ahcorde Nov 16, 2021
ac61126
Added lights, camera sensor and other TF fixes
ahcorde Nov 18, 2021
d127881
Added model vector and other features
ahcorde Nov 19, 2021
163637a
Fix light API and other things
ahcorde Nov 23, 2021
09eea1f
Fixed material and polygon to triangles with CGAL
ahcorde Nov 25, 2021
c344a55
Fixed textures and subgeom pose
ahcorde Nov 25, 2021
5bd5c7b
More changes
ahcorde Nov 29, 2021
0c629c2
Added lidar, collisions and others
ahcorde Dec 1, 2021
58ac549
Add more code
ahcorde Dec 14, 2021
1e9890b
fix USD -> SDF converter build
adlarkin Jan 13, 2022
304d27c
Fixed directory name
ahcorde Jan 13, 2022
e11a18e
Added tutorials
ahcorde Jan 13, 2022
83f86ab
Added missing dependency
ahcorde Jan 13, 2022
aa1333d
USD -> SDF: polygon triangulation (#819)
Jan 18, 2022
f2e88dd
Some more fixes
ahcorde Jan 18, 2022
4deb2bc
cleanup
ahcorde Jan 18, 2022
1c4ba22
Fix
ahcorde Jan 18, 2022
d2fd2a8
USD -> SDF: fix y up (#825)
Jan 20, 2022
d82cf39
cleanup
ahcorde Jan 20, 2022
bfd8d08
some fixes
ahcorde Feb 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improvements
Signed-off-by: ahcorde <[email protected]>
ahcorde committed Nov 16, 2021

Verified

This commit was signed with the committer’s verified signature.
commit 8fc966605f183dfddd60f9d8357bf43bead480fa
20 changes: 20 additions & 0 deletions src/parser_usd.cc
Original file line number Diff line number Diff line change
@@ -214,6 +214,7 @@ inline namespace SDF_VERSION_NAMESPACE {
if (!mesh)
break;
geometryType = doc->NewElement(type.c_str());
std::cerr << "mesh->Scale() CreateGeom" << mesh->Scale() << '\n';
AddKeyValue(geometryType, "scale", Vector32Str(mesh->Scale()));
// do something more to meshes
{
@@ -285,10 +286,13 @@ inline namespace SDF_VERSION_NAMESPACE {
if (_oldLinkName.compare(0, _link->name.size(), _link->name) == 0 ||
_oldLinkName.empty())
{
std::cerr << "/* visual name " << _oldLinkName.c_str() << '\n';
sdfVisual->SetAttribute("name", _oldLinkName.c_str());
}
else
{
std::cerr << "/* visual name " << _link->name + kLumpPrefix + _oldLinkName << '\n';

sdfVisual->SetAttribute("name",
(_link->name + kLumpPrefix + _oldLinkName).c_str());
}
@@ -378,6 +382,22 @@ inline namespace SDF_VERSION_NAMESPACE {
double metalness = pbrWorkflow->Metalness();
AddKeyValue(metalTag, "roughness", Values2str(1, &roughness));
AddKeyValue(metalTag, "metalness", Values2str(1, &metalness));
if (!pbrWorkflow->MetalnessMap().empty())
{
AddKeyValue(metalTag, "metalness_map", pbrWorkflow->MetalnessMap());
}
if (!pbrWorkflow->AlbedoMap().empty())
{
AddKeyValue(metalTag, "albedo_map", pbrWorkflow->AlbedoMap());
}
if (!pbrWorkflow->NormalMap().empty())
{
AddKeyValue(metalTag, "normal_map", pbrWorkflow->NormalMap());
}
if (!pbrWorkflow->RoughnessMap().empty())
{
AddKeyValue(metalTag, "roughness_map", pbrWorkflow->RoughnessMap());
}
}
}

2 changes: 1 addition & 1 deletion src/usd/usd_parser/joints.cc
Original file line number Diff line number Diff line change
@@ -367,7 +367,7 @@ namespace usd
{
auto variant_geom = pxr::UsdGeomGprim(_prim);

std::tuple<pxr::GfVec3f, pxr::GfVec3f, pxr::GfQuatf, bool, bool, bool> transformsTuple =
std::tuple<pxr::GfVec3f, pxr::GfVec3f, pxr::GfQuatf, bool, bool, bool, bool> transformsTuple =
ParseTransform(_prim);

pxr::GfVec3f scale = std::get<0>(transformsTuple);
Loading