3D rig!!!

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Víctor Paredes, Belgarath, slowtiger

Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Yes! that''s exactly what I wanted to explain! It seems that in a short time you would know more about the scripts than me!. I didn't know that you cannot use the menu script if the layer script for bones is embedded.

Also I noticed that "performing arithmetic" message from time to time, not only when first open but when I play the file. Consider that the script is storing a Z value on an object that is own by the Moho object. If for some reason meanwhile the sort operation (four nested for---end loops) the shapes list should be reloaded from the cache or from the file I believe that the Z value is lost and then the layer script is making a mathematical operation with a Z value that has a nil value (not valid). It is simply solved once the script is run again. The reason for that is the lack of performance of the script. It still being a mistery to me but the layer script is called three times in the same frame. It causes a lot of performance loose.

Regarding to new ideas:

-Oh! if we could make masking operations between shapes!
-Oh! if we could make blending operations between shapes!
;)

I have other script that uses the 3D rig to move in a 3D environment not the points but the Vector layers that are bound to it. I think it can be modified to work in this way:

Current shape sort is performed based on the average of the Z depth of the each point bone. As well as each point in a shape has a single bone parent and the bone has a Z depth value (calculated, not real), you can calculate the average Z of the shape based in the points the shape holds and its corresponding Z's.
A point is shared by different shapes based on the welding operation. So moving a point (in 3D) makes sure that all the shapes that are asociated to that point moved with it.
What I suggest is to separate each shape (when needed) in individual vector layers. Two points in two different Vector layers cannot be welded but can be bound to the same bone and they would follow the path. That would allow separate the shapes into vector layers.

Adventages:

You can perform masking operations.
You can perform blending operations.

Disventages:

You can loose the curvature continuity between outlines because they are in different layers.
You have to disable the 3D camera.
Possibly jump traffic of script running in som many layers...

Current script I did to perform layers sort based on z depth is only valid if you bind a layer to a single pt bone. If you want to have the average of the Z of the pt points of the layer the script must be changed.

If the layer sort based on the new recent added feature were added to the script interface I guess it can be esier to implement.

Any suggestions? :roll:
User avatar
synthsin75
Posts: 10266
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Yes! that''s exactly what I wanted to explain! It seems that in a short time you would know more about the scripts than me!. I didn't know that you cannot use the menu script if the layer script for bones is embedded.
I doubt that. Though I am trying to learn some lua scripting, I can't imagine writing anything as awesome as these 3D scripts. I haven't really notice any serious performance loss. So far I'm as happy as can be! :D

-Oh! if we could make masking operations between shapes!
I've needed that one so many times!

I'm pretty happy with the masking I was able to do,but I'd like to play with that 3d script for whole layers, if you have it available.

Thanks
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

I'm pretty happy with the masking I was able to do,but I'd like to play with that 3d script for whole layers, if you have it available.
I think you already have it. It is in the 3Dgrig10.lua but need to bind the layer to the pt bone.

Here is a sample file:

http://www.darthfurby.com/genete/Script ... layers.zip

You had it in my webpage of my signature :)

-G

PD: I give thanks (again) to Darthfurby for host all those files :) THANKS!
User avatar
synthsin75
Posts: 10266
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Ah, now I remember seeing that example. Didn't realize what it was for at the time. :oops:

I need to do some more work and experimenting, but I'll post an update as soon as I have one. :wink:
User avatar
synthsin75
Posts: 10266
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Okay. I just ran into my first problem with the great number of bones involved. In the constraint menu the <None> option doesn't show. So if I constrain a bone, I can only change the constraint, I can't remove it. :?

Anyone have any ideas, or do I just need to be really careful what bones I constrain?
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

The only person that I know that also works with hundred of bones is heyvern. I don't know if he solved that for constraints.

-G
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I created a tool script for selecting bones from a scrolling list. This works great for selecting bones... but...

I tried to do the same thing for the constraints list but couldn't do it. There is no way to have a scrolling list INSIDE another pop up window like the constraints pop up menu.

