mitchellspryn/UrdfSim

Materials for Custom STLs

Closed this issue · 5 comments

When trying to set the path for a custom material I noticed that it does not get applied to my custom STL mesh. When ends up showing is a default grey material. When looking through the issues I noticed that in #15 applying materials to custom STLs does not seem to work. Has this issue been fixed?

Here are the paths I used to set up custom materials:
material_issue

Here is a sample mesh that shows only the default grey material.
joint_origin_offsetX-Z_01_018

@mitchellspryn

I am trying a potential solution to this issue. Is it possible to add materials to custom ascii STLs if the STLs are first imported as static meshes in unreal engine, then linked using the xml file?

Essentially, the process would be:

  1. Import the ascii STL as an FBX file
  2. In the XML, use mesh type "unreal_mesh" then point to the appropriate path to the mesh
  3. Use the "material" tag to point to the location of the material in UE to attach to the mesh

Sorry, missed this the first time.

If you can import it into unreal, that's definitely the way to go. In addition to being simpler at runtime, you'll get the benefits of pre-baked lighting for the mesh textures, so it will look better.

Thanks @mitchellspryn ,

I tried to find the example to link the unreal meshes in the XML, but the only file that exists in the example folder is just the settings-mesh.json file.
How can we link unreal meshes in the XML and what would the appropriate file path look like?

The above method works. Importing the STL's to UE is the way to go.
Additionally, using this method I am able to change the materials on my meshes though UE instead of the XML giving me greater flexibility over custom meshes.