Join us in Outworldz at www.outworldz.com:9000 or follow us:

How to make the Gap Dragon - a Free Mesh Avatar for Second Life and Opensim



This a free mesh avatar that is part of a series on how to make mesh avatars..

gap Dragon 

You can make this ferocious Gap Dragon avatar in a just few minutes. The Gap Dragon protects the Gap Chasm that divides the land of Xanth from intruders.

Features:

100% Mesh avatar
Flapping and folding wings
Eyes that follow your camera
Flexible neck and legs
Smoking effects

Get the Files

You will need to download and unnzip the files in this zip file.

The first file you will need is the the file "Gap Dragon half-sized.dae". Navigate to Build->Upload->Mesh Model.

( I am using V3 for this lesson, so your screens may be different.)

File Upload Mesh

 

Select the file "Gap Dragon - Half-Sized.dae" and click Open.

CLick Open

Give the model a name such as "Gap Dragon", and select the pulldown for "Avatar Shape" on the Level of Detail screen.

Gap Dragon Level of Detail

Select "Lowest" on the Physics Screen:

Lowest

Set the size to about 0.25 so it will not be too big ( the size of the final dragon cannot be changed here), and be sure that you check the two boxes for "Include Avatar Weight" and "Include Joint Positions".

Set Scale and Avatar options

Click Calculate, and then click Upload.

Rez the Dragon Body:

You can go ahead and rez the dragon body.  It should look like this:

Dragon Body Naked

Upload the Accessories

You will need to upload a DAE file with the extra parts you will need.

 Navigate to Build->Upload->Mesh Model.

File Upload Mesh

Select the Parts.dae file:

Parts

Click Open and then give these bits a name such as "Dragon Parts" on the Level of Detail tab.   Select the "Smaller, non-moving" tab, too

Dragin Parts Level of Detail

Navigate to the Physics tab and select "Lowest" :

Lowest Physics Tab

The Upload tab has no options selected.

Upload Optioons Tab

Now click "Calculate weights and fees", and then click Upload

Rez the parts:

Drag the parts out onto the ground next to your dragon for coloring:

Parts rezzed

 Also select all these parts and press Ctrl-Shift-L to unlink them.   They are worn individually.

Textures:

There are several choices of textures you can use for your new Dragon avatar:

Eyes:   Color the eye either with this black or this white eye texture:

EyeEye

Eyey textire

Body Texture:

There are several possible body textures. Choose from one of these images and apply it to the mouth piece and the body of the dragon.

Dry Brushed

Dry Brush

Slimy:

Slimy

Spongy

Spongy

I chose sponge for my Dragon:

Texture applied to all parts except wings

Go ahead and apply the texture to the jaw.

Now add this one to the bones:

bone

Wings

Upload and apply this wing texture to the wings:

Dragon Wing

You will have to apply it to all 4 wing parts:

Wing parts

 

Name these two parts as follows:

"Dragon Bones" for the back bones

Dragon Bones

Dragon Jaw for the jawbone

Dragon Jaw

 

Add this script to the Jaw:


// Particle Script 0.5
// Created by Ama Omega, mods by Ferd Frederix


integer on = FALSE;

integer keystate = 0 ;

// Mask Flags - set to TRUE to enable
integer glow = FALSE;            // Make the particles glow
integer bounce = FALSE;          // Make particles bounce on Z plane of object
integer interpColor = TRUE;     // Go from start to end color
integer interpSize = TRUE;      // Go from start to end size
integer wind = TRUE;           // Particles effected by wind
integer followSource = FALSE;    // Particles follow the source
integer followVel = FALSE;       // Particles turn to velocity direction

// Choose a pattern from the following:
// PSYS_SRC_PATTERN_EXPLODE
// PSYS_SRC_PATTERN_DROP
// PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
// PSYS_SRC_PATTERN_ANGLE_CONE
// PSYS_SRC_PATTERN_ANGLE
integer pattern = PSYS_SRC_PATTERN_EXPLODE;

