Quantcast
Channel: Questions in topic: "skinned mesh renderer"
Viewing all 192 articles
Browse latest View live

Skinned Mesh Renderer materials rendering problem for far moving object

$
0
0
Hi, I have a 3ds max model imported into Unity3d 3.3 Pro using the .fbx exported file. The model is skinned and has 2 materials. It has 1 animation. During import Unity creates a Skinned Mesh Renderer, 2 materials, the shaders are of type diffuse. Everything is fine. The problem: I put it in a scene moving following a spline, with a main camera looking at it (smooth look at script). The camera is in a fixed position and very far with a field of view of 4 (very small). At this point the model present the skin bleeding effect (the colour of the skin that should be hidden by the cloth is coming out instead creating a very noisy effect). I don't know what is wrong... I tried every sort of shader but when the model is near the camera this effect disappear... and the animation is perfect. I have no hardware problem: ATI 5870, 8 GB, AMD X6...

Texture Atlasing

$
0
0
I want to combine a bunch of textures into one material, then use that material for multiple gameobjects so they will batch. However, if I use material offsets to do this, it creates a copy of the material for each object, thus no batching. I noticed that imported meshes use a skinned mesh renderer, which looks like it uses Bounds to achieve the effect I'm looking for. However, I think you can only use that with imported objects. In other words, instead of having eyes, a nose, and a mouth all on one texture, I want 5 different 2d buildings. Edit: I thought that SetTextureOffset changed the UVs. Apparently I need to use the method suggested by The comments below. Thanks guys!

Skinned Mesh Renderer Importing as Mesh Renderer

$
0
0
I have an FBX file from maya that should have a mesh skinned to some bones but for some reason when I import it to unity I can see the bone structure but all the meshes are just mesh renderers and not skinned mesh renderers any idea what could be causing this?

Missing skinned mesh renderer

