I'm trying to create a physics based rope. I've got joints in a parented hierarchy. Each joint has box collider, rigidbody and hingejoint components. They follow themselves as expected. However the skinned mesh refuses to follow them. It seems that it only follows the root joint and ignores the rest.
http://i.imgur.com/6bxQabR.png
Here's my skinned mesh renderer settings, there really isn't that many settings to play around with.
http://i.imgur.com/CHJYCwv.png
What am I missing? Why does my mesh not react to all the joints? The mesh has the same amount of segments as there are joints. The segments are located between the colliders, where the joints are.
↧
Creating a rope using skinned mesh renderer
↧
How unity order Skinned mesh renderer bones?
Does anyone know it?
It seems that skinned mesh renderer bones order is different from transfrom in hierarchy.
↧
↧
Mesh Collider
I have a skinned mesh renderer in my scene which have cloth component attach with it, I found there is only two option sphere collider and capsule collider, I have a mesh and I want to collide with that mesh, how i can do that?
↧
Single skinned mesh renderer with Animation component?
https://docs.unity3d.com/550/Documentation/Manual/ModelingOptimizedCharacters.html
"Use a single skinned Mesh Renderer
You should use only a single skinned Mesh Renderer for each character. Unity optimizes animation using visibility culling and bounding volume updates and these optimizations are only activated if you use one **Animation component** and one skinned Mesh Renderer in conjunction. The rendering time for a model could roughly double as a result of using two skinned meshes in place of a single mesh and there is seldom any practical advantage in using multiple meshes."
1. This mentions "Animation component", which is legacy. **Does this statement still apply for the newer Animator component?**
2. I have a hair shader which requires another UV coordinate, it could be appealing to separate the hair mesh from the body to save some vertex data in the body. **Still combining the hair and the body will be more efficient?**
Thanks!
↧
How to add a new skinned mesh to seleton
I need to add cape to horse. But unfortunately I could not find the instructions for this in the documentation.
Cape already skinned to horse skeleton.
I place horse on scene, add cape to the root of horse object (not bone), so mantle and horse located on same places in hierarchy, on cape in skinned mesh renderer component I set as root bone the root bone of horse skeleton. But horse skeleton does not affect on cape.
And cape skeleton (*it saved by default from 3ds max, i also tryed to import just mesh whis skin without skeleton, that i deleted from exported file*) continues to affect the cape.
By the way. Does I need save skeleton on cape when i exporting it from 3d editor?
Sorry for my english.
↧
↧
Find world position of a vertice on a skinned mesh renderer
How do I get the position of one of the vertices in a skinned mesh renderer, that factors in the meshes current shape and location?
I want to have a human skinned mesh that when she is hit by a small object, it sticks to her at the exact closest vertices
I have all the other coding figured out, but I need to know how to get a vertices location and how to interpret it's world space location from that.
Thanks all!
↧
BuildAvatar from new rigged mesh
Hi, I have two rigged objects on my scene but I only have avatar on one of them. Then, what I do to anymate the second object (the one without avatar) is to try to put the first object's avatar into it. The problem is, if I do so, the second object gets automatically scaled when animating because of the avatar.
Then, I decided to create a new avatar from scratch with unity, for the second avatar but I can't understand how to do it.
I did something like that:
for (int i = 0; i < bones.Length; i++) { scanDescription.human[i] = new HumanBone(); scanDescription.human[i].boneName = bones[i].name; scanDescription.human[i].humanName = bones[i].name;
scanDescription.skeleton[i] = new SkeletonBone();
scanDescription.skeleton[i].name = bones[i].name;
scanDescription.skeleton[i].position = bones[i].position;
scanDescription.skeleton[i].rotation = bones[i].rotation;
scanDescription.skeleton[i].scale = bones[i].localScale;
}
where bones is the Transform[] with the positions of the bones of the rigged objects, but this is not working. The thing is, I only have those transforms but I don't know what to put on every skeleton and what to put on every human name, bone name and so on. The avatar must be humanoid (the existing avatar is set to humanoid)
The second question is, on the imported model with existing avatar, I can use the "configure" tab to see the mapping of the bones but I cannot do the same with the new created avatar
↧
Is it possible to emit particles from an animated mesh WITH an offset ?
Hello,
I'm trying to create a speed effect around my character while sprinting. To do this, I'm using a Particle System which emits particles with trails from the skinned mesh.
However, some of my particles are emitted in the direction taken by my character, which causes a kind of glitch especially when I'm using a material without alpha.
![alt text][1]
Do you know if it's possible to apply an offset to the emission of particles in a specific axis from a mesh to avoid these glitches ?
Thanks !
[1]: /storage/temp/85685-particles-from-mesh-bug-offset.png
↧
Post deform subsurfing
Lately, I've been having a lot of performance issues with skinned meshes. In the game that I'm currently working on, a character with about 2K polys being deformed seems to cost me a lot of frames. With three characters at that level on screen, I'm dropping to 30fps, which is playable, until you consider the fact that there's nothing else in the map at the time.
One idea that I just got is to subdivide the mesh in after the skinned renderer deforms it, allowing for me to perform solid animations while maintaining quality character models.
I'm not asking anyone to provide me a script for this, I'm simply asking if this is theoretically possible(at least, in the way I describe) and if it'd give me any significant performance increase.
↧
↧
Mesh.colors is out of bounds
When I click on "Edit Constraints" in the cloth properties nothing happens but when I select the Object it tells me:
Mesh.colors is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
UnityEditor.ClothInspector:OnEnable()
IndexOutOfRangeException: Array index is out of range.
UnityEditor.ClothInspector.SetupSelectedMeshColors () (at C:/buildslave/unity/build/Editor/Mono/Inspector/ClothInspector.cs:356)
UnityEditor.ClothInspector.OnEnable () (at C:/buildslave/unity/build/Editor/Mono/Inspector/ClothInspector.cs:266)
This happens even with the standard Quat as Mesh in the Skinned Mesh Renderer properties.
Thank you!
↧
Mesh filter and mesh renderer. Why 2 components?
Hi. I am quite experienced with Unity and this question didn't pop into my head until now. I notice that there are 2 components for rendering a mesh which need each other to render, mesh filter and mesh renderer. Why didn't unity just include the mesh data in the mesh renderer itself? (Like in the case of skinned mesh renderer). Does it have some special purpose that I am not aware of or was it a bad design decision taken in the early days?
↧
How do I create multiple enemy appearances without lots of prefabs?
I would like to create multiple looks for enemies (zombies) so they don't all look the same.
Each model is created in Blender and is rigged using Mixamo which creates the rig as a separate object.
Is there a way to have multiple looks for the enemy without having lots of prefabs?
↧
What makes Mesh Renderers turn off during play Mode
Ran my game in editor to test and when it gets to point where it substantiates the player prefab it wasn't there. Took me a while to figure out that the skinned mesh renderers where all unchecked for each part of player prefab ( because it was substantiated only existed in game). I never turned them off. So I pulled the prefab into my scene turned all the mesh renderers on again then hit apply. All was well and I ran it a few more times since then but then suddenly it happened again . this time I deleted the prefab and made a new one .Again fine for a few times then it just did it again. Am I missing something?
oh and just realized this last time the renderers where off in play mode but not on prefab when I just went to fix again.
↧
↧
Skinned Mesh does not show its mesh sometime when game starts. I have made it to Ragdoll.
The problem is Skinned mesh does not show in gameplay sometimes and sometime it shows.
I have made the enemy model a ragdoll and when enemies spawn in front of me. i can't see the mesh but detect the enemies by its collider.
I have tried to expand the bounds also checked the update when offscreen. but no results.
i can get the right results when i detach ragdoll. but its not a solution for me.
kindly guide me about this problem.
Thanks
↧
Procedurally Creating Bones at Runtime
I'm working on a scripted model of a plant growing (with a wide range of input variables to change the shape that is actually grow) and while I've got it working for a static non-physics environment, I really want to have the branches, flowers, leaves, affected by gravity, pulling on a branch will bend the entire plant, etc... I first was trying to do this with lots of ConfigurableJoints, but it is rapidly turning into a headache. My more recent thought is to grow the entire plant as a Skinned Mesh with bones instead of graphically drawn branches connected by Joints. But, I'm coming up empty on resources for creating bones at runtime. The plant does start with a seed, and then a single tap root and a single stem out of the seed that starts to branch, so the solution will need to create and attach the bones needed in runtime.
I can do a subset of small basic un-meshed prefabs with bones in theory, but if i can do it all with script i'd prefer that.
The lack of documentation/discussion about this suggests that it isn't viable?
↧
Skinned Mesh mask for character clothing clip in
I am using skinned mesh renderer to create equippable clothing for characters.
It works but there's a ton of clip in between the base character mesh and the clothing.
Is there some kind of layer mask or something I can use to prevent this effect?
Thanks for the answers
![alt text][1]
[1]: /storage/temp/89868-compressedimg.png
↧
Unity auto unassigned skinned mesh render variables on Play
Hi, I have a variable "skinnedMeshRenderer", and I clicked the circle on this variable in the inspector of the object with the script,. When ever I click the play button the skinned mesh renderer from the slot just switches to none and unassigns itself, I can reassign them (still in play mode) and then they stay but only for that session. When I stop the game and then click play again (to reset the scene) they unassign again. For right now it isn't a big deal, just a little annoying, but whenever I build the game this issue will be unfixable. Please let me know how to fix this, or if there is a line of code similar to GameObject.Find, I already tried and looked for SkinnedMeshRenderer.Find("");, but that doesn't work, thanks.
↧
↧
Change material in runtime
Okey, so I've been on this problem for ages now.
I'm trying to change a material on my character in runtime, while playing.
But everytime I change it by script, the 'starting material' that was originaly on the **GameObject**, get's **instanced** and it won't change to the new one I'm trying to put on it (see picture below).
I have to use **.materials** since it's **Element 1** I want to change, and not **Element 0**, since using **.material** only changes **Element 0**.
I've tried to use '**sharedMaterials[1]**' as well, nothing that helped.
public Material[] astronautMat;
public SkinnedMeshRenderer astronautRend;
void Start ()
{
astronautRend = GameObject.FindWithTag ("Astronaut").GetComponent();
}
void Update ()
{
AstronautMat ();
}
void AstronautMat()
{
if (Input.GetKeyDown (KeyCode.Keypad1))
{
astronautRend.materials[1] = astronautMat [0];
}
if (Input.GetKeyDown (KeyCode.Keypad2))
{
astronautRend.materials[1] = astronautMat [1];
}
}
![alt text][1]
[1]: /storage/temp/92731-renderer.jpg
↧
Ragdoll not 'applying' to skinned mesh?
I can't seem to actually get the ragdoll to 'apply' to the skinned mesh renderer.
If i turn off / disable the animator component after hitting play, so mecanim loses any 'control'; at that point i can see the colliders for the ragdoll flop down in the scene view. But the meshes themselves don't conform to the bones transforms anymore..
They aren't being deformed it seems and the whole model just stays stiff rigid.
I say meshes because, I've exported my model from blender with a few different objects for various body parts, so there are actually a few 'skinned mesh renderers'.
Thanks if anyone can point me in the right direction!
--
To give some clarification, i have now tried combining all the mesh objects so i only have one skinned mesh renderer.
It still doesn't fix my problem, when i disable the animator the mesh stays at its last position and the colliders can be seen reacting/falling appropriately sort-of "disconnected" from the mesh.
↧
New material only covering the same area as the previous one
Hi,
so I'm trying to add a simple outline over the whole model but it covers instead only the area that the previous material did. Example(pictures added because I'm really bad at explaining) : So I have this skinned mesh renderer(automatically generated after importing from .blender) with those values under "Materials" ![3 materials with the last one named black][1] When I increase the "Size" to 4 and add my outline material to the fourth field ![4 elements with the last one named outer][2] the "outer" material covers only the area that the "black" material covered.
I'm thinking that this is probably not the way I should add materials ... how can I set it to cover the whole model? Thanks in advance
EDIT:
Ok now I realize my fault ... instead of applying the outline shader directly to a material (eg "black") I created a new empty material -> applied the shader on it -> tried to add new material without the need to. I'm still kinda curious though, can I add two materials in one mesh? and how do I specify the mesh? [1]: http://i.imgur.com/SZMwPWA.png [2]: http://i.imgur.com/JPj0fB1.png
so I'm trying to add a simple outline over the whole model but it covers instead only the area that the previous material did. Example(pictures added because I'm really bad at explaining) : So I have this skinned mesh renderer(automatically generated after importing from .blender) with those values under "Materials" ![3 materials with the last one named black][1] When I increase the "Size" to 4 and add my outline material to the fourth field ![4 elements with the last one named outer][2] the "outer" material covers only the area that the "black" material covered.
I'm thinking that this is probably not the way I should add materials ... how can I set it to cover the whole model? Thanks in advance
EDIT:
Ok now I realize my fault ... instead of applying the outline shader directly to a material (eg "black") I created a new empty material -> applied the shader on it -> tried to add new material without the need to. I'm still kinda curious though, can I add two materials in one mesh? and how do I specify the mesh? [1]: http://i.imgur.com/SZMwPWA.png [2]: http://i.imgur.com/JPj0fB1.png
↧