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.

How to add many MRenderItem's in a MRenderItemList?

How to add many MRenderItem's in a MRenderItemList?

Anonymous
Not applicable
789 Views
5 Replies
Message 1 of 6

How to add many MRenderItem's in a MRenderItemList?

Anonymous
Not applicable
Hi,
I have an MPxGeometryOverride and need to create many MRenderItems. I append them render item by renter item in the MRenderItemList during a loop.
However beyond 3 or 4000 it becomes quite slow and reaching the 10'000 takes ages.
Is there a way to bulk add all render items in one go, or is there another way to do ?
Putting all my geometry in a single renderitem is not really a solution.
Thanks !
Accepted solutions (1)
790 Views
5 Replies
Replies (5)
Message 2 of 6

cheng_xi_li
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

I am afraid there is no way to bulk add renderitems. If they are same renderItem with different transforms, it would be better to use MPxSubsceneOverride which supports instancing.

 

Yours,

Li

Message 3 of 6

Anonymous
Not applicable

Ok, thanks, will look into MPxSubsceneOverride !

0 Likes
Message 4 of 6

Anonymous
Not applicable

Hi Li,

I played with MPxSubsceneOverride and performance is indeed much better.

However 1 issue I have: How can I force update (instead of changing time) ?

 

Thanks !

0 Likes
Message 5 of 6

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

You'll need to trigger an update (e.g. MPlug::getValue).

 

Yours,

Li

Message 6 of 6

Anonymous
Not applicable
Oh thanks, it works 🙂 !!
0 Likes