Jump to content

Looking to hire a scripter.


You are about to reply to a thread that has been inactive for 68 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Posted (edited)

 

I made a basic 2 prim black and white eye for testing purposes.

basically it over rotates. maybe there is some script like:

current position = rotation - 20%

 

also when the head moves it throws off the eye rotation angle. maybe there is something like this:

current position = rotation - head angle

so that if the head is at 0,0,0 the eyes are at 0,0,0. but when the head is at 45,0,0 the eyes are at -45,0,0

 

 

Edited by Tinkarbell
Link to post
Share on other sites
  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

We need controllable IK's via script so bad...

One problem is the dark baked shadowing onto the eyeballs that becomes visible when rotated even within physical constraints.

Not to toot my own horn, but I think I'm keeping these as a canonical part of my avatar. . . after I change the color and whatnot.  

3 hours ago, Quistessa said:

llLookAt(llDetectedPos(0) + <0.0, 0.0, 0.5>, 0.2, 0.3);//look at detected avatar

I think the real problem is that line (near the bottom), and the vector <0.0, 0.0, 0.5> . The '0.5' should really be be something like the difference in height between the two avatars divided by 2. plus some adjustment. (you'd need to determine the amount of adjustment experimentally). That might fix the eyes going to far up or down. The amount left or right is pretty impossible to control.

Link to post
Share on other sites

I'm not a programmer so I will leave it open for others to figure out. My offer stands. Quote me a price and I will pay once the requirements outlined in the first post are met.

Link to post
Share on other sites
18 hours ago, Tinkarbell said:

also when the head moves it throws off the eye rotation angle. maybe there is something like this:

current position = rotation - head angle

This is the impossible part. Scripts can't get the "head angle" because it doesn't exist on the server.

Every viewer handles its own animations, which means that every viewer is potentially seeing a different animation (or a different moment in the animation).

  • Like 1
Link to post
Share on other sites
3 hours ago, Wulfie Reanimator said:

This is the impossible part. Scripts can't get the "head angle" because it doesn't exist on the server.

Every viewer handles its own animations, which means that every viewer is potentially seeing a different animation (or a different moment in the animation).

True, but you can attach an invisible box to your head and use the x,y and z rotation coordinates. It doesn't mater where your avatar appears to be to someone else. It's about where your avatar appears in relation to them. 

I just tested it with a different laptop, third account. it is working. the calculations for eye angle seems to happen on the client computer, which is good.

Link to post
Share on other sites
9 minutes ago, Tinkarbell said:

True, but you can attach an invisible box to your head and use the x,y and z rotation coordinates. It doesn't mater where your avatar appears to be to someone else. It's about where your avatar appears in relation to them. 

I just tested it with a different laptop, third account. it is working. the calculations for eye angle seems to happen on the client computer, which is good.

No, that's not how it works. Scripts don't have access to any client's data.

llGetPos: http://wiki.secondlife.com/wiki/LlGetPos

  • When called from the root of an attachment, returns the wearer's region position.
  • When called in an attachment's child prim, the position given is again relative to the avatar's root position and rotation, but with the offset from the root prim added. Visually, the reported position will only be correct if the object's root is attached to ATTACH_AVATAR_CENTER, at ZERO_ROTATION and ZERO_VECTOR. Moving the attachment's root or changing the attachment point will not affect the reported position. Avatar animation is invisible to the simulator, so it also does not affect the reported position.

llGetRot: http://wiki.secondlife.com/wiki/LlGetRot

  • llGetRot incorrectly reports the avatars rotation when called from the root of an attached object, use llGetLocalRot for root prims, instead
    • llGetRot will return an accurate facing for Avatars seated or in mouselook, but only a rough direction otherwise when called from an attached prim.
    • When called in an attachment's child prim, the reported rotation will only be visually correct if the object's root is attached to ATTACH_AVATAR_CENTER, at ZERO_ROTATION. Moving the attachment's root or changing the attachment point will not affect the reported rotation. Avatar animation is invisible to the simulator, so it also does not affect the reported rotation.

You are of course free to include your script as proof and we'll test it.

Edited by Wulfie Reanimator
Link to post
Share on other sites
3 hours ago, Wulfie Reanimator said:

 

You are of course free to include your script as proof and we'll test it.

 

here is the script:

 

default
{
    on_rez(integer param)
    {
        llResetScript();
      
    }

    state_entry()
    {
       
       llSensorRepeat("", "", AGENT, 15.0, PI, 10);//scan for nearby avatars
       
    }

    sensor(integer total_number)
    { integer distance = (integer)llVecDist(llGetPos(), llDetectedPos(0)); 
      llLookAt(llDetectedPos(0) + <0.0, 0.0, 0.5>, 0.2, 0.3);//look at detected avatar   
         if (distance <= 10)
                     {             
                        llSensorRepeat("", "", AGENT, 15, PI, 0.1);
                      }
                      else if( distance > 10){ llSensorRepeat("", "", AGENT, 15, PI, 10);
                      }       
            }
}
 

 

 

the only problem is, when the head rotates the eyes don't account for the additional rotation. My proposed fix is to attach a box to the head and get x,y,z rotation of the box. this value would then be subtracted from the rotation of the eyes. so if box rotates 12 degrees on x axis then eye rotates -12 degrees on x axis. this should keep them looking in the correct direction.

Link to post
Share on other sites
52 minutes ago, Tinkarbell said:

the only problem is, when the head rotates the eyes don't account for the additional rotation. My proposed fix is to attach a box to the head and get x,y,z rotation of the box. this value would then be subtracted from the rotation of the eyes. so if box rotates 12 degrees on x axis then eye rotates -12 degrees on x axis. this should keep them looking in the correct direction.

Because animations are handled client-side and can't be determined by the server (simulator/scripts), you cannot get the correct visual rotation of the box. You can only get the rotation of the box relative to the attachment point it's in. You cannot get the rotation of the attachment point itself.

Here's a script that gets the current rotation of an object:
(It's an infinite loop that is constantly getting the attachment's rotation and displaying it as hovertext.)

default
{
    state_entry()
    {
        while (TRUE)
        {
            key Box_Head = "e74aa12b-3755-c34c-d846-636718cf5322";
            rotation currently = llList2Rot(llGetObjectDetails(Box_Head, [PRIM_ROTATION]), 0);
            llSetText((string)["Box Head's rotation is: ", currently], <1,1,1>, 1);
        }
    }
}

We can see that the box is visually moving and turning around, but its rotation never changes according to the script, because it cannot see animations.

This is what I mean when I say it's impossible and there are no known workarounds for it. I've been scripting in SL for about a decade and even people smarter than me don't have a solution for this. If it was possible to know the positions of the avatar's bones during an animation, it would enable a lot of really cool stuff, but it's a limitation of the way SL inherently works.

Anyway, what's the issue with the built-in feature of the avatar's eyes doing exactly what you're wanting to do? Why can't you use that?

Edited by Wulfie Reanimator
Link to post
Share on other sites

ok. thanks for taking the time to explain it.

I guess this is kind of the effect I was looking for:

a little creepy , yes but maybe the lindens will make a way to look at an object and then we could simply attach it to another avatars head.

but don't worry. I'm not holding my breath.

Link to post
Share on other sites
9 minutes ago, Tinkarbell said:

ok. thanks for taking the time to explain it.

I guess this is kind of the effect I was looking for:

a little creepy , yes but maybe the lindens will make a way to look at an object and then we could simply attach it to another avatars head.

but don't worry. I'm not holding my breath.

I understand, but that functionality literally exists. No scripts needed!

 

Edited by Wulfie Reanimator
Link to post
Share on other sites
9 minutes ago, Tinkarbell said:

it works for me also, until I turn my AO on.

So find animations that don't animate your neck/skull.

Most AOs don't animate the eyes (or do it optionally with separate animations).

Edited by Wulfie Reanimator
Link to post
Share on other sites
1 minute ago, Wulfie Reanimator said:

So find animations that don't animate your neck/skull.

Most AOs don't animated eyes (or do it optionally with separate animations).

this might be the way to go . thanks again for your help!

Link to post
Share on other sites

Hey, I am new to Second Life and am looking for my first job. Because of this I will accept a very low pay for what I feel will be a very high reward. 

I have spent several years writing sketches, novels, screenplays and scripts both comedic and tragic. I am not professional standard but being young it is certainly an aspiration. I hope you consider me for the job as I feel that I have a lot to offer for a low cost.

Sincerely,

Rufus

  • Haha 1
Link to post
Share on other sites
3 hours ago, goodmaR said:

Hey, I am new to Second Life and am looking for my first job. Because of this I will accept a very low pay for what I feel will be a very high reward. 

I have spent several years writing sketches, novels, screenplays and scripts both comedic and tragic. I am not professional standard but being young it is certainly an aspiration. I hope you consider me for the job as I feel that I have a lot to offer for a low cost.

Sincerely,

Rufus

When people use the term 'scripter' in the context of second life they mean a coder/programmer who writes scripts in a language called LSL that (broadly speaking) make objects in Second life do things and react to stimulus (a door that opens/closes when you touch it for example)

Now I don't think there are very many paying jobs in SL for writers specifically, but you could certainly try roleplaying (pretending to be a specific person or people in a scene and describing what they do and what happens) jobs or blogging (writing articles about Second Life, usually in a way that subtly or not-so-subtly encourages your readers to buy certain products or visit certin places in SL) jobs.

Link to post
Share on other sites
On 4/14/2021 at 6:54 AM, Wulfie Reanimator said:

This is the impossible part.

 

There might still be a way...

Here is a product of an eye that looks in the same direction as the users ALT camera.

https://marketplace.secondlife.com/p/Camera-following-EYE-silver/4431915

So if we flip the xyz coordinates to negative, it should be looking in the opposite direction as the ALT cam. Therefore when the user is looking at it, it will be looking back at the user. 

Does anyone know how to "script" this so that I can throw it into an eye and give it a try?

Link to post
Share on other sites
3 hours ago, Tinkarbell said:

 

There might still be a way...

Here is a product of an eye that looks in the same direction as the users ALT camera.

https://marketplace.secondlife.com/p/Camera-following-EYE-silver/4431915

So if we flip the xyz coordinates to negative, it should be looking in the opposite direction as the ALT cam. Therefore when the user is looking at it, it will be looking back at the user. 

Does anyone know how to "script" this so that I can throw it into an eye and give it a try?

Attach it to your head and you're good to go.

  • Haha 1
Link to post
Share on other sites
4 hours ago, Tinkarbell said:

 

There might still be a way...

Here is a product of an eye that looks in the same direction as the users ALT camera.

https://marketplace.secondlife.com/p/Camera-following-EYE-silver/4431915

So if we flip the xyz coordinates to negative, it should be looking in the opposite direction as the ALT cam. Therefore when the user is looking at it, it will be looking back at the user. 

Does anyone know how to "script" this so that I can throw it into an eye and give it a try?

That works by making use of the scripted camera controls to request the region-relative coordinates of the avatar's camera focus position (what the avatar is looking at), then simply calculating a rotation to make the eye look towards the object (the focus).

The problem is, this doesn't work when attached to an avatar as the focus position reported will always be the avatar itself when in the normal camera mode, and thus this will work *only* if the user is in the freecam mode (there is no way to get the region relative coordinate of the avatar's mouse cursor, as this is not reported to the region).