// Select a target for particles to go towards
// "" for no target, "owner" will follow object owner 
//    and "self" will target this object
//    or put the key of an object for particles to go to
key target = "";

// Particle paramaters
float age = 2.5;                  // Life of each particle
float maxSpeed = 1;            // Max speed each particle is spit out at
float minSpeed = 0.8;            // Min speed each particle is spit out at
string texture = "4f714019-c1cf-6b16-994f-44b217022f1a";                 // Texture used for particles, default used if blank
float startAlpha = 0.8;           // Start alpha (transparency) value
float endAlpha = 0.0;           // End alpha (transparency) value
vector startColor = <0.5,0.5,0.5>;    // Start color of particles 
vector endColor = <0,0,0>;      // End color of particles  (if interpColor == TRUE)
vector startSize = <0.01,0.01,0.0>;     // Start size of particles 
vector endSize = <2.0,2.0,0.0>;       // End size of particles (if interpSize == TRUE)
vector push = <.2,0,3>;          // Force pushed on particles

// System paramaters
float rate = 0.4;            // How fast (rate) to emit particles
float radius = 0.0;          // Radius to emit particles for BURST pattern
integer count = 15;        // How many particles to emit per BURST 
float outerAngle = 0;    // Outer angle for all ANGLE patterns
float innerAngle = 0.1;    // Inner angle for all ANGLE patterns
vector omega = <0,0,0>;    // Rotation of ANGLE patterns around the source
float life = 0;             // Life in seconds for the system to make particles


integer flags;
list sys;
integer type;
vector tempVector;
rotation tempRot;
string tempString;
integer i;