$
0
0
Hi all, I am currently facing a serious problem with Unity, every time I quit Unity (saving all pending changes in scenes and such) and reopen Unity, the meshes that belonged to the sub-objects in hierarchy of my prefabs have disappeared (skinned mesh renderer is removed). On OSX this only occurs during closing and reopening Unity, on Windows it happens more often (also in between playing). This happens in the editor (the prefabs don't even have a preview) aswel as in game-mode. This problem occurs on the prefabs we've created for custom characters, these characters have their own meshes and are fully animated (Maya 2012) and exported as FBX. The characters are prefabs and contain numerous scripts that are attached to the root of the prefab, the meshes are rendered on sub-objects in the prefab. Since we're facing this problem while we're in the editor I believe it can't be a problem with scripts, there aren't scripts that make changes to the renderer neither. The FBX files that belong to the prefabs are in place and the location of the files did never change. Also these files seem intact, since creating a gameobject out of them gives us a correctly loaded model. Currently the only solution to this problem opening an old backup of the project and moving all changed files over, which is a pain if you need to do this multiple times a day. Any help is appreciated, we seriously need to fix this issue (deadline coming up). Greets

Unity crash on iOS in SkinnedMeshRenderer deforms

$
0
0
Here's the stack trace from xcode: * 0 0x0085e1dc in MultiplyMatrixArrayWithBase4x4_NEON_loop () * 1 0x008e8eac in DeformSkinnedMesh (info=@0xd18f000) at /Applications/buildAgent/work/842f95682754852/Runtime/Filters/Mesh/MeshSkinning.cpp:1200 * 2 0x008cfc28 in SkinFunction (rawData=) at /Applications/buildAgent/work/842f95682754852/Runtime/Filters/Deformation/SkinnedMeshFilter.cpp:765 * 3 0x00988dc4 in JobScheduler::SubmitJob (this=, group=, f=, d=, returnCode=0x0) at /Applications/buildAgent/work/842f95682754852/Runtime/Threads/JobScheduler.cpp:185 * 4 0x008d0c0c in SkinnedMeshRenderer::UpdateAllSkinnedMeshesStep1 (updateClothingMeshes=4) at /Applications/buildAgent/work/842f95682754852/Runtime/Filters/Deformation/SkinnedMeshFilter.cpp:823 * 5 0x008d0c80 in SkinnedMeshRenderer::UpdateAllSkinnedMeshes () at /Applications/buildAgent/work/842f95682754852/Runtime/Filters/Deformation/SkinnedMeshFilter.cpp:773 * 6 0x00934ff4 in PlayerLoop (batchMode=false, performRendering=true) at /Applications/buildAgent/work/842f95682754852/Runtime/Misc/Player.cpp:1405 * 7 0x00830b8c in UnityPlayerLoop () at /Applications/buildAgent/work/842f95682754852/PlatformDependent/iPhonePlayer/LibEntryPoint.mm:456 * 8 0x00004538 in -[AppController Repaint] (self=0x1c1d660, _cmd=0xcc5a6b) at /Users/me/Build/Classes/AppController.mm:624 * 9 0x00004508 in -[AppController RepaintDisplayLink] (self=0x3a6465, _cmd=0x73756150) at /Users/me/Build/Classes/AppController.mm:615 Happens very randomly, could be coupled with running out of memory (this time no ApplicationDidGetMemoryWarning though)

Help using shaders with skinned mesh renderer

$
0
0
I have a shader which gives the impression of a texture dissolving away to reveal the background behind, and this all works perfectly with standard renderers, but when I apply this to a model with a skinned mesh renderer (i.e. an NPC), nothing happens Any ideas please?

Skinned cloth tut

$
0
0
I have recently discovered that unity3d does not support every animation from 3ds max. I had some cloth simulation on my character animations. Is there anyway to get unity3d to understand? If not could I get pointed to a tut for skinned cloth or perferably personal help. thanks, P.s. Is there any way I could turn 3ds max cloth simualtion into a normal animation?(yes a lot of questions.)

Problem with 3DS max export into unity

$
0
0
I have a mesh, and a rig system. In the rig system I have an animation which is baked to it. It works fine in 3Ds max and when imported to unity the animations etc work fine, however the pivot system of the model is far away from the mesh when it is in unity. Also the skin mesh renderrer for the model is at least 10 times bigger than the actual model. I am confused by this as I have set the co-ordinates of the root bone and the model to 0,0,0. However when I remove the bones from the model it becomes perfectly fine... does anyone know how to export the bone system correctly to unity?

Skin mesh renderrer is bigger than the model

$
0
0
I imported a model I made with a bone system and animation baked to it from 3DS max. However the bone system is on the 0,0,0 axis but the pivot for the model is not 0,0,0 in unity? How can I fix this? Also the skin mesh renderrer for the model is 10 times bigger than the model itsself, again how do I fix this? Help for this would be greatly appreciated. :)

activating skinned mesh renderer in children

$
0
0
Hi, I have a problem on activating skinned mesh renderer via script. In my script is a line which switches the mesh renderer and plays animation: secClickedObjectGC.gameObject.renderer.enabled = true; var getAnim : Animation = ClickedObjectGC.gameObject.GetComponent(Animation); if (getAnim){ getAnim.enabled = true; getAnim.animation.Play(); } it works fine for transform animations. But when it comes to bones and skinned mesh renderer, it fails. My hierarchy of objects I want to toggle looks like this: o emptyGameObject o Bone001 o rope 01 o Bone002 o rope 02 I draged a MeshRenderer on emptyGameObject and hoped, that when I turn on MeshRenderer, the skinnedMeshRenderer in rope01 and MeshRenderer in rope 01 will be enabled too, since thy are children of emptyGameObject. But this doesn't happen. Any advice?

I wonder where skinned mesh renderer attach

$
0
0
Hi I'm maya user and I made a character and create animation using Smooth Bind. And export fbx file with 1 mesh + joints when I import that in to unity3d. skinned mesh renderer component attached my object. but I wonder where skinned mesh renderer component attatched. some objects are attached at Root(bone) some objects are attached at Mesh why? I don't understand why they were attached difference place. help me please. thank you

Blender to Unity faulty Skinned Mesh Renderer.

