Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

3d E for Carl (and whoever) 2

Status
Not open for further replies.
ps: I'll write a very brief FAQ tonight or tomorrow so that you can make more for yourself. (that took me 15 minutes, so you could make the alphabet in a day) dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
dave that zip link is dead..
e.gif


virtuality2001@aol.com
 
thanks man..appreciated..
e.gif


virtuality2001@aol.com
 
dave one more thing..the e is rolling over from top to bottom..or something..instead of rolling like that..how about rolling from right to left..as if the bottom of the e was flush to the floor..and spinnig to the right..
e.gif


virtuality2001@aol.com
 
dave if i drag that movie clip onto my timeline the e shows but it does not spin..what am i doing wrong..if you were to open that as a shared library and want to add it to your exsisting time line..how would you do it..
e.gif


virtuality2001@aol.com
 
the reason it doesn't show is becasue the mc's in the movie are not targetted movie-independently. ie: if you convert it into it's own mc, you have to reconfigure the targetting within the main mc.

If re-jigged the scripting so that you can drag the thing in as an mc. The name of the mc is 'E' in the Library.


dave
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
I posted this on another thread but this ones more relevant...

Hey Virt, you probably have heard of it already but theres a package called Swift3d ( which you can use to create and export any 3d shapes or animations direct to flash, including wireframe and fully rendered versions. Its incredibly intuitive and simple to use, and costs about $120 which is amazingly cheap for such a cool application. I have been using it for 3 weeks now and the possibilites are endless. Nick Price
nick.price@misuk.net
 
thanks dave..
e.gif


virtuality2001@aol.com
 
yeah, ER's Swift is good if you want fo fork out for it and don't have access to Max or Viz (which costs thousands).

I've never had a copy of Swift because Electric Rain removed the Trial Download from their server almost immediately, so there was no 'try before you buy', you just have to trust that it does what you expect. Understandable that they removed the download, because of all the cracking going on today, but for someone like myself who buys software it just isn't attractive enough.

Also, what about the interactivity? The original of the above is in use at as an interactive feature. ie: when you rollover different buttons it spins in different directions. Does Swift have that capability?

bye for now
dave
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
just read the other thread, completely forgot about the file-size issue mentioned by Carl. The above movie consists of a single line (not including the 'davdesign' and fill area), the rest is actionscript to make the 'E' shape. I think the file size is about 6K, next to nothing for the effect and no doubt less than the same exported from swift/viz/max.

RE:poser. Noticed you mention Poser in the other thread Carl. We just bought our's this week, very nice stuff indeed. Expands the business big style with a single piece of software. Did you find the Goodies on the Flash CD which contain poser created swf's?

dave
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
no i have not dave..and yeh poser is nice..dave another favor(i know i know)..from the looks of how you did this you have one of the bottom lines of the E as the set line(or i'm guessing the axis) for which the E spins..can you make the axis line one on the back side of the E so it spins to the right as if the bottom were flush to the floor..
---------
-
-
---------
-
-<------------this line the axis
---------

so that way it would spin to the right..if you would please..
e.gif


virtuality2001@aol.com
 
nice doodle!

OK. I'm going out for a meal with the wife, so I might not get this done before I go. You do love to complicate matters don't you?

The system used in the FLA is based on a 3-d (ie: x,y,z) co-ordinate system (this will all be explained in the FAQ, but I'll just give you a summary for now, I don't expect you to take this info and be able to understand it just yet).

For each 'node' in the 3-d shape you have a co-ordinate in space. If you draw a block outline of an 'E' on a piece of paper, what you see is the outline in the x-y plane. If you draw x/y axis on the 'E', where the x-axis starts (ie: the origin) at the bottom-left corner of the 'E' and extends to the right, and the y-axis starts in the same place and extends upwards, the you have the makings of a graph to work out the co-ordinates of every 'node'.

Now, if you left it at that it would be fine, but you would have a spinning 2-d wireframe (would still give a 3-d-esque effect, but of a 2-d object). To get the 3-d effect, you recreate your graph the exact same way. Now on the first graph, number the nodes, starting from where you want the object to spin from (on my 'E' it was the top-left node), and continue numbering in a clock-wise (to makes things easier) direction. Now continue the numbering on the second graph, starting at the same point and moving in the same direction (so if you finished numbering at 12 on the first 'E', the first node of the second 'E' would be 13). Remember to use 01,02,03 notation rather than 1,2,3.

OK, you've got your 2 graphs and you've numbered the nodes from 01 through 24 (in the case of the 'E'). Now you can start working out the co-ordinates for each node. The rule I use is to make the node furthest away from the origin the value 099 (don't go over this value). So in the case of your 'E' the (x,y) co-ordinates of the top-left node would be (0,99) or for the purposes of the FLA: 001,099 (because 000 isn't recognised). To give another example, the topmost right-hand node would have (x,y) co-ordinates: 060,099. Once you have done the first 'E' the second 'E' has the exact same (x,y) co-ordinates for each node (only the node numbering is different at this stage).

So now you have:

>> two graphs of a letter 'E'
>> 24 nodes numbered independently
>> 12 x,y co-ordinates relating to each node, repeated for the second 'E'

At this stage we get into 3d land. As you can imagine, the 3d 'E' consists of your two 'E's, placed one behind the other and linked by lines at each corresponding node between the two 'E's. These linking lines lie in the z-axis. If you look straight ahead at your (x,y) 'E' which you have drawn, then your z-axis goes 'into' the page.

Now, the first 'E' will be closest to you, so we can give every node on the first 'E' the z-axis value of 0 ( or 001). Thus, you simply add ',001' to the end of all the co-ordinates you worked out for the first 'E's nodes. So, the value of the bottem-left node becomes 001,001,001....the top-left node becomes 001,099,001....the topmost-right node becomes 060,099,001.

For the second 'E', choose a value which relates to the length of the lines connecting the two 'E's in 3d space. In the fla I made for you this vale was 20 because it equalled the length of the shortest side. So, with 20 as the z-axis value, the co-ordinates of each of the node in the second 'E' have ,020 added onto the end:

bottom-left: 001,001,020
top-left: 001,099,020
topmost-right: 060,099,020
etc

So now you have:

>> two graphs of a letter 'E'
>> 24 nodes numbered independently
>> 24 x,y,z co-ordinates relating independently to each node on both 'E's

Now comes the slightly tricky part, if anything lets you down it will be this (and something does usually go wrong here). We're now going to tell the FLA which points are joined together, and this is why we numbered in a clock-wise direction: to make this bit easier. OK, if you've number correctly then node01 will join node02, node02, will join node03, etc, etc. So just write a list thus:

0102
0203
0304
0405
etc

for all nodes on each of the two 'E's. You should have 24 in all at this stage (one for each line on the two 'E's).

Now, add to this list the lines which join the two 'E's in the z-axis. So the first node of the first 'E' joins the first node of the second 'E'. If you've numbered the nodes as I've described, the addition to the list should look like this (there will be 12 values):

0113
0214
0315
0416
.
.
1123
1224


At this stage we get into 3d land. As you can imagine, the 3d 'E' consists of your two 'E's, placed one behind the other and linked by lines at each corresponding node between the two 'E's. These linking lines lie in the z-axis. If you look straight ahead at your (x,y) 'E' which you have drawn, then your z-axis goes 'into' the page.

Now, the first 'E' will be closest to you, so we can give every node on the first 'E' the z-axis value of 0 ( or 001). Thus, you simply add ',001' to the end of all the co-ordinates you worked out for the first 'E's nodes. So, the value of the bottem-left node becomes 001,001,001....the top-left node becomes 001,099,001....the topmost-right node becomes 060,099,001.

For the second 'E', choose a value which relates to the length of the lines connecting the two 'E's in 3d space. In the fla I made for you this vale was 20 because it equalled the length of the shortest side. So, with 20 as the z-axis value, the co-ordinates of each of the node in the second 'E' have ,020 added onto the end:

bottom-left: 001,001,020
top-left: 001,099,020
topmost-right: 060,099,020

So now you have:

>> two graphs of a letter 'E'
>> 24 nodes numbered independently
>> 24 x,y,z co-ordinates relating independently to each node on both 'E's
>> 36 node-to-node values

Final stage
OK, grab you're list of co-ordinates and write them in a single line (I do this in notepad so that I can view the line as I'm doing it, rather than typing it striaght into the Action window), separate each of the node co-ordinates with an 'R', thus:

001,001,001R060,001,001R020,020,001R.........etc

Do the same for the node-to-node values, thus:

0102R0204R0403R0305R0506R...........etc

Now, open movie-explorer and double-click on the actions for frame1 of the mc '3d-movie'. Insert the following into the variables already set:


//the number of nodes
totalpoints = &quot;24&quot;;

//the co-ordinates of each node
points = &quot;001,001,001R060,001,001R020,020,001R.....etc&quot;;

//the number of node-to-node lines
totallines = &quot;36&quot;;

//the node-to-node list
lines = &quot;0102R0204R0403R0305R0506R...........etc&quot;;

//the following line determine's how 'close' the
//3d object spins to the viewer (ie: the perspective)
//experiment with this
eyez = &quot;300&quot;;

//the following variable sets the distance of
//the 3d object from the viewer
//experiment with this
zoom = &quot;100&quot;;


OK, that's it in a nutshell. Guess I've just written hlaf of the FAQ already! But at least you can have a go at creating a shpae yourself now.

I'm off for dinner with my lovely wife. I'll see you later.

dave
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
Lest I forget to tell you. If you want the origin to be:


---------
-
-
---------
-
-<------------this line the axis
---------


Then you simply shift the 'E' sketch below the x-axis and use negative values for everything below the axis. Negative values take the form of 3 figures, thus:

-20,-05,-99
etc

ie: NOT -020,-005,-099

HAVE FUN ;-)

