Rotate LayerY from a script?

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

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

Post by heyvern »

The scripts Genete developed do pretty much what you described.

You draw a front view and move those same points for a side view. The script automatically creates a bone for each point and calculates the position in the 3D space based on the location and angle of difference from the position of the point from the front and side views.

Here's a quick sample I did in about 20 minutes:

http://www.lowrestv.com/moho_stuff/3D/3D-house3.mov
Image

-vern
Ricardo
Posts: 66
Joined: Thu Jun 28, 2007 4:50 am
Location: Argentina

Post by Ricardo »

heyvern wrote:The scripts Genete developed do pretty much what you described.
Which of all the scripts from Genete?
----------------------------------
Im a software developer, my apps:
Mp3Doctor
SuperMp3Normalizer
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Read this thread. It covers what we've been working on.

viewtopic.php?t=8778

The trouble with your idea for layer rotation to create 3D objects is that the layer is "flat" and also doesn't have the option for targeting "points". You could probably do simple geometric structures with a scripted 3D layer solution but it would be limited.

Also you would still need to do some sort of layer ordering. This could be done with depth sorting I suppose.

By targeting the individual points of a mesh instead you can create almost any kind of shape and rotate it in 3D space.

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

Post by Genete »

Dear Vern...
I did not want to bore him with the 3D stuff... but the power of the 3D rig we've developed is awesome!!. Specially for props. :shock:

http://www.darthfurby.com/genete/Other/column.zip
http://www.darthfurby.com/genete/Other/column.mov

Hey Ricardo!
Don't think we don't want to back your script development!!! We need you!!!!! We need people with bright brain and ready to make cool scripts! Vern and I are so lazy!!! :wink:
What we want to show you is that the effort to make a new script to create props with layers is too big to achieve SAME result that with our 3D rig.
TRY to use it and spread its possibilities!!!
Maybe you can do this column with a script but I've only spend 10 minutes to create it! Also I know that there is some bugs with rotations of group layers where the inside layers are rotated and checked the option "rotate to face camera".

We invite you to learn and use the 3D rig scripts. Also PLEASE continue developing cool scripts!

-G

PD: Anyway insert a character inside the 3D hose need some tricks that I have to study. That would need some tricks. For example a 2Dcharacter can be done just naming the bones of the character to .pt and creating its corresponding .Rx and .Ry to make the character flat. Just take apart the Rx and Ry bones and dont add any mX and mY bones. It would work like a 2D character in the middle of the house.
There is no need in that case to have a bone for each point. The only draw back id to have region binding to the character.
I mean: Create your 2D character like usual. Use region binding (all points must have region binding) then name the bones adding a .pt extension. Create the Rx and Ry bones and take them apart. The Ry bones would be in a flat plane in the side view and place in Z to be inside Vern's the 3D house. Then applying Shaoe Z sort the character would be always inside the house.
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Look what can be done also!!
Try to do this with separated layers!

http://www.darthfurby.com/genete/Other/columnmorph.anme
http://www.darthfurby.com/genete/Other/columnmorph.mov

:wink:

-G

PD: drop the file into the same folder than the previous one. It need the embedded scripts.
Ricardo
Posts: 66
Joined: Thu Jun 28, 2007 4:50 am
Location: Argentina

Post by Ricardo »

Genete wrote: Hey Ricardo!
Don't think we don't want to back your script development!!! We need you!!!!! We need people with bright brain and ready to make cool scripts! Vern and I are so lazy!!! :wink:
He he

Im very new on this stuff. I come from developing desktop apps, so i have to go step by step learning (and understanding) all this stuff.

You 3D rig script are very nice, but i need to understand first the basics, otherwise i feel insecure because i dont understand what is the script doing.

Im reading every script and trying to understand, but as the documentation of moho scripting is not much complete, in many parts i have to try to deduce by myself what and why is happening there.

Im very intesrested on all this, but im going step by step trying to understand and learn.
----------------------------------
Im a software developer, my apps:
Mp3Doctor
SuperMp3Normalizer
Ricardo
Posts: 66
Joined: Thu Jun 28, 2007 4:50 am
Location: Argentina

Post by Ricardo »

heyvern wrote:The scripts Genete developed do pretty much what you described.

You draw a front view and move those same points for a side view. The script automatically creates a bone for each point and calculates the position in the 3D space based on the location and angle of difference from the position of the point from the front and side views.

Here's a quick sample I did in about 20 minutes:

http://www.lowrestv.com/moho_stuff/3D/3D-house3.mov
Image

-vern

This is pretty much what i want to be able to do.

Can you explain me how did you did it please?
----------------------------------
Im a software developer, my apps:
Mp3Doctor
SuperMp3Normalizer
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I am working on a Wink tutorial. Should be ready soon. I am such a klutz I keep forgetting steps or hit the wrong key while recording. :oops: I've never used Wink before.

I've watched what I have so far and I think it should be fairly simple and clear to follow along. I am using the house project as the example file.

-vern
Ricardo
Posts: 66
Joined: Thu Jun 28, 2007 4:50 am
Location: Argentina

Post by Ricardo »

heyvern wrote: I am using the house project as the example file.
Good!! I will be waiting to watch the tutorial :)
----------------------------------
Im a software developer, my apps:
Mp3Doctor
SuperMp3Normalizer
Post Reply