What I have learned today?


#1
  1. Change light
    Developer>ambient light -> campus sunset

  2. Change a script
    Tools-> script editor
    open sit.js
    change the rotation of the legs and add rotation values for the arms
    var pose = [
    {joint:“LeftArm”, rotation: {x:70.0, y:0.0, z:60.0}},
    {joint:“LeftForeArm”, rotation: {x:-40.0, y:15.0, z:20.0}},
    {joint:“RightArm”, rotation: {x:70.0, y:0.0, z:-60.0}},
    {joint:“RightForeArm”, rotation: {x:-40.0, y:-15.0, z:-20.0}},
    {joint:“RightUpLeg”, rotation: {x:100.0, y:15.0, z:0.0}},
    {joint:“RightLeg”, rotation: {x:-120.0, y:80.0, z:0.0}},
    {joint:“RightFoot”, rotation: {x:20, y:5.0, z:0.0}},
    {joint:“LeftUpLeg”, rotation: {x:100.0, y:-15.0, z:0.0}},
    {joint:“LeftLeg”, rotation: {x:-150.0, y:-70.0, z:0.0}},
    {joint:“LeftFoot”, rotation: {x:30, y:15.0, z:0.0}}
    ];

testing -> toggle run script
save and run the script -> meditate

Have a nice day
summer4me


#2

What I have seen today - the pose scripts influences one the other. The walk script breaks the sit script. Stop it. And also you must make your own button for the new script.
Its time to rest now with a new pose:

var pose = [
{joint:“Hips”, rotation: {x:-83.0, y:0.0, z:0.0}},
{joint:“LeftArm”, rotation: {x:-80.0, y:-50.0, z:100.0}},
{joint:“LeftForeArm”, rotation: {x:100.0, y:-100.0, z:0.0}},
{joint:“LeftHand”, rotation: {x:0.0, y:70.0, z:0.0}},
{joint:“RightArm”, rotation: {x:-80.0, y:50.0, z:-100.0}},
{joint:“RightForeArm”, rotation: {x:100.0, y:100.0, z:0.0}},
{joint:“RightUpLeg”, rotation: {x:50.0, y:15.0, z:0.0}},
{joint:“RightHand”, rotation: {x:0.0, y:-70.0, z:0.0}},
{joint:“RightLeg”, rotation: {x:-80.0, y:0.0, z:0.0}},
{joint:“RightFoot”, rotation: {x:-30.0, y:5.0, z:0.0}},
{joint:“LeftUpLeg”, rotation: {x:50.0, y:-15.0, z:0.0}},
{joint:“LeftLeg”, rotation: {x:-80.0, y:0.0, z:0.0}},
{joint:“LeftFoot”, rotation: {x:-40, y:15.0, z:0.0}}
];

Have joy
summer4me…


#3

Have learned today - cmd s shoots a photo and here Im sitting in a new pose.
var pose = [
{joint:“LeftArm”, rotation: {x:70.0, y:-5.0, z:40.0}},
{joint:“LeftForeArm”, rotation: {x:5.0, y:-15.0, z:50.0}},
{joint:“RightArm”, rotation: {x:70.0, y:-0.0, z:-55.0}},
{joint:“RightForeArm”, rotation: {x:-30.0, y:-15.0, z:-40.0}},
{joint:“RightUpLeg”, rotation: {x:85.0, y:-5.0, z:0.0}},
{joint:“RightLeg”, rotation: {x:-80.0, y:5.0, z:0.0}},
{joint:“RightFoot”, rotation: {x:0.0, y:0.0, z:0.0}},
{joint:“LeftUpLeg”, rotation: {x:100.0, y:25.0, z:0.0}},
{joint:“LeftLeg”, rotation: {x:-80.0, y:-10.0, z:0.0}},
{joint:“LeftFoot”, rotation: {x:0.0, y:15.0, z:5.0}}
];

Happy Easter
summer4me…


#4

Today I have learned, where my print command goes from the script -menu view ->log activates the log window.