The menu for picking a constraint is completely different from the menu type used to select a bone.

I could still do it but would have to put the constraints in another menu pull down OUTSIDE of that constraints pull down that is currently part of AS. This would be like... a major reworking of how AS works... I was hoping that at some point a new version will have more options for scripted pop up windows so I can put that scrolling list INSIDE another window.

I was thinking of putting the MAIN types of constraints in 3 separate menus at the top of the screen for the bone select tool. This would take up a lot of space horizontally. I did a simple layout script to see how it would work... it isn't very convenient.

I could also create a separate special "constraint tool" that only does constraints and would only need to be used when the list is too long. This would work with the current bone select tool because they would both change the same thing if you know what I mean.

The trouble with all of these solutions is that instead of just modifying slightly what is already being done with the current tool, I would have to "reinvent the wheel".

It would be so much easier if I could just modify the current constraint menu.

-----

Here's a tip that MIGHT work... no promises. If you scroll over to the spot where you THINK the "none" selection is... you can still select it. It isn't on the screen... you can't see it... but you could select it. It isn't easy to do though. ;)

-vern
User avatar
synthsin75
Posts: 10266
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

HeyVern wrote:Here's a tip that MIGHT work... no promises. If you scroll over to the spot where you THINK the "none" selection is... you can still select it. It isn't on the screen... you can't see it... but you could select it. It isn't easy to do though.
:shock: :lol: That's crazy man! I had to pull my main window almost halfway off screen to find it! I assume there's no way to get ASP to 'draw' outside of the window, huh. I tested it with four times the original bones and there was no way I'm going to find that damn 'None'. :?

Mmm, would it be possible to implement a text input selection? Perhaps a text input that just allows you to scroll with the wheel like tool options do?

So the solution is to always save before adding a constraint. :wink:
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Hang in there dude!

This problem drives me CRAZY and I'm determined to create some kind of scripted solution for it.

I'm thinking s "special" constraints tool is the way to go for now. The main issue for me is screen space for all those menus added to the regular bone tool.
Mmm, would it be possible to implement a text input selection? Perhaps a text input that just allows you to scroll with the wheel like tool options do?
That's what I did with my custom bone selection tool. It uses what is called a scrolling "text list" box that is part of the ASP scripting stuff. It's a built in widget. The problem is that the text list is a sub category of the pop up window scripting function. I have to have one pop up window with the scroll text box inside it.

So basically what I've done is changed the bone select tool thingy to a popy up thingy and stuck a scrolling text list inside it.

The constraints window is ALREADY a pop up window widget. I can't put ANOTHER ONE inside it.... trust me I've tried. ;) Actually I can put one inside it but it would display ALL the bones ALL the time and wouldn't work... it's all very complicated. ;)

My constraints tool would have all the constraints menus and settings visible at the top of the screen all the time. That is why it would take up so much more room. I wouldn't be able to put the different constraints inside one pop up menu. Each constraint would have to have the menu selection and the values to type in right next to it. So you would have the angle target menu and a text box next to it. Then a translation constraint target menu with 2 text boxes... and a length menu... etc etc. Not a lot of space up there to squeeze it all in.

The sad part is I would have to do all the scripting to apply the constraints as part of this custom tool. The current constraints menu has this already done... if I could just use a scrolling text list instead I could just plug it in there.

-vern
User avatar
synthsin75
Posts: 10266
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Mmm, I think you could abridge the constraint options that would be visible all the time with your tool. I wouldn't mind if it only had constraint assignments.

If you added it to your bone selection tool, you would have:
'Select bone' drop down with its selected text
+A(for angle) With constraint selection like in the original menu.
+ the other two the same way

Or...to clean up the tool options even more, drop the select/naming text box, and have the bone name appear on the button like the constraints do. This way you'd only have the tool icon, a selection button, and three constraint assignment buttons. (Plus some identifiers like A,P,S for the constraints)

