Skip navigation
Home/Support/

Forums

2866 Views 12 Replies Latest reply: Jan 7, 2010 10:30 PM by jay fresno RSS
[Jongware]-GfBROo Star 5,362 posts since
Dec 17, 2006
Currently Being Moderated

Jul 18, 2009 4:15 PM

[JS] 3D Extrude Object Script

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!).

  • Ildhund User 595 posts since
    Oct 19, 2008
    Currently Being Moderated
    1. Jul 18, 2009 5:29 PM (in response to [Jongware]-GfBROo)
    Re: [JS] 3D Extrude Object Script

    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

  • Loic_aigon User 728 posts since
    Apr 18, 2007
    Currently Being Moderated
    6. Jul 23, 2009 3:10 PM (in response to [Jongware]-GfBROo)
    Re: [JS] 3D Extrude Object Script

    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

  • Loic_aigon User 728 posts since
    Apr 18, 2007
    Currently Being Moderated
    8. Jul 24, 2009 1:16 AM (in response to [Jongware]-GfBROo)
    Re: [JS] 3D Extrude Object Script

    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

  • jmvrankin User 6 posts since
    Sep 14, 2009
    Currently Being Moderated
    9. Jan 5, 2010 10:57 AM (in response to [Jongware]-GfBROo)
    Re: [JS] 3D Extrude Object Script

    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

  • jmvrankin User 6 posts since
    Sep 14, 2009
    Currently Being Moderated
    11. Jan 6, 2010 11:28 AM (in response to [Jongware]-GfBROo)
    Re: [JS] 3D Extrude Object Script

    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

  • jay fresno User 1,258 posts since
    Apr 12, 2007
    Currently Being Moderated
    12. Jan 7, 2010 10:30 PM (in response to [Jongware]-GfBROo)
    Re: [JS] 3D Extrude Object Script

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

     

    script.jpg

More Like This

  • Retrieving data ...

Bookmarked By (0)