But this is a bit nervy, because there are so many messages from “adjusting LOD…”. Would it be possible, to switch these of?
And also the log window goes always in background, if I click in the viewer window. So I don’t see the log, when I have activated my script and must move the log and the viewer window with every start. Would be great, if the log window would stay in foreground for script testing.

And I have brought my own hat in highfidelity :smile: My Shade 3d has had problems with the materials. So I have tested a new easy 3d program -silo 3d http://www.nevercenter.com/silo/. It is really an easy program and the materials work well. But it doesn’t work with bones and also only can save in .3ds, so you must convert with Blender to .fbx. This has worked well.

Have a nice day
summer4me…


#5

Hi summer4me … Also have a look at the script editor for script testing (Tools > Script Editor menu item). It stays in the foreground and print output goes into its built-in debug log. (Note though that JavaScript errors are only reported in the full log window.)


#6

Thanks ctrlaltdavid, I have tried this editor at the beginning of my scripting, but then my script has grown and I have used xcode for changing. So finally i have forgotten, that I there also get the messages. :smile:


#7

@ctrlaltdavid i use always the dos console screen to read error messages. The build ins cript editor is complete useless. i cannot set the font size, colors and type. Is there some otehr way to display errors ? or mabey some new way comes ?


#8

@Richardus.Raymaker I use an external editor (Visual Studio) to edit scripts, and at the same time Interface’s script editor to load and run them (typically have the “Automatically reload externally change files” option ticked, and maybe the “Run on the fly” option). Then I can see print() statement output in the Script Editor’s debug log, and JavaScript errors in the DOS console.


#9

Ok, i forgot i now use 2 screen’s the small one running on 800x600. so i can check what happens if i can move the script editor to there. But still coding in external editor :smile:


#10

Well today I’m a bit destroyed. The rendering seems to go wrong on Mac.

But finally I have found the error in the sit script -
startPoseAndTransition.push({joint: pose[i].joint, start: startRotation, transition: transitionVector}); dos add the values, when it is called again. So it becomes longer and longer and dos run through all the settings. I have changed it to:
startPoseAndTransition[i].joint=pose[i].joint;
startPoseAndTransition[i].start=startRotation;
startPoseAndTransition[i].transition=transitionVector;

and startRotation = [];
is changed to:
var startPoseAndTransition =
[ {joint:“Hips”, rotation: {x:0.0, y:0.0, z:-5.4}},
{joint:“LeftArm”, rotation: {x:0.0, y:0.0, z:-5.6}},
{joint:“LeftForeArm”, rotation: {x:0.0, y:0.0, z:14.4}},
{joint:“LeftHand”, rotation: {x:0.0, y:0.0, z:-9.9}},
{joint:“RightArm”, rotation: {x:0.0, y:0.0, z:2.4}},
{joint:“RightForeArm”, rotation: {x:0.0, y:0.0, z:-17.6}},
{joint:“RightHand”, rotation: {x:0.0, y:0.0, z:16.7}},
{joint:“RightUpLeg”, rotation: {x:0.0, y:0.0, z:10.7}},
{joint:“RightLeg”, rotation: {x:0.0, y:0.0, z:2.92}},
{joint:“RightFoot”, rotation: {x:0.0, y:0.0, z:-5.19}},
{joint:“LeftUpLeg”, rotation: {x:0.0, y:0.0, z:12.1}},
{joint:“LeftLeg”, rotation: {x:0.0, y:0.0, z:5.2}},
{joint:“LeftFoot”, rotation: {x:0.0, y:0.0, z:-5.43}}
];

So the script dos work well also if I start different poses.

Have a nice day
summer4me…


#11

Today I’m looking well. Yay, the graphic bug is gone. Have tested my script. It dos work for teleporting und changing position now too. So maybe somebody of you also would like to test. Here you can find it - https://dl.dropboxusercontent.com/u/48725104/MyAnimation.js
Would be glad, to hear about results.

Have a nice day
summer4me…


#12

I have included now one more pose in the script. So there are 5 poses to play with,
https://dl.dropboxusercontent.com/u/48725104/MyAnimation.js

