Change font size
It is currently Sat Aug 24, 2019 7:55 pm

Forum rules


{L_IMAGE}

Discuss and Display your Mesh Builds and projects, post tutorials and links to examples. Blender - Maya - 3D Studio - ZBrush - Sculptris and many other tools and scripts related to modeling!



Post a new topicPost a reply Page 1 of 1   [ 1 post ]
Author Message
 Post subject: How to make a MakeHuman avatar blink
PostPosted: Wed Feb 06, 2013 8:19 am 
How to make a MakeHuman avatar blink and not look like an alien possessed it!

I produced 2 versions of the avatar in Make Human after setting the height to 1.67m average female height. First one was the 'Body' and the second 'Eyes closed' made using the Posing menu and expressions.
The Body was exported as a Dae file clicking both X and Y 90° turn options, Meters, and SL Rig. Then imported using skin weights clicked in upload options. I dragged the avatar texture saved as a Jpg onto the Body model inworld whilst rezzed on ground and took back into inventory.
The second mesh with closed eyes was opened up in a 3D editing package and everything deleted except for the area just around the eye nose and brow area. The inside of the mesh was cleaned out of all excess and overlapping polys, eyeballs etc because I was going to apply a graduated alpha texture to it. I then imported inworld as a standard mesh.
Then I took a copy of the avatar texture into Photoshop and graduated to alpha the area surrounding the eyes. and applied it to the eye mesh inworld.
The Body was then worn (left hand) and the eyes attached to the left ear and positioned as closely as possible over the eyes.
I then dragged the scripts below into the eyes..and in a blink of an eye...I was no longer a mesh avatar zombie.

Adelle Fitzgerald kindly wrote some code to give an efficent blink for Opensim.
Script 1
{L_CODE}:
//Random Blinker slave script by Adelle Fitzgerald. There is no license or support with this, so do as you please with it :-)

default
{
    state_entry()
    {
    }
   
    link_message(integer sender_num, integer num, string message, key id)
    {
        if (message == "closed")
        {
            llSetAlpha(0, ALL_SIDES);
        }
    }
}


Script 2
{L_CODE}:
//Random Blinker main script by Adelle Fitzgerald. There is no license or support with this, so do as you please with it :-)

float randomTime = 6.0; //The random time that the eyelids will shut.
float minimumTime = 0.0; //The minimum time between blinks
float closedTime = 0.10; //This is the duration the eyelids will stay shut


default
{
    state_entry()
    {
        llSetTimerEvent(llFrand(randomTime));
    }
   
    timer()
    {
        llSetAlpha(1, ALL_SIDES);
        llSleep(closedTime);
        llMessageLinked(LINK_ROOT, 0, "closed", NULL_KEY);
        float nextBlink = llFrand(randomTime) + minimumTime;
        //llSay(0,(string)nextBlink);
        llSetTimerEvent(nextBlink);
    }
}


Top
  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 1 post ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net