Documentation: About those Slot Rays
May 23, 2017 9:41:11 GMT -5
inabadromance, menaceman44, and 3 more like this
Post by orangemittens on May 23, 2017 9:41:11 GMT -5
Introduction
This post is a brief documentation about slot ray intersection data. It is meant to illustrate what slot ray intersection data is, why it matters, and how to go about working with CAS items that have it (garments). It will not show you how to edit slot ray intersection data manually, and questions about that process are beyond the scope of this documentation.
Sometimes when you create a CAS garment, you get your new item into the game only to discover that the arms are stuck in a weird position. This position usually has the arms sticking out from the Sim in a crossed position or jammed into the Sim's body. This kind of issue is usually the result of a slot ray mismatch between the mesh group of the original item and the mesh group that you replaced it with in the process of making your mesh.
Documentation
Below is an example that illustrates why this problem occurs. I cloned a full body garment. In the Warehouse, all the various parts of the mesh are represented by Geometry resources. Clicking on one of those shows the corresponding mesh on the right side in the 3D preview:
Switching to the Data tab allows a view of the various components of the mesh group. One of those is the SlotRayIntersections:
Clicking on the Edit Items button for the SlotRayIntersections brings up the Edit Slot Rays popup. In this case, since the mesh is large and covers a significant part of the Sim's body, there are many slot ray intersections:
As you can see above, many of these are target slots. These are used by the game to determine where parts of the Sim's body should be positioned when they are wearing the garment. Each has numerical values that cause specific limb positioning when the item is worn.
Contrast that mesh part's slot rays with this mesh group in the chest area which is one of those small single-plane groups present in many EA meshes (you can see the hole in the above mesh group that is the space where this mesh group fits):
This single plane has no slot ray intersection data:
If you take a mesh like the one illustrated above and replace it with a new mesh, you need to be careful to match the structure of the original package as closely as possible. If you replace a large mesh that has lots of slot ray intersection data with a single plane or vice-versa, you are going to end up with a slot ray intersection problem. For example, I swapped the cut numbers of the two mesh groups shown above. Now all of the slot ray intersection data of the large mesh has been assigned to vertices in the single-plane mesh. Meanwhile, the large mesh has no slot ray intersection data. In the game, the garment now looks like this:
The game is behaving as if the single plane is a large mesh that covers almost the whole body and the large mesh that covers almost the whole body is treated as a single plane located in the chest area. The slot ray intersection data mismatch is causing the arms to be pulled out of normal position.
While Studio allows manual editing of slot ray intersection data, the easiest route is to set your mesh groups up similar to the mesh groups you are replacing. No one, to the best of my knowledge, has performed all the mathematical calculating that would be necessary to manually edit the slot ray intersection data in a reliably successful fashion.
This post is a brief documentation about slot ray intersection data. It is meant to illustrate what slot ray intersection data is, why it matters, and how to go about working with CAS items that have it (garments). It will not show you how to edit slot ray intersection data manually, and questions about that process are beyond the scope of this documentation.
Sometimes when you create a CAS garment, you get your new item into the game only to discover that the arms are stuck in a weird position. This position usually has the arms sticking out from the Sim in a crossed position or jammed into the Sim's body. This kind of issue is usually the result of a slot ray mismatch between the mesh group of the original item and the mesh group that you replaced it with in the process of making your mesh.
Documentation
Below is an example that illustrates why this problem occurs. I cloned a full body garment. In the Warehouse, all the various parts of the mesh are represented by Geometry resources. Clicking on one of those shows the corresponding mesh on the right side in the 3D preview:
Switching to the Data tab allows a view of the various components of the mesh group. One of those is the SlotRayIntersections:
Clicking on the Edit Items button for the SlotRayIntersections brings up the Edit Slot Rays popup. In this case, since the mesh is large and covers a significant part of the Sim's body, there are many slot ray intersections:
As you can see above, many of these are target slots. These are used by the game to determine where parts of the Sim's body should be positioned when they are wearing the garment. Each has numerical values that cause specific limb positioning when the item is worn.
Contrast that mesh part's slot rays with this mesh group in the chest area which is one of those small single-plane groups present in many EA meshes (you can see the hole in the above mesh group that is the space where this mesh group fits):
This single plane has no slot ray intersection data:
If you take a mesh like the one illustrated above and replace it with a new mesh, you need to be careful to match the structure of the original package as closely as possible. If you replace a large mesh that has lots of slot ray intersection data with a single plane or vice-versa, you are going to end up with a slot ray intersection problem. For example, I swapped the cut numbers of the two mesh groups shown above. Now all of the slot ray intersection data of the large mesh has been assigned to vertices in the single-plane mesh. Meanwhile, the large mesh has no slot ray intersection data. In the game, the garment now looks like this:
The game is behaving as if the single plane is a large mesh that covers almost the whole body and the large mesh that covers almost the whole body is treated as a single plane located in the chest area. The slot ray intersection data mismatch is causing the arms to be pulled out of normal position.
While Studio allows manual editing of slot ray intersection data, the easiest route is to set your mesh groups up similar to the mesh groups you are replacing. No one, to the best of my knowledge, has performed all the mathematical calculating that would be necessary to manually edit the slot ray intersection data in a reliably successful fashion.