TLDR; what you're looking for already exists in SL, but animators are *currently* unable to use any IK in their animations, and thus doing this is impossible unless you engineer with LL's existing IK implementation in mind. It's not impossible, but very much impractical.

Edited by Jenna Huntsman
Link to post
Share on other sites
5 minutes ago, Jenna Huntsman said:

TLDR; what you're looking for already exists in SL, but animators are *currently* unable to use any IK in their animations, and thus doing this is impossible unless you engineer with LL's existing IK implementation in mind. It's not impossible, but very much impractical.

Yeah, maybe if we ask nicely LL might somehow make higher priority versions of their already existing IK animations available, . . .

Link to post
Share on other sites
3 hours ago, Quistessa said:

Hell, if you want to look at people's camera, you could just make your eyes particles that will look directly at every camera. . .

I like this idea since you are thinking outside the box. But I'm not sure if you can attach particles to your avatar. Let me know if it is possible.

Link to post
Share on other sites
1 hour ago, Rowan Amore said:

Attach it to your head and you're good to go.

The developer of this product has made it "no mod". So the eyes will be pointing in the wrong direction. Does anyone here think they can code something similar?

Link to post
Share on other sites
13 minutes ago, Jenna Huntsman said:

 

The problem is, this doesn't work when attached to an avatar as the focus position reported will always be the avatar itself when in the normal camera mode, and thus this will work *only* if the user is in the freecam mode.

That's ok with me. I have settled for just getting this working with free cam / alt cam

Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 68 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...