Constraint Visualization Improvements [Full Release]

[Update] March 31, 2023


Hey Developers,

We are excited to announce the release of a new beta that showcases an X-ray view for constraints and other workflow improvements!

Overview of changes and beta details

1. New “X-ray view” for constraint details

The new rendering treatment shows constraint visualizations that are inside parts with slight transparency to make it easier to visualize their depth when you select Constraint Details. This should make working with complicated mechanisms with many constraints much easier to work with and visualize.

Before:
Constraint_Viz_Spring_Constraint4_BEFORE

After:
Constraint_Viz_Spring_Constraint4_AFTER

Note: With these changes the value of having a Draw on Top toggle is significantly decreased so we decided to remove the button to decrease the constraint UX complexity.

2. Selected Constraints, Attachments, NoCollisionConstraints, and WeldConstraints will show details, even when the global Constraint Details button is disabled

Even if the constraint details button is disabled, when specific constraint instances are selected in the Explorer, the single constraint is visualized with its details. This enables a much quicker building and debugging workflow for creators.

Constraint_Viz_Details2

Enabling the Beta

Go to File > Beta Features and select Constraint Visualization Improvements to enable this beta. Be sure to restart Studio to allow the changes to take effect.

Next Steps

We will be reviewing all of your feedback to determine how we can continue to improve this feature. Alongside general feedback, we are also looking for cases where this may affect particular workflows.

Please let us know if you have any questions or concerns regarding his beta or anything else we covered in this post!


Shoutout to @Homeomorph for working on these changes!

Thank you.

156 Likes

This topic was automatically opened after 10 minutes.

not really a big deal, but the update its mid

3 Likes

Will you still leave it available as an action so we can trigger it through keybinds or ribbon editing?

Now how about raycast visualization?

7 Likes

You’ve always been able to visualize a raycast quite easily. Add this to the script just below your raycast:

--Hiding some of the more complex math so we don't need to copy/paste it
local intersection = result and result.Position or origin + direction
local distance = (origin - intersection).Magnitude

-- the actual visual part
local ray_visual = Instance.new("Part")
ray_visual.Size = Vector3.new(0.1, 0.1, distance)
ray_visual.CFrame = CFrame.new(origin, intersection)*CFrame.new(0, 0, -distance/2)
ray_visual.Name = "Raycast Result"
ray_visual.Color = Color3.new("Really red")
ray_visual.Parent = Workspace

You’ll need to fill in result, origin and direction yourself. result is the raycast you want to see, origin is the position you’re firing the cast from and direction is the direction your raycast is going in.

6 Likes

Wow that’s just excellent no complaints. I’ve always found it hard to position the attachment when it was drawing on top like the old behavior.

1 Like

These are the kinds of UX improvements we’ve been asking for. :slight_smile: Looking forward to seeing more around various domains in Studio.

1 Like

It would be still useful though, especially when sphere, cylinder, and other raycast methods get added.

2 Likes

Is this perhaps what’s causing the much more significant render time in studio? In the past few days I’ve noticed that the Pass3dAdorn step is scaling up with the number of parts in a place in studio, even though there are no attachment or constraint objects inside of the parts. Online this does not seem to be an issue, but it makes performance testing a lot more tricky for games with a lot of parts in studio.


This example place is 10000 R6 characters with no attachments, or constraints, just the parts.

Here’s the same place in a live test, performance is about 80x better.

For additional context, I don’t have any of the constraint settings turned on either.
RobloxStudioBeta_N47DuLwLY7

I’ve tried with this new beta feature off and on, I get just about the same performance for both.

5 Likes

Interesting. Well the Draw On Top button in your screenshot indicates you don’t have this beta feature active (also we only enabled it this morning). This may be worth its own bug report thread.

This is probably not causing the issue you’re seeing, but the X-ray rendering we’re adding in this change does slightly slow studio down when Constraint Details is enabled in places with 100s of constraints. So in ~2 weeks we’ll have a budget where Constraint Details only draws the nearest few hundred Attachments and Constraints to the camera. So if you did have Attachments in those characters, drawing those would get faster in a couple weeks.

2 Likes

ok I will have t check that out

The toggle is completely removed in the beta because the “x-ray view” functions effectively as both options enabled at the same time. We’d like to know if there are cases where you’d prefer to see something other than the x-ray view.

1 Like

I want to be able to hide nocollisionconstraint visualizations the same way you can hide weld constraint visualizations.

13 Likes

Much needed quality-of-life update for the constraints system.

I was recently trying to rig a vehicle to utilize constraints and it was kind of hard to see where constraints were at relative to the position of other constraints. Hoping to see more positive changes in the future.

1 Like

Nice! It would be good to have a tool to automatically put constraints in the center of a part, it is quite difficult to join both of them in the same position.

1 Like

I’d love to make a bug report. Unfortunately though, after 15 years on this platform I still am not permitted to create one haha.

3 Likes

Yes, you absolutely can do that - but it still would be useful to have the visualizer built-in like other game engines. We shouldn’t expect game developers to waste time over such trivial matters.

2 Likes

Honestly, it’s the little things that count. Big huge updates are super exciting and nice but just small little QOL things are the cherry on top. I really hope there are more of these to come as they really can make a difference in the experience in Studio.

there is a bug report button on the top of the main page that anyone can use, itll make a post for you