Viewports Causing Extreme Script Activity?

I created a script that updates a viewportframe’s image every renderstepped frame. Viewports are pretty expensive and because of that, script activity is at 24% when rendering 3 humanoids and can get higher if I add more to the viewport. Is it ok to do this? Wouldn’t a viewport be similar to rendering a regular part, but viewports are inside of a gui? If it’s similar to rendering a normal part wouldn’t this be cheaper to run?

My goal is to create an xray effect and I’m wondering if there’s any ways to do this that is less costly/how to reduce the script activity?

Couldn’t you use WorldModel to playback animations in the ViewportFrame to lower the load?

I’ll try that but it says that it’s pending in the release notes https://developer.roblox.com/en-us/resources/release-note/Release-Notes-for-410

I’ve tested WorldModel before and it seems to work for me.

How do I use the worldmodel in the viewport? I tried to parent it to the viewport, then I parented the character to the worldmodel and ran the animation. The character shows but the animation didn’t play even though it was in the WorldModel object.

image

An internet search answers your question.

More specifically, you can make a WorldModel a child of a ViewportFrame, and then parent geometry to the WorldModel

What exactly does “parent geometry to the worldmodel” mean? Like where is geometry or is it the service Geometry?