question about drawtrimesh()

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

question about drawtrimesh()

Huan Liu
Hi,
I'm using drawtrimesh() to visualize some custom 3d objects in
openrave following the example in testplotting.py. The problem I have
is that the objects being drawn this way all have the same surface
material (no shading and reflection) and alpha value(=1). Is there a
way to change the material type to make those objects look like the
ones getting loaded with .iv files? Is it that my triangle index
ordering being wrong caused the no shading problem? Is there a way to
specify the ordering of the triangle vertices (clockwise vs. counter
clockwise)?

Thanks!
Huan

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: question about drawtrimesh()

Rosen Diankov
Administrator
hi huan,

The materials were made on purpose this way so that the graphs can be
easily distinguished from the geometry of the rest of the environment.

Is there a usage case where you want triangle meshes drawn in the
environment without having them as kinematic bodies?

Note that you can always create your own XML kinematic body file in
memory to load triangle meshes. You would initialize trimesh geom,
using the "vertices" tag.

You can also disable collisions of a kinematic body using its Enable function...

rosen,

If you would like to draw random triangles in your environment

2010/8/28 Huan Liu <[hidden email]>:

> Hi,
> I'm using drawtrimesh() to visualize some custom 3d objects in
> openrave following the example in testplotting.py. The problem I have
> is that the objects being drawn this way all have the same surface
> material (no shading and reflection) and alpha value(=1). Is there a
> way to change the material type to make those objects look like the
> ones getting loaded with .iv files? Is it that my triangle index
> ordering being wrong caused the no shading problem? Is there a way to
> specify the ordering of the triangle vertices (clockwise vs. counter
> clockwise)?
>
> Thanks!
> Huan
>
> ------------------------------------------------------------------------------
> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
> Be part of this innovative community and reach millions of netbook users
> worldwide. Take advantage of special opportunities to increase revenue and
> speed time-to-market. Join now, and jumpstart your future.
> http://p.sf.net/sfu/intel-atom-d2d
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: question about drawtrimesh()

Huan Liu
Thanks Rosen!

> The materials were made on purpose this way so that the graphs can be
> easily distinguished from the geometry of the rest of the environment.
I see. So those being drawn with drawtrimesh actually cannot be used
for collision checking.

> Is there a usage case where you want triangle meshes drawn in the
> environment without having them as kinematic bodies?
I do want to make them kinematic bodies. I'm using drawtrimesh to see
if the object makes sense.

> Note that you can always create your own XML kinematic body file in
> memory to load triangle meshes. You would initialize trimesh geom,
> using the "vertices" tag.
Yep. I've used that feature and it worked out perfectly.

> You can also disable collisions of a kinematic body using its Enable function...
Ha! A new trick learned.

Thanks again for your help!

>
> rosen,
>
> If you would like to draw random triangles in your environment
>
> 2010/8/28 Huan Liu <[hidden email]>:
>> Hi,
>> I'm using drawtrimesh() to visualize some custom 3d objects in
>> openrave following the example in testplotting.py. The problem I have
>> is that the objects being drawn this way all have the same surface
>> material (no shading and reflection) and alpha value(=1). Is there a
>> way to change the material type to make those objects look like the
>> ones getting loaded with .iv files? Is it that my triangle index
>> ordering being wrong caused the no shading problem? Is there a way to
>> specify the ordering of the triangle vertices (clockwise vs. counter
>> clockwise)?
>>
>> Thanks!
>> Huan
>>
>> ------------------------------------------------------------------------------
>> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
>> Be part of this innovative community and reach millions of netbook users
>> worldwide. Take advantage of special opportunities to increase revenue and
>> speed time-to-market. Join now, and jumpstart your future.
>> http://p.sf.net/sfu/intel-atom-d2d
>> _______________________________________________
>> Openrave-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>
>

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users