Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Viewport 2.0 kLineStrip multiple curves

Viewport 2.0 kLineStrip multiple curves

haggi_master
Advocate Advocate
552 Views
2 Replies
Message 1 of 3

Viewport 2.0 kLineStrip multiple curves

haggi_master
Advocate
Advocate

Hi,

I have a bunch of curves data from an alembic file and I want do draw these curves in VP2.

 

If I see it correctly, then I have two ways to draw lines:

  1. use a renderitem with kLines primitive what need an index pair for every line: 0-1, 1-2, 2-3 which are not connected.
  2. user a renderitem with kLineStrip which can use a connected list of indices.

For the kLineStrip it seems that I can only draw 1 long line because I have no way to tell maya how many points a line has.

Can I draw more than 1 curve with primitive type kLineStrip?

0 Likes
553 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

Have you tried using glPrimitiveRestartIndex to mark the ends of each strip?

 

Why don't you want to use multiple render items? Efficiency concerns?

0 Likes
Message 3 of 3

haggi_master
Advocate
Advocate

Ah, sorry I forgot to mention that I use a geometryOverride so I fear I cannot use the glPrimitiveRestartIndex, or at least I don't know how. Using multiple renderitems could work even if I have no idea how to do it. If I understand the procedure correctly, I create renderitems for a general type of display. So if I want my curves to be visible in wireframe mode, I create a wireframe item, not for a special object, but maybe I misunderstood the complete workflow.

 

I get the curves from an alembic file where I can have several tousends of curves so I think it would be faster do to it in one go. Meanwhile I solved the problem by using the normal kLines primitive type what seems to work.

0 Likes