updateParticles()
{
    flags = 0;
    if (target == "owner") target = llGetOwner();
    if (target == "self") target = llGetKey();
    if (glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
    if (bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
    if (interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
    if (interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
    if (wind) flags = flags | PSYS_PART_WIND_MASK;
    if (followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
    if (followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
    if (target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
    sys = [  PSYS_PART_MAX_AGE,age,
                        PSYS_PART_FLAGS,flags,
                        PSYS_PART_START_COLOR, startColor,
                        PSYS_PART_END_COLOR, endColor,
                        PSYS_PART_START_SCALE,startSize,
                        PSYS_PART_END_SCALE,endSize, 
                        PSYS_SRC_PATTERN, pattern,
                        PSYS_SRC_BURST_RATE,rate,
                        PSYS_SRC_ACCEL, push,
                        PSYS_SRC_BURST_PART_COUNT,count,
                        PSYS_SRC_BURST_RADIUS,radius,
                        PSYS_SRC_BURST_SPEED_MIN,minSpeed,
                        PSYS_SRC_BURST_SPEED_MAX,maxSpeed,
                        PSYS_SRC_TARGET_KEY,target,
                        PSYS_SRC_INNERANGLE,innerAngle, 
                        PSYS_SRC_OUTERANGLE,outerAngle,
                        PSYS_SRC_OMEGA, omega,
                        PSYS_SRC_MAX_AGE, life,
                        PSYS_SRC_TEXTURE, texture,
                        PSYS_PART_START_ALPHA, startAlpha,
                        PSYS_PART_END_ALPHA, endAlpha
                            ];
                            
    llParticleSystem(sys);
}

    
    

default
{
    state_entry()
    {
        //updateParticles();
        keystate = 0 ;
        //target = llGetLinkKey(2) ;
        
        llSetTimerEvent(5);
    }
    timer()
    {
        on = ~ on;
        if (on) {
            llParticleSystem([]) ;
            llSetTimerEvent(llFrand(10));
        }
        else {
            updateParticles() ;
            llSetTimerEvent(1);
        }
    }
    
}

 

Take the Jaw and Bones into inventory

Dragon Wings

Rez a box in the middle of the wings.  Position it so that the arrows line up as shown in the following picture.

Size the box so that all three sides are 0.23111 meters across:

Size the box

  Edit the box, then select the wing pieces in the following order. Be sure you click the box last!

All 5 prims

Press Ctrl + L to link these pieces together.

Name these parts "Dragon Wing".   When you are done with this step, Edit the wings, select "Edit Linked Parts", click the box, and set the box to 100% Transparent:

Dragon box is now invisible

Upload the following script and put it inside the box.

// Prim animation compiler //
// Ferd Frederix - http://www.outworldz.com
integer playbackchannel = 1; // The default llMessageLinked number
rotation calcChildRot(rotation rdeltaRot){
    if (llGetAttached())
        return rdeltaRot/llGetLocalRot();
    else
        return rdeltaRot/llGetRootRotation();
}
vector originalScale = <0.23311, 0.23311, 0.23311>;
reset(){
    vector currentSize = llGetScale();
    float scaleby = currentSize.x/originalScale.x;

    llSetLinkPrimitiveParamsFast(2, [PRIM_POSITION, <1.24890, 0.12580, 0.26959>*scaleby, PRIM_ROTATION,calcChildRot(<0.70711, 0.00000, 0.00000, 0.70711>), PRIM_SIZE, <2.37876, 0.64461, 0.64669>*scaleby]);
    llSetLinkPrimitiveParamsFast(3, [PRIM_POSITION, <0.38292, 0.27490, 0.15295>*scaleby, PRIM_ROTATION,calcChildRot(<0.70711, 0.00000, 0.00000, 0.70711>), PRIM_SIZE, <0.64141, 0.33260, 0.77099>*scaleby]);
    llSetLinkPrimitiveParamsFast(4, [PRIM_POSITION, <-1.07050, 0.12580, 0.26959>*scaleby, PRIM_ROTATION,calcChildRot(<0.70711, 0.00000, 0.00000, 0.70711>), PRIM_SIZE, <2.14849, 0.64461, 0.64669>*scaleby]);
    llSetLinkPrimitiveParamsFast(5, [PRIM_POSITION, <-0.31290, 0.27490, 0.15479>*scaleby, PRIM_ROTATION,calcChildRot(<0.70711, 0.00000, 0.00000, 0.70711>), PRIM_SIZE, <0.64141, 0.33260, 0.77099>*scaleby]);
}
up(){
    vector currentSize = llGetScale();
    float scaleby = currentSize.x/originalScale.x;

    llSetLinkPrimitiveParamsFast(2, [PRIM_POSITION, <0.91235, 0.12580, 0.68341>*scaleby, PRIM_ROTATION,calcChildRot(<0.68458, -0.17705, 0.17704, 0.68458>), PRIM_SIZE, <2.37876, 0.64461, 0.64669>*scaleby]);
    llSetLinkPrimitiveParamsFast(3, [PRIM_POSITION, <0.38293, 0.27490, 0.15295>*scaleby, PRIM_ROTATION,calcChildRot(<0.70711, 0.00000, 0.00000, 0.70711>), PRIM_SIZE, <0.64141, 0.33260, 0.77099>*scaleby]);
    llSetLinkPrimitiveParamsFast(4, [PRIM_POSITION, <-0.90179, 0.12580, 0.73767>*scaleby, PRIM_ROTATION,calcChildRot(<0.68757, 0.16507, -0.16507, 0.68757>), PRIM_SIZE, <2.14849, 0.64461, 0.64669>*scaleby]);
    llSetLinkPrimitiveParamsFast(5, [PRIM_POSITION, <-0.31290, 0.27490, 0.15479>*scaleby, PRIM_ROTATION,calcChildRot(<0.70711, 0.00000, 0.00000, 0.70711>), PRIM_SIZE, <0.64141, 0.33260, 0.77099>*scaleby]);
}
down(){
    vector currentSize = llGetScale();
    float scaleby = currentSize.x/originalScale.x;

    llSetLinkPrimitiveParamsFast(2, [PRIM_POSITION, <1.16006, 0.12579, -0.54773>*scaleby, PRIM_ROTATION,calcChildRot(<0.66233, 0.24763, -0.24763, 0.66233>), PRIM_SIZE, <2.37876, 0.64461, 0.64669>*scaleby]);
    llSetLinkPrimitiveParamsFast(4, [PRIM_POSITION, <-1.07050, 0.12579, -0.52026>*scaleby, PRIM_ROTATION,calcChildRot(<0.65562, -0.26489, 0.26489, 0.65562>), PRIM_SIZE, <2.14849, 0.64461, 0.64669>*scaleby]);
    llSetLinkPrimitiveParamsFast(5, [PRIM_POSITION, <-0.31290, 0.27490, 0.15479>*scaleby, PRIM_ROTATION,calcChildRot(<0.70711, 0.00000, 0.00000, 0.70711>), PRIM_SIZE, <0.64141, 0.33260, 0.77099>*scaleby]);

}

integer fly;

default{

    state_entry(){
        llSetMemoryLimit(llGetUsedMemory() + 512);
        llSetTimerEvent(0.5);
    }

    timer()
    {
        
        if (llGetAgentInfo(llGetOwner()) & AGENT_IN_AIR)
        {
            llMessageLinked(LINK_SET,1,"fly","");
            fly = TRUE;
            up();
            llSleep(0.1);
            reset();        
            llSleep(0.1);
            down();
            llSleep(0.1);
            reset();        
        }
        else
        {
            if (fly)
            {
                llMessageLinked(LINK_SET,1,"land","");
                fly = FALSE;
            }
            
        }             
    }
}
    

Lower Wing script

Add this script to both of the lower wings
default
{
    state_entry()
    {
        llSay(0, "Lower Wing");
    }

    link_message(integer n, integer num, string msg, key id)
    {
        if ( msg== "fly")
            llSetAlpha(1.00,ALL_SIDES);
        else
            llSetAlpha(0,ALL_SIDES);
    }
    
}

Upper Wing Script

Add this script to each of the upper wings:

default
{
    state_entry()
    {
        llSay(0, "Upper Wing Script!");
    }

    link_message(integer n, integer num, string msg, key id)
    {
        if ( msg== "fly")
            llSetAlpha(0,ALL_SIDES);
        else
            llSetAlpha(1.0,ALL_SIDES);
    }
    
}

Now fly your avatar up in the air. The wing should start flapping. When you land, it will stop flapping.

Now you can take the wing into inventory.

Wear your avatar and adjustments

Right click the Gap Dragon that you saved in inventory, and attach it to any body part.   If you select the default of "wear", it will attach to the right hand.  Not a good idea, as just about everything attaches there by default and you will suddenly be a naked, body-less avatar when it inevitably happens.  So pick an attachment point unlikely to be used.

Don't use  any of these:

Right Hand
Spine
Mouth
Pelvis

This is what I looked like, as I still had on my clothing:

me as a dragon lol

So now is a good time take off all your clothes and prim attachments.

Create an Alpha Layer

Go to "Me"->Appearance so we can get rid of our old body with an Alpha Layer

Edit appearance

Click the little gear at the bottom of the Edit Appearance windo and select New->Alpha Layer.

ALpha Layers (New)

A new window  will open:

Alpha Layers (unchecked)

Click all the check boxes to enable all alpha layers and then click "Save As". Give it a name such as "Gap Dragon Alpha" and save it.

Save Alpha

Wear the jaw:

Right-click and attach the jaw to your Mouth. Reach inside your mouth and pull the jaw down and position and size it to fit.

It helps to sit on a pose stand to set this jaw intoplace.

Jaw

Attach the Wings to your Spine and position them into place above your arms. Ignore the smoke lol

Spine and wings

Now attach the spikes to the  same spine location and adjust them to fit along the back:

Spikes opn Spine

Hop off your Pose stand and fly off!  Your wings should unfurl, the eyes and neck track your camera movements and the mouth should smoke up every ten seconds.

 

 

Good Roaring!

Back to the Best Free Tools in Second Life and OpenSim.