dave
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
jeesus dave..my head just exploded..
e.gif


virtuality2001@aol.com
 
LOL Well, you asked for it. I'll finish off the FAQ tonight/tomorrow. In the meantime try the above and see how you get on.


dave
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
Guess the FAQ will be three lines long! Including the signature! LOL
old.gif
 
have a go at it? yeh right..i don't even know where to begin..i just read all that and i'm still lost..i mean i understand the 2-d and the 3-d thing..i understand graphing the nodes that's just basic algebra
(by the way not my favorite)..but understanding it and actually starting on it..wow..i mean jeesus man i'm just know to the point where my file sizes are low..my tweens are all tight(not jumping all over)..my actual templet designs are looking ok..but to have a go at this..i would have to actually see all the steps first hand to completely understand..so unless your coming to florida any time soon..
e.gif


virtuality2001@aol.com
 
LOL Old: what do you mean three lines, sheesh, the FAQ will be 2!! LOL (albeit there will be no full-stops or commas).

The best way for you to understand this is for me to scan in the A4 sheet of paper I planned the FLA on, ie: my sketches of the 'E's as I described above. I'm sure it will make it much easier to understand. I know the above is a lot to take in in one swoop, but that is just the easy bit, believe me. The above just explains how you 'create' the 3d shape, it doesn't say anything about how the FLA takes those co-ordinates and makes them 'spin'. That's gonna be the tough bit for me; writing an essay on the bit you need to know was the first priority but I'll amplify it through the night so that it becomes crystal clear(er).

Hand on heart, I hadn't even looked at that script since about January. What I mean when I say that is that once you've got the 'jist' of it, you never forget! I guess you understand what I mean.

Anyway, I'll scan in my notes when I hook up my scanner (still unhooked from the virus incident). Then the pretty picture will be painted for you.

take it easy
dave
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top