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.

Wireframe not displaying right away

Wireframe not displaying right away

Anonymous
Not applicable
214 Views
2 Replies
Message 1 of 3

Wireframe not displaying right away

Anonymous
Not applicable
Hello,

I'm writing a modifier which changes lots of things in a mesh, including geometry, topology and texture mapping.

It works well in the case of a smooth or facet rendering, but I have problems with the wireframe: I must move a viewport a little bit if I want the output mesh to be drawn.

As my modifier "animates" the object along with time, I am unable to preview the resulting animation in the viewport.

I specify that I change all these channels in the modifier specs, I invalidate the Geom and topo caches, I call the "PointsWereChanged" method and I update the associated validity...

Does anyone know which flag I miss ?

Thanks a lot for your help,

Best regards,

Etienne
0 Likes
215 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Well, it works much better now !

the strange thing is that I changed something not related to wireframe: when creating the UV sets for my object, I was doing something like this:
 
for &#40;<all the desired UV maps>&#41;
{
mesh.InitMap&#40;&#41;
//fill in the map
}


Changing this code to this:

for &#40;<all the desired UV maps>&#41;
mesh.InitMap&#40;&#41;
for &#40;<all the desired UV maps>&#41;
//fill in the map


solved everything... weird !
0 Likes
Message 3 of 3

Anonymous
Not applicable
I've also noticed I get better results using the following at the end of my Modify method:


os->obj->UpdateValidity&#40; ChannelsChanged&#40;&#41;, valid &#41;
os->obj->SetChannelValidity&#40; TOPO_CHAN_NUM, valid &#41;
os->obj->SetChannelValidity&#40; GEOM_CHAN_NUM, valid &#41;
os->obj->SetChannelValidity&#40; TEXMAP_CHAN_NUM, valid &#41;


Where "valid" usually is set to Interval&#40;time,time&#41;.

Also, check your bounding box to make sure it is ok.
0 Likes