$
0
0
I am creating assets for a cell phone game, and have characters that are made of individual meshes parented to armature joints in blender. I did this to avoid using skinned mesh renderer and use normal mesh renderers instead. Unfortunately, Unity disregards the hierarchy and applies a skinned mesh renderer to EACH mesh parented to a joint when I drag the file into Unity. This is the exact opposite of what I had intended. There are no armature modifiers or vertex weights in the .blend file. Any ideas on how to stop Unity from trying to rig my characters?

How to import clothes from blender?

$
0
0
So, I have a humanoid model from makehuman, imported into blender, animated and setup in unity in a prefab with scripts, hitboxes, weapons holders, etc. Everything works nicely. The only problem is that my character just has a pair of jeans from makehuman, so I'm trying to get him covered a bit more. In blender the jeans are just a child mesh of the main character, with armature and weights set. So I did some cloth all the same, when I import the blender file into unity everything works, I get my cloth as a gameobject with a skinned mesh renderer next to my main mesh and it deform with animation correctly. Now my problem is how do I get my cloth onto my character prefab? I tried to copy paste it and setup the different field correctly but the mesh just stop rendering when I enter the game mode and disappear forever. I tried to set it up from scratch but you can't add a skinned mesh renderer component it seems... How do people get their character dressed up? I don't get it.

Skinned Mesh Renderer not updating Mesh's Normals after bone translation