Then you'd just need to switch tools to use the usual constraint menu to adjust everything.


I don't know if you understood what I meant by 'scrolling text selection'. By this I mean a text input box (like the manipulation number input for translation, scaling, etc) except that when you use the mouse wheel with the cursor over it it scolls through a bone list instead of the numbers.

I don't know if that is possible though. I hope these ideas help. :wink:


I'm really trying not to make more work for the few active scripters we have left. We've lost so many already. That said, I can always just save before I assign constraints.
:wink:
User avatar
synthsin75
Posts: 10266
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

How hard would it be to change the 3D scripts so that, instead of one bone working the x-axis and the other working the y/z plane, one bone works the x/y plane and the other works the z-axis.

Just wondering, I thought this would make it a little more intuitive to use. But it is not crucial at all. :wink:
User avatar
synthsin75
Posts: 10266
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Here's an update!

All I did in this one is constrain the y/z plane bones of the shading shapes to single bones. This makes it easy to alter the 'lighting intensity'. (Depth of each light)

I still need to add more shading shapes ( at least three to five total) and make a model with better contour lines. When I rig the new model I plan to use a lot more sub-objects. At least one for the jaw and lower lip, and maybe add the eyes. :)
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

synthsin75 wrote:I don't know if you understood what I meant by 'scrolling text selection'. By this I mean a text input box (like the manipulation number input for translation, scaling, etc) except that when you use the mouse wheel with the cursor over it it scolls through a bone list instead of the numbers.
Interesting idea... I have to check and see if that would work. The problem is what is really happening with the scrolling number changing trick. It isn't pulling from a list it is just adding or subtracting a value from the number that is in the box.

This would probably work though since bones are listed by ID. The name of the bone is just a "bonus". Incrementing would go to the next bone in the list. It might be a bit slow... the script would have to get the name of the bone from the ID and then print it in the text box... if you scroll really fast... this might cause trouble. I've already noticed this slow down with my bone grouping script. It takes a while to display the bone list names in the text box after searching a large list of bones.

It would still not be my best choice for an interface. It actually might be worse in many ways since picking a bone "out of context" from a huge gigantic list can be very difficult. By being able to see the names of other bones around the one you want it helps narrow down the selection. If you have to scroll through the whole list to find one bone it could take awhile.

This would definately solve the problem of having that text box inside the pop up though.

-vern
User avatar
synthsin75
Posts: 10266
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Or...to clean up the tool options even more, drop the select/naming text box, and have the bone name appear on the button like the constraints do. This way you'd only have the tool icon, a selection button, and three constraint assignment buttons. (Plus some identifiers like A,P,S for the constraints)
But I'd be more than happy with this kind of setup. Even just adding three constraint assignment drop downs with scrolling lists to your select bone tool would be awesome!
I think this would make sense for the select bone tool to also handle the constrain selection (without any further constraint options). Kind of a super selection tool.

I'd be thrilled to be able to find that 'None' selection, even if I had to use one tool for assignment and another (Fazek's or LM's) for the actual constraint tuning.


Good point about trying to scroll through that list one by one. In the interest of keeping it simple, I really like the idea of only adding constraint assignment drop downs. :wink:
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

synthsin75 wrote:How hard would it be to change the 3D scripts so that, instead of one bone working the x-axis and the other working the y/z plane, one bone works the x/y plane and the other works the z-axis.

Just wondering, I thought this would make it a little more intuitive to use. But it is not crucial at all. :wink:
It is possible but it would imply change the math stuff. I really don't know exactly what should be the equations. Current ones are the result of consider one rotation of the coordinate system by the Y axis and a local rotation of the model relative to the rotated axes "by the rotated X axis". This is a kind of "fake" spherical coordinate system and to change the meaning of the bones I should invent another feasible "fake rotations" to perform what you want. I cannot promise nothing but when I have enough time, maybe, I'll take a look... :roll:
:D

-G
Post Reply