View Full Version : Sockets vs. Joints
Peetch
11-17-2009, 01:43 PM
What is the over head for sockets placed in the editor vs. having a rigger add in a join to the skeletal mesh for attaching components? i.e. a joint to attach shoulder pads vs. having a socket to attach to.
Solid Snake
11-17-2009, 02:09 PM
None really. The difference here is that you can also apply relative translation, rotation and scale to sockets that can differ between model to model without the code having to know anything. Secondly, these can be named all the same but be connected to different models, where as if you use a single bone name it may not always make sense.
fritzmonkey
11-17-2009, 02:21 PM
I believe that using joints gives the animators more control than sockets. With shoulder pads using joints will probably make it easier to animate so that when the character raises his arm the shoulder pad is adjusted accordingly. I think this is harder to do with sockets.
Solid Snake
11-17-2009, 04:42 PM
Sockets are attached to joints.
Peetch
11-18-2009, 01:14 AM
I know that solid but when you flatten out the animation and the joint doesn't move the cost of the calculation is very low, But since the socket is not in the animation hierarchy I was wondering was there any type of performance hit for it having to calculate the matrix offset from the joint it is attached to. What is the normal amount of sockets to a model, from reading I know epic suggests that there should be no more than 10 materials to a model and was wondering if anyone knew if there was that same suggestion guild line for the socket system.
badkangaroo
11-18-2009, 04:06 AM
Sockets are cheap, materials are expensive. Sockets are driven pretty easily by code, offsets and stuff are easy to get to without much work. To move a joint in code ,on the other hand, would require the animtree give you access through an anim node to a joint to move it through the script.
There's also a max joint limit of 255, not that most characters will have to worry about hitting that limit, but if you say added a bunch of joints just for attachment points for armor, those joints could better be replaced with sockets to save on bone count.
Solid Snake
11-18-2009, 05:03 AM
Skeletal Mesh deforming is performed on the vertex shader as far as I know. You can force it to use CPU skinning when other types of calculations are required (such as cloth), thus socket calculations are really, really cheap.
Ideally you don't want to use too many materials in any given scene. You can however use as many Material Instances as you like. The reason for this is because for each Material you use in a scene, the renderer has to switch to a new shader. Shifting between different pixel shaders can be expensive, where as with Material Instances you are just changing the constant parameters which exist within the shader.
I think that's right, but certainly somebody who knows the Unreal renderer better will probably correct the above information.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.