Skip navigation
[Jongware]-GfBROo
Currently Being Moderated

[JS] 3D Extrude Object Script

Jul 18, 2009 4:15 PM

Brought to the idea by dreamriverdesign's question of how to script a 3D box extrude from an image, I decided to try this for any object. It was a bit of a struggle, trying to get the curved lines just right, but I think I got it (almost [*]):

 

extrude.png

 

The script asks for the extrusion color and offsets, and can optionally combine the extrusion (making the black part above a single object) or leave it as numerous little objects, and/or group the extruded part together with the original.

 

Download the script from http://www.jongware.com/binaries/extrude.zip

It works on CS, I haven't been able to test on CS2, CS3, or CS4, so please report back if it doesn't work.

 

[*] It's almost right, because tight curves appear 'copied' rather than extruded along the most extreme curved edge. But the math to get that right is horrible. You'll just have to live with that, correct by hand, or ... adjust the script (and in that case I'd love to hear from you!).

  • Currently Being Moderated
    Community Member
    Jul 18, 2009 5:29 PM

    You are amazing!

     

    In CS3, the script choked on

     

    b.strokeStyle = app.strokeStyles[0];

     

    A quick look at Indesign CS3.chm showed that GraphicLines want a strokeType, so I replaced it with

     

    b.strokeType = "Solid";

     

    and it worked perfectly on polygons and outlined text. I haven't examined any curves too closely yet...

     

    Noel

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Jul 23, 2009 3:10 PM

    Hi Jongware,

     

    You are very full of surprises :-)

     

    Do you mind if I post your script in this forum ?

     

    http://creative.mediabox.fr/index.php?showforum=60

     

    regards,

     

    loic

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Jul 24, 2009 1:16 AM

    Hi Jongware,

     

    I am pleased about your answer. Your french is not rusté but "rouillé" ;-)

     

    I am posting your script asap on the Mediabox forum. I don't think we had the pleasure yet to see Marc Autret on this website but as the scripting section is new, maybe the javascript smells are going to tease him soon :-D

     

    I will encourage readers to post you comments.

     

    Congrats for your talent and scripting skills, I wish I have time to practicize more :-S

     

    Bye Loic

    |
    Mark as:
  • Currently Being Moderated
    Jan 5, 2010 10:57 AM

    Hi Jongware-

     

    I just tried the script with CS4 and it doesn't seem to do anything. Well, it looks like it's trying (I get a beachball cursor) but there is no result on the page. It works fine for me in CS3. In spite of the CS4 problem, I think it's very cool. Thanks.

     

    -Mike

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Jan 6, 2010 11:28 AM

    Hi Jongware-

     

    It works now! I don't think it was my short attention span since I was only trying to extrude a square, and it goes pretty quick now (nearly instant). Not sure but maybe restarting CS4 helped? I crashed last night and the script works like a charm today. I even enjoy taking apart the pieces of the extrusion to make other weird shapes. Thanks again!

     

    -Mike

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Jan 7, 2010 10:30 PM

    Jongware's script. Type on a path. Gradient fill. Outer glow. (Maybe I overdid it.)

     

    script.jpg

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Mar 1, 2012 8:13 PM

    YOU ROCK!!!!

    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)