$
0
0
I'm at a complete lost with this one... I have a simple mesh (basically a flat plane) made in 3D Studio Max with no smoothing groups on it. I've added a skin modifier and have one bone object for every vertex in the Mesh. I'm really into the faceted hard edge look so I made sure to disable all smoothing groups. I'm planning on animating the bones procedurally inside Unity so baking the animation into vertices is not an option. Problem is when I import it into unity I get this: ![alt text][1] Remember the mesh is just a flat plane, I've moved the bones around raising them which causes the skin modifier to deform the mesh's geometry. It looks like in Unity all the smoothing groups are ignored and I get a ugly blob mess of a thing. I did all the usual troubleshooting. Made sure Normals are set to "Import" in the Unity inspector in fact I changed pretty much every setting I could find both in the Unity importer and FBX exporter with no luck. What I think is happening is that the normals are being imported from the Mesh and the translation of the Bones (which is causing the mesh's deformation) is not being factored into the Normal calculation. If I manually rotate the bones I can see some changes in the Mesh's normals but positions of bones doesn't have any effect on the surface shading. I found an old SkinnedMeshRenderer component setting which seems like it might help called "Skin Normals - If enabled, geometry normals will be updated with the bone animation." but this option has been removed in the later version of Unity. Anybody know how I can force this hard edge look when animating the positions of bones. I've attached the Max file if anyone feels inclined to mess around with it. Thanks [1]: /storage/temp/10357-maxandunity.jpg [2]: /storage/temp/10358-maxprojectfile.zip

Substract mesh from Skinned Mesh Renderer

$
0
0
Hi there Uniteers, I am in need of your help. In the process of optimizing our game performance, we have decided to look into combining all skinned mesh renderers into a single skinned mesh renderer containing all the other Skinned Mesh Renderer. By using the script provided by duhprey and modified by Marble on the Unity Community forum, I managed to combine all our skinned mesh renderers into one: [Forum post about combining skinned mesh renderers][1] But combining all Skinned Mesh Renderers into one arises a problem. When attempting to disable a single "Character" (such as, when an enemy has been slain), it is not possible to disable the renderer, because all the other meshes will also get disabled, because they are all attached to one single Skinned Mesh Renderer. So my big question is then: How can I disable a "Character" from a combined skinned mesh renderer? I have two ideas: 1: When combining the skin mesh renderer, I will leave a copy of the original skin mesh renderer on the GameObject (Of course disabled). Whenever the GameObject is destroyed, I'll take the copy of the original skin mesh renderer, extract the mesh data, and substract it from the main Skinned Mesh Renderer, but: - I don't know how to do this, and I can't seem to find enough information to assist me. Any tips and tricks on how to proceed with this? - During such mesh manipulation runtime, is that to heavy? 2: Another solution would be to simply just move the GameObject out of sight (Underneath the terrain) but: - This approach seems very dirty - Would eventually lead into problems. So, I am in doubt on how to proceed, and assistance would be appreciated. [1]: http://forum.unity3d.com/threads/123649-Script-to-combine-Animated-Mesh-and-Textures

Tinting individual SkinnedMeshRenderer using Vertex Colors?

$
0
0
I'm attempting to have a group of models that all have the same model and material, however some of them are tinted programmatically using vertex colors. I have done this before, when the objects had MeshFilters, however SkinnedMeshRenderers use a sharedmesh, thus modifying the vertex colors of one changes them all. Is there any way for me to do this with SkinnedMeshRenderers? Or is there some way to use MeshFilters in place of them so that I can get access to individual meshes?

Composite/Combine skinned meshes

$
0
0
Hi all. I need to make two (or more) skeletal meshes share the same skeleton. The reason is that my character has separate meshes for different parts of his body (for customizability), and I want the two to share the same skeleton and animations (similar to UDK's SkeletalMesh.AnimationParent). I tried setting the root bone property in the skinned mesh renderer's properties, but this affect the root bone ONLY, so the models have no animations whatsoever. Does anyone know how to do this? Thanks in advance.

Post deform subsurfing

$
0
0
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.

Dress Problem

$
0
0
Hi guys, Problems like in the picture and video. How would you suggest a solution? How can we solve with the code? What's the logic? [>>> Video (YouTube) <<<][1] ![alt text][2] ![alt text][3] ![alt text][4] [1]: http://youtu.be/BInFZOYDqFk [2]: http://i.hizliresim.com/KZkX3g.png [3]: http://i.hizliresim.com/K6PaNE.png [4]: http://i.hizliresim.com/wLAlla.png

Changing particles in particle system from local space of skinned character mesh to world space (unattached)

$
0
0
Hi, First off I'm still new to Unity, C# and Javascript - come from a Python/C++/Maya Scripting background. Not sure if this should be in the forum instead, but anyway. I'm currently working on a project in which I need to have particles attached to the vertices of a skinned (animated) mesh when they are created, but then they need to be in world space for every frame after that (end result will be sort of a ghosting effect!) I currently have it so that the mesh for the skinned character controller is being baked out each frame, its vertices are put into an array and these positions are passed to particles in a particle system (which is attached in the same place as the script but has been made inert), which is set every frame. So the particles follow the animated mesh around fine (there's a tiny bit of lag but I don't mind that for now). The only problem is the script is a component under the Bip001 Pelvis part of the default 3rd Person Controller, firstly so it can access the Skinned Mesh Renderer (needed for baking the mesh each frame) and secondly so it actually follows the position and orientation of the character animation. I tried putting the script into its own empty GameObject and accessing the necessary objects and components from there but it only introduced more problems! Is there any easy way to make particles that are instanced from a script parented under the character stop following it after they are spawned, essentially?? I know this is a fairly complex/confusing setup but any advice would be great. (Sorry for the crude image too! - and ignore the other Emitter, that was for testing) ![alt text][1] My other issue is that I think the particles are ignoring my assignment of attributes such as the size and instead go by the inert Particle System, when I both create them and update them based on the changing mesh - no idea why this is. Do the attributes for the Particle System Component in the Inspector take precedence over scripts? private void CreatePoints (Vector3[] verts, ParticleSystem.Particle[] points) { for (int i = 0; i < resolution; i++) { points[i].position = verts[i]; points[i].color = new Color(1f, 1f, 1f); points[i].size = 100f; points[i].lifetime = 1; } } public void SetPoints (Vector3[] verts, ParticleSystem.Particle[] points) { Debug.Log("Length of verts array"); Debug.Log(verts.Length); for (int ii = 0; ii < resolution; ii++) { points[ii].position = verts[ii]; points[ii].color = new Color(1f, 1f, 1f); points[ii].size = 1f; points[ii].lifetime = 1; } } [1]: /storage/temp/22812-helpunity.png
Viewing all 192 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>