you can use already viewportframes in surface guis
No you can’t. I just tried to earlier and it wouldn’t show the model, and when I moved the model to a regular GUI it showed up. Unless it’s broken.
Left is a regular GUI with the same model as the viewport frame on the right.
As you can see, it’s not showing up.
try put the surface gui inside starter gui and set the adornee to the part.
6 months is pretty good turnaround time, not gonna lie.
That worked, thanks. But I seriously think they should allow you to add it how I originally tried. It’s more intuitive.
Is physics calculated ‘locally’ in WorldModels? Eg if I have a spaceship and character inside a WorldModel, can I put the WorldModel millions of studs away from the origin and still have stable physics for the ship and character?
This is great. Thanks for the consistent updates to make our lives easier. Many of the new features have helped trim down our code.
I am curious though; How the raycasting works with WorldModels. Anyone got an example of what this would look like?
I haven’t checked this yet, but can we have lighting, skyboxes, shadows, etc… in viewportframes? If this isn’t a feature yet, then when will it be a feature?
If lighting gets added to viewportframes, then I see people being attempting to make windows using viewportframes in surfaceguis.
This is really nice. I like this.
There seems to be quite a hefty performance penalty simply for putting things into a WorldModel:
The rightmost 2/3 or so of this picture is from adding WorldModels into ViewportFrames that have character rigs in them. The rigs have joints in them, however, none of them are animated or moving. Will we see more optimizations for this?
EDIT
I made sure everything was CanCollide false and Massless true as well. Performance issues still remained. Something interesting to note is that performance is mostly taken up by some kind of spatial filtering. This performance cost also does not really seem to scale up or down, it seems completely fixed at about 0.01ms per WorldModel on my machine.
Workspace inherits functions from WorldModels right?
What issues have you found? A lot of functionality is not supported in the WorldModel
. Specifically only what was mentioned in the original post are what we are supporting right now.
Workspace and WorldModel both inherit from WorldRoot. This does not seem to appear properly on devhub right now but you can see it if you run print(Instance.new('WorldModel'):IsA('WorldRoot'))
. You can also see it here.
Looks really cool! Will for sure check it out. Will you be updating this in the future to include more features than just Humanoids and raycasting?
we will add functionality as appropriate, but no timelines at the moment
For reference what’s your total physicsStepped there? Judging by the total Frame Time for 44 frameSteps being .593, looks like your entire physicsStepped is < 1ms? You had to zoom in pretty far!
We can still do better, but 0.01 ms for an entire mini-Workspace isn’t terrible. That part of the overhead shouldn’t get much worse if the character was animating at least. And yeah, ideally this should be free if they’re static… WorldModels do have overhead, but it should be less than emulating the same thing yourself in Lua.
There’s room for many different optimizations here, and we actually have people working on a lot of these already! We decided not to hold this feature back waiting for that work to be completed though. That work proceeds in parallel, and soon this processing time will too. A lot of these changes will benefit both Workspace and WorldModels, without developers having to change anything.
Currently, you need to create it with Instance.new(“WorldModel”), but hopefully we can insert it through studio sometime soon .
Just for context, that was on a machine with a 9900KS @ 5.2GHz, on the average machine it is usually about twice as slow or more. Approaching 1ms and above to add WorldModels into the ViewportFrames for our in game shop menu is unfortunately too much for us to use the feature right now.
Glad to see there are improvements being made, though!
Is there any sort of timeframe for when we can expect them?