x


Fading the Material/Shader on Skinned Mesh Renderer

The following code is an attempt to 'fade' the material on a 3D Model FBX Import:

private void Start() {

    GameObject.Find("Bip01_Pelvis").renderer.material.shader = 
    Shader.Find("Bumped Diffuse");
    //Find the material in the Character hierarchy and set its alpha
    GameObject.Find("Bip01_Pelvis").renderer.material.SetColor(_"Color", 
    new Color(0,0,0, GameObject.Find("Bip01_Pelvis").renderer.material.a-0.75f));
}

The material on the model 'looks funny' when it is set to a Transparent/Cutout/Bumped Diffuse"); but not when it is just a Bumped Diffuse. How can I enabled/disable fading out the character models material? Do I need to create Shader and write OpenGL/DirectX API code to control fading a character material?

more ▼

asked Apr 22 '11 at 06:18 AM

lampshade gravatar image

lampshade
391 84 92 109

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x271
x269
x189

asked: Apr 22 '11 at 06:18 AM

Seen: 1352 times

Last Updated: Apr 22 '11 at 06:18 AM