cabbler
|
  |
| Joined: 19 Jun 2015 |
| Total Posts: 735 |
|
|
| 08 Oct 2017 07:07 AM |
| say you have 1000 1x1x1 parts in a line, slightly separated. no physics involved. is it better to take the part count or union them all? it does let you union many separate parts. which causes more lag? |
|
|
| Report Abuse |
|
|
|
| 08 Oct 2017 07:12 AM |
I think union is Like a boolean operation modifier in a 3D modeling software. So it should take more power then just the parts separat. |
|
|
| Report Abuse |
|
|
|
| 08 Oct 2017 07:24 AM |
Here is a better answer each part is a cube so 6 quads 12 tris if you union them apart the tricount never changes and that is what take the power. So all you did is ad more stuff to calculate? by telling roblox this is union.
|
|
|
| Report Abuse |
|
|
cabbler
|
  |
| Joined: 19 Jun 2015 |
| Total Posts: 735 |
|
|
| 08 Oct 2017 10:13 AM |
| figured by saying it makes no less cpu power then the union is better... |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 08 Oct 2017 10:18 AM |
| Typically unioning a group of parts makes a tradeoff in favor of additional CPU strain to cut down on GPU strain |
|
|
| Report Abuse |
|
|
Spookeol
|
  |
| Joined: 26 Nov 2016 |
| Total Posts: 547 |
|
|
| 08 Oct 2017 10:31 AM |
Short answer is: Union everything
Reasoning: A. ROBLOX just released Instancing. What this means is that objects that use the same MeshId or Union Solid Model Id are all stored in the same block of memory and rendered into the game at once. So even unioning individual parts that you re-use is better than leaving them un-unioned. (Note: ROBLOX is going to implement Instancing for regular parts in the future as well, but ATM they only have support for Unions and MeshParts) B. Inherently in the definition of unions, they make parts more efficient. If two parts intersect, normally the ROBLOX engine will render the intersection for both parts as well. However, unions will negate the intersection for one part when combining parts. It is true, however, that the current CSG engine is pretty inefficient, however ROBLOX is working on a new one. You can test it out (and should use it whenever possible) by going into Studio Settings -> Physics -> Use CSG v2 |
|
|
| Report Abuse |
|
|
Spookeol
|
  |
| Joined: 26 Nov 2016 |
| Total Posts: 547 |
|
|
| 08 Oct 2017 10:33 AM |
| These ### ####### #### ###### take both less memory and less CPU computation (as you are rendering less triangles and only storing one copy of each union - with less triangles as well) A very very very small thing though that might become a problem is the collision hitbox of unions and mesh parts. If you happen to have like #### ###### etc then you might want to try experimenting with other collision fidelities besides the default one. |
|
|
| Report Abuse |
|
|
cabbler
|
  |
| Joined: 19 Jun 2015 |
| Total Posts: 735 |
|
|
| 08 Oct 2017 10:39 AM |
| That makes sense for actual solid modeling. More specifically: if the unioned parts are not even touching, is it still worth it? same scenario above. there must be some downside. |
|
|
| Report Abuse |
|
|
Spookeol
|
  |
| Joined: 26 Nov 2016 |
| Total Posts: 547 |
|
|
| 08 Oct 2017 10:45 AM |
The downside is that physics engine won't account for them being as separate entities so they will act as though welded together.
I guess it takes a bit more memory than separated parts as unions are their own datastructure on top of primitive parts. (So will take longer to download the union, load it into game, and store it)
This should all be compensated if you are re-using unions because of the Instancing feature as mentioned above ^ Also you shouldn't let a one time loading stop you from making your game more efficient in other ways because if you average out your long 1 time loading with the rest of the time players will spend playing and how fast that is (I'm assuming you have big maps etc or something) then its better than short 1 time load and slow gameplay
|
|
|
| Report Abuse |
|
|
|
| 08 Oct 2017 10:55 AM |
IIRC, CSG IRL uses GPU/CPU over RAM. This is, again IIRC, due to using mathematical calculations to render it rather than saving a bunch of vertices to memory.
|
|
|
| Report Abuse |
|
|
|
| 08 Oct 2017 12:43 PM |
Some Info since I tested it. Instancing is great didn't know Roblox can do that. But if you union intersecting parts your will increasing the tricount. I used union on two intersecting blocks and exported as obj then import to Blender. And the intersection created lots of unnecessary tris and there was still the boolean (union) mod on the union part (so i guess you end up having 3 parts this way). I am pretty sure union on intersecting parts is always worse then a mesh with good topology.
|
|
|
| Report Abuse |
|
|
|
| 08 Oct 2017 12:55 PM |
the simple union had 34 tris would only need 20 tris |
|
|
| Report Abuse |
|
|
Spookeol
|
  |
| Joined: 26 Nov 2016 |
| Total Posts: 547 |
|
|
| 08 Oct 2017 12:57 PM |
Instancing just got released 2 or 3 weeks ago Also use CSG v2 not traditional CSG (released probably 3 months ago)? |
|
|
| Report Abuse |
|
|