Dos somebody know, which function in a running script is called, when the viewer will be switched of? The Script.scriptEnding.connect(function() is called, when I disconnect the script, but it seems, it isn’t called, if I switch of the viewer.


#13

Today I have begun, to program a pose editor. Well this is a great project for me and so I would ask, what do you think about it? Is it a useful tool, which you would like to use?
On the screen are shown the Buttons for the joints. I click on a Button and choose the joint. Then I can rotate the joint in every direction with clicking on the move Buttons.

Have a nice day
summer4me…


#14

Today I have done some sport - the first pose, which I have made with the pose editor and I can save the pose now with the print command.

var pose =
[ {joint:“Hips” , rotation: {x:42.19437026977539, y:-3.867593765258789, z:0.00023179384879767895}},
{joint:“Spine” , rotation: {x:-2.805647134780884, y:-3.867628335952759, z:0.0008957207901403308}},
{joint:“Spine1” , rotation: {x:-22.805644989013672, y:-3.8676018714904785, z:0.0005638676229864359}},
{joint:“Head” , rotation: {x:-22.805639266967773, y:56.13239669799805, z:0.0005668580415658653}},
{joint:“LeftArm” , rotation: {x:-2.188364028930664, y:-3.7696216106414795, z:0.00816302839666605}},
{joint:“LeftForeArm” , rotation: {x:-22.702186584472656, y:-3.7652883529663086, z:0.18722721934318542}},
{joint:“LeftHand” , rotation: {x:-22.8969669342041, y:-3.7958080768585205, z:-0.04935837537050247}},
{joint:“RightArm” , rotation: {x:7.855929851531982, y:-3.948730945587158, z:-0.04852908477187157}},
{joint:“RightForeArm” , rotation: {x:-22.76289176940918, y:16.11985969543457, z:-50.01215362548828}},
{joint:“RightHand” , rotation: {x:-22.882394790649414, y:-3.945490837097168, z:-9.978012084960938}},
{joint:“LeftUpLeg” , rotation: {x:-32.75803756713867, y:-3.867929697036743, z:0.0017735924338921905}},
{joint:“LeftLeg” , rotation: {x:-22.858083724975586, y:-3.8679959774017334, z:0.0005616216221824288}},
{joint:“LeftFoot” , rotation: {x:-42.8276481628418, y:16.13186264038086, z:0.00016886612866073847}},
{joint:“RightUpLeg” , rotation: {x:57.23150634765625, y:-3.867201566696167, z:0.0001253632945008576}},
{joint:“RightLeg” , rotation: {x:-12.827095031738281, y:-3.867151975631714, z:0.0005652578547596931}},
{joint:“RightFoot” , rotation: {x:-2.821354627609253, y:-13.867170333862305, z:-9.999099731445312}}
]

Now also my old spine can be moved :smiley: .


#15

I learnt that .js means JavaScript :wink:


#16

Awesome way to contribute. Sounds like a very insightful idea.


#17

If there would be joints for the face bones, it could be used in the same way also for emotions.


#18

Today I have learned, that my poses fully don’t work for man. :blush:
Sorry, I have seen it only now, when I have worn a male avatar.

Here is a male version now https://dl.dropboxusercontent.com/u/48725104/MyAnimationMale.js

No clue, if this will work also for other man, or if I need for every avatar own poses.
Well this would mean, the pose editor is really needed.

In the moment I try to write in a file from my script, but nothing dos work. I could need some help.

Have a nice day
summer4me…


#19

Here comes the first version of the PoseEditor:
for woman:
https://dl.dropboxusercontent.com/u/48725104/PoseEditor_f1.js

for man:
https://dl.dropboxusercontent.com/u/48725104/PoseEditor_m1.js

Click first on a button of the joint, which you want to move, then you can move it with clicking on the x+…z- Buttons
f/s toggles between fast and slow movement.
pj prints the values of your pose in the script editor window.

Have a nice weekend
summer4me…


#20

Sorry, what exactly goes wrong when you try to take a pose made with the female av and use it on a male av? Do the limbs wind up positioned out of kilter, or do they simply not get acted on at all? oO