One simple way to solve some CSG errors

Many CSG errors happen when a brick is not placed correctly in relation to the other brick. There is this Floating point thing, that makes part positioning imperfect, meaning that 0.000xxx changes appear, especially when the part is away from the middle’s 0,0,0 point and by moving it too much. Then the Studio cannot read it as it can read only to the third digit after the comma.
This quick tutorial will help you keep your builds without errors, by fixing the parts position, as some of you may already know–precise placement is a key to CSG.

Here is what you have to do to:

  1. Select the part you want the position fixed.
  2. Copy its position.
  3. Type in 0,0,0
  4. Paste in the copied position back.

(If the brick rotation has been changed, make sure to do the same thing in Rotation settings)

Make sure to do this on every part you’ve been connecting encountering an error.


I hope this solved your error and you can build further :slight_smile:
This isn’t an ultimate magic trick that will work on every error, but I also know many other ways to solve them. If you do have any problems, feel free to ask me for help :smile:

14 Likes

It would be cool if it could be moved to public tutorials C:

I usually run stuff like the following in the command bar:

function r(x) return math.floor(x*1000+.5)/1000 end e=workspace.MODEL:GetChildren() for i=1,#e do e[i].CFrame = e[i].CFrame-e[i].Position+Vector3.new(r(e[i].Position.X),r(e[i].Position.Y),r(e[i].Position.Z)) end

Group the parts, name it MODEL, run code, ungroup and union. Almost always works.

4 Likes

You might consider expanding the scope of the tutorial and adding various graphics before having it moved to public tutorials

Further information that you can add:

  • It can be 1-0.00001 and you’ll see 0.999999 instead. The fix is the same.
  • This also applies to rotation
  • Alternatively, you can also add a trailing 0 instead of resetting the position (e.g. 13.00001 → 13.0, 5.5550001 → 5.5550)
  • Warning that you may have to re-adjust your parts to remove seams. For instance, another part may have looked flush with the one you changed, but now that you changed one the other part is connecting to the wrong points and there’s a seam.
5 Likes

For me now it’s like dark magic :stuck_out_tongue_winking_eye:
But I suppose it fixes each parts’ position in the model, am I right?

Can I edit the thread after like few weeks?

Sure I could provide more variations and images, but I’m without main PC (it will take some time till I get it back) and working on older, less advanced PC is currently a hard pain.

There are no limits on editing anymore, so you can edit whenever you feel the need to.

1 Like

Let me quote myself (from one of discord channels):

"Thing is that CSG is complicated to make a one tutorial about everything. It is also hard (for me) to bring back errors I solved in past as I usually just do it straight away without marking that in my memory (but I have knowledge how to solve them)
I plan to make quick video tutorials in which I would show how I solve errors I come across while building my projects. When some of these videos would appear, then I could take it inside the tutorial.

But for now it’s kinda impossible for me as I’m left with an old laptop on which working is a true pain… I have to get my other laptop I was working on to service to repair the motherboard"

Also, when I get do write a whole tutorial with everything needed, can I create a completely new topic for it, or I edit this one to not make any other with technically the same topic?

If you’re just increasing the scope as it concerns CSG errors, it would probably make more sense to edit this thread. The title already implies it’s for solving CSG errors in general and not just the one particular method you mentioned. Make sure to note that it’s been edited though or else some existing posts may seem out-of-place. If you want to broaden the topic to include something like “you can make union data less complex by unioning all the components at once instead of unioning unions together”, then it might be a better idea to create an entirely new thread since it’s no longer strictly about solving CSG errors.

Okay, thanks for suggestions.

While thinking about it I came across an idea to ask forum community to post their errors where I would help them solve it and meanwhile “storing” it for further big CSG thread.

Well, I’m not sure if that was just an example (not necessarly true), maybe it does simplify data, but then it is harder to locate an error origin (if such appears).

Also, yes, I will create completely new thread about CSG building – on what to do and not do. Including errors and basic rules :slight_smile:

It was a true example. When you create a union, the union’s ChildData contains instructions for how to rebuild the union’s components. It’s compressed (which can cause unions to not be able to be taken apart if compression damages the data), but union file sizes are still substantially larger, so when you union unions with unions instead of unioning all of the components at once, you’re exponentially increasing the file size because the final union has to contain enough instructions for how to re-create all of those data-heavy unions instead of just some parts.

Not if you use this plugin which 1) automatically lets you know which components can’t be unioned together, and 2) automatically tries various solutions for you :wink:

1 Like

Huh? Interesting… :slight_smile:
Big thanks for that, may be useful sometimes.
Will check out the plugin asap :smile: