Auto Scripted 3D rig. Files and Video Tutorial

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 »

It doesn't work. It show not properly ordered the shapes of the tail for some positions...
I have to think something different.
For the moment, for one single rig (no more than one limb level) it works.
Let me think about how to solve it.

Regards.
-G
DarthFurby
Posts: 510
Joined: Sat Jul 29, 2006 1:34 pm
Location: New York City
Contact:

Post by DarthFurby »

Once upon a time Darthfurby read this thread.

Holy Cow.

The End.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Darthfurby!

Haven't seen you posting much lately or maybe I've only been hanging in one or two threads lately. ;)

As you can see I was diverted from my character rig just a little bit.

;)

-vern
DarthFurby
Posts: 510
Joined: Sat Jul 29, 2006 1:34 pm
Location: New York City
Contact:

Post by DarthFurby »

I bought a new computer last month and it somehow timewarped me into the end of June.
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Hi Drathfurby! I'm glad to see you here again!
Keep connected! Interesting things would come soon!
Best
-G
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Hi again!

I want to give you a taste of what's coming:

ALREADY DONE:
- Rx, Ry, are controlled now by its position. No more angle control needed. Alpha0 is calculated now. Now the Rx and Ry bones are linked to its corresponding center bones and its positions represents the relative x,y,z coordinates. It makes also more clean of bones the 3D rig.
- Shape order now works also for third level (or more) limbs. The 3D tail can be rotated now to any place and the shapes are correctly ordered.
(See THIS animation.)

UNDER DEVELOPMENT:
3D rig scripts (front and side) have been improved. Now they detect what kind of rigging are you doing (base rig or limb rig) It ask about create the masterX masterY and mX, mY bones and creates them automatically (or not).
Also give info about the name of the selected bone and the amount of bones you're about to create.

TO DO:
- Integrate last release of 3Dgrid script (perspective) from heyvern into the new method of rigging. Including the multiple limbs.

- Include a new feature to 3Dgrid script: Allow to "sort layers by depth" if enabled in the bone layer. It would check if it this option is selected and then ask if you want to "3D bind" a layer to a bone. It would allow rotate layers together with bones (as the points rotates) and change its Z value dynamically. It would allow some uses of layers functionality like motion blur, shadows and masks that now are not allowed with the single layer 3D rig. The Z value should be divided by 10 or 100 to avoid the 3D camera deformation. This also can be selectable.

I'll not post any file yet because they are in alpha level by now.

Here some screen shots of in progress modification of the 3D rig front script:

Image
Image
Image

Please comments on TO DO tasks.
Thanks
-G
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Yeeehaaa!

You have been busy!

I put the perspective code into the last version (3Dgrid9) and it only took about... 5 minutes. ;)

It is pretty simple. You could try it yourself or I could put it in. There is just the one extra variable at the top (fov bone) and one block of code at the bottom of the script right before the bones are "repositioned".

You know... I never did check to see how that worked with the limbs though... dagnabbit! I will have to test that.

-----------

I am working on a wink tutorial of some "tricks" and techniques for simple easy drawing of 3D shapes in AS for use with the rig.

basically you have a "fake" perspective drawing on frame 0. You draw the shape as you imagine it in your head from a 3/4 view.

Then you key frame the points so the shapes are "flat" on another frame. This way you go back to frame 0 to easily see and select the correct points for easy sliding into position for the front and side views.

The mesh on frame 0 is really just a reference.

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

Post by Genete »

I wanna make a wink video tutorial to show the new features but you know.. I've been a little busy lately :wink:
It is looks a good technique the fake perspective... please teach us!
You know... I never did check to see how that worked with the limbs though... dagnabbit! I will have to test that.
Yeeeaah!. Limbs work pretty well. Shape order is one of the most interesting script I've never seen!!. (It should not be said by me, the author, but it is true!!)

What about the idea of layer Z sort using pt bones Z values?

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

Post by heyvern »

What about the idea of layer Z sort using pt bones Z values?
Do you mean to change the order in the layer palette?

Or do you mean changing the z translation of a layer?

I actually did a test script for changing the order in the layer palette.

It was... very annoying to be perfectly honest. Layer order is kind of a "personal" thing to the artist in my mind.

Changing the order of layers could get confusing. I got very confused when testing it on a previous project with many layers. I had become so familiar with where the layers were that when they changed on the fly it was hard to keep track. Plus any masking could get messed up doing layer order changes.

I like shape ordering, and I like changing layer depth by using the z translation. That would be good.

Just my opinion of course. ;)

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

Post by Genete »

I like shape ordering, and I like changing layer depth by using the z translation. That would be good.
Yes Z translation, like your famous flip by bones script. But in this case it would be a continuous Z translations accordingly to the z value of its binder bone. It would open a new world in my opinion.
Masks take account depth sort so you can do interesting things if use masking and depth sort at the same time. Not need to change layer order in the layer window. There is no reason for that. Also layer blending mode take account z depth so in fact when you're moving the layers by its Z you act as they really are one above others...
Maybe use of this for dropped shadows.... ? :roll:

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

Post by heyvern »

Ha!

I just realized if you turn off "Enable 3D camera" in the project settings you don't get that annoying shift on layers when changing the z translation. Nice. I don't think I was aware of this before.

I think you are right. I think layer z depth sorting would be very powerful. Could it be an option?

There might be situations where shape ordering is all that is needed for simple file structures.

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

Post by Genete »

Could it be an option?
It must be an option and also will not the only option. You should be able to have 3D sort shapes and also 3D sort layers AT THE SAME TIME.
Shapes are ordered by the vector layer embedded script. Layers are ordered by the embedded bone script. They work together and if the layers are not binded to any pt bone then there is no Z depth sort. (Also you can turn off that option in the bone layer options... :wink:)

ADDED to the TO DO list :P
-G
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Good heavens!

:shock::shock::shock::shock::shock::shock:

I have in mind how to add a LIGHT to the 3D model!!!!!! I mean. a light spot where depending on the relative position and its distance to the model, its shapes color can get brighter or darker.

:shock::shock::shock::shock::shock::shock:

I want to stop adding features!!! but it would be SO COOL!!!!

I think someone would kill me one of those days...

Let me solve in my mind the basic concepts and then I'll explain you what I want to do to achieve that...

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

Post by Genete »

Just some notes to make me reming the concepts to create lights:

Prerequisites: Shape must be not concave (it means that the average 3D points of its edge points mut be inside the shape and not outside.)

Procedure:
1) Using the x,y,z of every point-bone (remember one point - one bone) of the shape calculate its average value. It would produce the "central 3D point" of the shape.
2) Depending on user selection, the points should be ordered in an array according to its clockwise or counter-clockwise relative position. This is the most important and difficult issue.
3) Using vectorial cross product calculate the average normal vector to the shape. This vector is "perpendicular" to the shape (the shape could not be flat) and is representing the outside surface of the model.
4) The light is placed at a 3D position. Calculate the vector that connects the center of the shape to the light. Lets call it light relative position.
5) Calculate the angle between the light relative position and the average normal vector to the shape.
6) Modify the light of the color of the shape according to that calculated angle. -90º --> darker, -90º brigther, 0º neutral.

It could be included some other tricks like give a color to the light and so on...

I'm very excited on this!!!!
-G
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Coming back to the usual thread.

UPDATE of the SITUATION:

ALREADY DONE:
- Rx, Ry, are controlled now by its position. No more angle control needed. Alpha0 is calculated now. Now the Rx and Ry bones are linked to its corresponding center bones and its positions represents the relative x,y,z coordinates. It makes also more clean of bones the 3D rig.
- Shape order now works also for third level (or more) limbs. The 3D tail can be rotated now to any place and the shapes are correctly ordered.

3D rig scripts (front and side) have been improved. Now they detect what kind of rigging are you doing (base rig or limb rig) It ask about create the masterX masterY and mX, mY bones and creates them automatically (or not).
Also give info about the name of the selected bone and the amount of bones you're about to create.

- Integrate last release of 3Dgrid script (perspective) from heyvern into the new method of rigging. Including the multiple limbs. DONE. It continues making strange things when shape sort. I think it is due by how the points are deformed to achieve the perspective. I work with the x,y,z values in original values but they are drawn in perspective. The moment to hide the shapes don't coincide properly. Any suggestion?

UNDER DEVELOPMENT:

- Include a new feature to 3Dgrid script: Allow to "sort layers by depth" if enabled in the bone layer. It would check if it this option is selected and then ask if you want to "3D bind" a layer to a bone. It would allow rotate layers together with bones (as the points rotates) and change its Z value dynamically. It would allow some uses of layers functionality like motion blur, shadows and masks that now are not allowed with the single layer 3D rig. The Z value should be divided by 10 or 100 to avoid the 3D camera deformation. This also can be selectable.

- Add a 3D light feature!!


Those files are for testing only.
Still in alpha version.

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

Content:
3Dgrid9.1.lua
Bone or switch layer embedded script that does the magic (include Heyver's perspective)
3Dgrid9.lua
Bone or switch layer embedded script that does the magic
ge_front_3Drig3.2.lua
Automatic script to make 3D rigs. Allow create limbs. FRONT
ge_side_3Drig3.1.lua
Automatic script to make 3D rigs. Allow create limbs. SIDE
sort_shapes9.1.lua
Vector layer embedded script to perform shape Z sort.

All those script work together.

ge_front_3Drig3.2.lua
BRIEF usage:

Draw FRONT and SIDE models. Add central FRONT bone. Select bone and its correspondinf points in FRONT view. Call the front script. Follow the instructions (you should create the masterX and masterY bones in the first call). The clone bone, masterX and masterY bones are created automatically.
Place the clone bone in the SIDE view and repeat same but for SIDE view and script.

For limbs: select a pt bone (it would be the center of rotation of the limb). Select the corresponding points in the FRONT view. Call the same FRONT script from menu. It allow to create automatically the mX and mY bones. Also the clone bone. The script put the clone bone in the correct position in the SIDE view and select it for you. Just go to the SIDE view and select the corresponding points on that view for the lib you're rigging. Run the SIDE script. menu. It would remove all the dots on the clone pt bone (if not the embedded script will fail.

Now just manipulate mX mY and masterX and master Y bones by the timeline.

Remeber to embed the 3Dgrid script to the bone layer and the sort_shapes script to the vector layer script.

Enjoy!
-G
Post Reply