Why if i create a Mesh triangle-by-triangle by using visualization_msgs::Marker (type=TRIANGLE_LIST) the shader doesn't take into account normals ? Surface shader is not working. See attached image:
Originally posted by m4nh on ROS Answers with karma: 26 on 2016-10-28
Post score: 0
Original comments
Comment by William on 2016-10-28:
Does it look like that from all angles? Sometimes the order of the points will determine the normal face, i.e. clockwise will give you a normal in one direction and counterclockwise will give you a normal in the opposite direction.
Comment by m4nh on 2016-10-29:
Yes! It looks like flat from every vantage point. Reversing order of triangle makes all mesh go away.
Comment by gvdhoorn on 2016-10-29:
RViz will not show any material / texture if there is no valid transform from whatever Fixed Frame is set to and the value you have set in the header.frame_id
field. Could you include a snippet of how you setup your Marker
msg? And describe the rest of your TF tree?
Comment by m4nh on 2016-10-29:
In this example is just a simple node with no TF tree behind. I just set frame_id as "world"
and set "world" as base frame in Rviz.. so i think is an Identity transform... could this be the problem?
Comment by gvdhoorn on 2016-10-29:
If RViz is set to use world
as the Fixed Frame, then things should be ok. Make sure RViz doesn't complain about anything.
Comment by OzzieTheHead on 2021-08-11:
This looks like how a mesh shows up when it doesn't have any transforms. e.g. a RobotModel with no state publisher or tf publisher behind it