[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 [*]):
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!).

A week ago I said
... tight curves appear 'copied' rather than extruded along the most extreme curved edge. But the math to get that right is horrible.
and I stand by that. The problem is how to calculate a tangent to a bezier curve at the precise angle (dx/dy), and I'm not that good in math.
Fortunately, many roads lead to Rome (and if you happen to be a true Roman, many roads lead away from it as well). I chose the easier road: I added a piece of code to sub-divide each curve into straight segments and used that to add the drop box segments. Sub-dividing random curves into a fixed number of straight lines sometimes leads to unseemly angles, especially if the entire curve is rather large, or it bends around itself tightly. So I added the 'flatten path' box: a high number will lead to a more precise curve (because more segments are created), but will make the script run slower. Try a higher value if you are not satisfied.
The subdivision code appears courtesy of Maxim Shemanarov, one of my heroes, as he singlehandedly programmed an entire low level antialiased graphics library! It seems he has no problems at all with the required maths... (Do visit www.antigrain.com if that sounds interesting!)
The new script is downloadable from my site: http://www.jongware.com/binaries/extrude-1.02.zip

Similar Messages

  • Images in supporting object script

    I have noticed in Dene's application* that he has images in the supporting object script. I wanted to do this a while ago** but left images to be installed after the application using the separate import image function. Obviously, I would like to reduce this step to install in one shot. Is this possible or will it be in 3.1?
    Phil
    * http://htmldb.oracle.com/pls/otn/f?p=31517:90
    ** Re: Packaged app - image script problem

    Solved this by doing some research - did an image export from the application and then replacing the application ID in the script with v('FB_FLOW_ID')
    ( Re: Installed APP_ID in supporting objects seed data Thanks Scott!)
    Phil

  • Ai, 3D effect - after using to either extrude or revolve the settings are retained in my drawing tools - pen, pencil and shapes. Example I draw a 50 pt extruded object in wireframe, isometric view and my pen and all drawing tools will only draw using thos

    Ai, 3D effect - after using to either extrude or revolve the settings are retained in my drawing tools - pen, pencil and shapes. Example I draw a 50 pt extruded object in wireframe, isometric view and my pen and all drawing tools will only draw using those settings. I can not exit, help please!

    Appearance panel menu > New art has basic appearance.

  • Help with adding a progress bar to my compare-object script

    I have a simple compare object script that I would like to add some kind of intelligent progress bar or countdown timer to.  The script takes anywhere from 1-12 hours to run depending on the folder sizes.  Here is the script:
    $internal = Get-ChildItem -Recurse -path C:\Folder1
    $external = Get-ChildItem -Recurse -path C:\Folder2
    Compare-Object -ReferenceObject $internal -DifferenceObject $external | Out-File C:\compare_list.txt
    I have a progress bar script that I found but I do not know how to implement it into my existing script.  Here it is:
    for ($i = 1; $i -le 100; $i++) {Write-Progress -Activity 'counting' -Status "
    $i percent" -PercentComplete $i ; sleep -Milliseconds 20}
    Any help is much appreciated.

    Hi Brisketx,
    In addition, to add a Progress Bar to Your PowerShell Script, this article may be helpful for you:
    Add a Progress Bar to Your PowerShell Script:
    http://blogs.technet.com/b/heyscriptingguy/archive/2011/01/29/add-a-progress-bar-to-your-powershell-script.aspx
    I hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • 3D Extruded Object in Illustrator to AE for animation

    Hi all,
    I'm attempting to create a 3D extruded object in AI and import into AE for inclusion in an animation.  I'm fairly new to the software suite and perhaps am ignorant of its capabilities still.  I have sucessfully created the extruded object in AI, basically it's a badge logo.  I imported the AI file as an asset into my AE project.  I drop the AI file into the timeline, enable 3D for hte layer, and attempt ot spin the logo.  The logo only appears 3D or to have depth to one angle rather than the entire object itself.
    Here's where the potential ignorance comes in: is what I'm attempting to do even possible?  Or does a true 3D object require another piece of software?  Or is there some way to extrude an object inside After Effects?
    Thanks for the input,
    Lindsay

    The results of 3D extrusion in Illustrator is actually two dimensional art - there's no way to manipulate that extrusion in 3 dimensions outside of Illustrator.
    Photoshop, however, now allows 3D object creation that can be imported into After Effects as a 3D object, although with some caveats.
    A number of third party plugins provide far better 3D capabilities inside AE, including Zaxwerks 3D Invigorator and Boris Continuum. 
    3D extrusions can also be faked using the included Shatter plugin, as this Creative Cow tutorial shows.

  • Problems with 3d extruded objects

    my 3d extruded objects have open spaces or voids on some of the surfaces
    Message was edited by: owl51

    this was done with CS5

  • Replace smart object script

    Disclaimer: I do not know how to script, but am willing to learn and am looking for advice.
    I need to replace the text in a smart object from a data list then save the updated file using the smart object text. Is there an existing script that will do this?
    I cannot use a straight text layer because I'm performing a free distortion warp on the smart object that does not work on straight text. Using variables seems like a logical solution, but the only variable type for smart objects is "visibility".
    Plan "B" is to "replace smart object" with a series of PSD files containing the appropriate text. This works great, but I don't know how to automate it. I can easily create the series of PSD files using variables, but don't know how to automate their insertion into the template containing the distorted smart object.
    I'm looking forward to learning something new!

    I took a quick look at your script.
    I do not know where the the displacement map come in,
    The script seem the be replacing the object content of the current smart object layer.
    That layer can have had all sort of photoshop functions associated with it and has an associated transform.  All smart object layer have an associated transform and may have smart filters and filter mask as well.
    I see no code to handle the smart object size and make the replacement object have the same size or insure the replacement object is the aspect ratio and size.  Replacing  a smart object content does not change the current layer's associated the transform that transformed the original object. If the replacement object is not the same size as the original object the transform may not work like your expecting.
    An associated displacement map may come into play because of smart filters on the smart object layer. Displacement  maps content are either for the layers content or for lower layers content to make the current layer to conform to lower layers contours.
    In fact I create a four image picture package template that used a smart object for the image. Added CS2 for a file type that could be used to replace the image  in your script and ran your script.  It did pop up the ACR dialog if I select a raw file but it worked perfectly for my portrait cr2 files are the same size and aspect ratio. Ast the object.
    And a jpeg was saved to my desktop.
    When a different size landscape orianted portrait image is selected here is the result

  • Photoshop COM Object Scripting via PhP

    Has anyone had any joy creating a photoshop COM Object using PhP?
    Normally you would do something like this :
    $ps = new COM("Photoshop.Application.8") or die ("Failed to initialize.");
    var_dump($ps);
    I can see photoshop launched in the task manager, but when run in my browser appears to be stuck in a loading cycle, no output of the Object.
    Doing this :
    $ps = new COM("Microsoft.XMLDOM") or die ("Failed to initialize.");
    var_dump($ps);
    Correctly outputs 'object(com)#1 (0) { }'
    ie. an initialized XMLDOM COM object.
    If i can initialize Photoshop as a COM object i should be able to script it directly in PhP, rather than using the command line to execute a droplet that calls an action to execute a VB/JSX Script.

    I would like some information on this as well...

  • Roles and Object Scripts

    I need to know if someone has scripts to obtain this info or they know any tools that can be used...
    1. List of roles available in the database, their full description and circumstance used
    2. List of object and system privileges for every role.
    Best regards,
    Ashish nanda

    The view DBA_ROLES lists all roles in the database.
    The view DBA_ROLE_TAB_PRIVS lists all object grants granted to roles.
    The view DBA_ROLE_SYS_PRIVS lists all system privileges granted to roles.

  • Object Scripting Tool

    Newbie question here: Is there a tool to script all objects in a schema? I want to move several schemas from a 2000 server to a Sun Solaris server. I don't need to move the test data, just the tables, views, triggers, etc. I found in EMC (9i) where I can script one object at a time, but there are several thousand objects to move over.
    Thanks in advance!

    Newbie question here: Is there a tool to script all objects in a schema? I want to move several schemas from a 2000 server to a Sun Solaris server. I don't need to move the test data, just the tables, views, triggers, etc. I found in EMC (9i) where I can script one object at a time, but there are several thousand objects to move over.
    Thanks in advance!

  • How can I create a snap to object script?

    Can anyone lend some advice or knowledge on this topic. I am wanting to in essence create a puzzle with pieces that when you drag the object you can only drop it back where you got it from or into the correct spot.
    Before I waste your time let me clarify a bit more. It isn't really a puzzle(I figured that would be the best way to visualize what I was explaining) Basically it is an object that when dragged to the right spot will (snap to) or drop into place. If it is dragged to the wrong spot then it will be forced back to where it was originally.
    Hope that wasn't too confusing lol

    use the _droptarget property of movieclips to determine if your dropped item is dropped on the correct spot or not.  assign the dropped movieclip's _x and _y properties based on this.

  • Export DDL for current schema (feature request "Creation of Object script")

    Hello Raptor-Team,
    to generate a DDL script for my current schema, I tried your suggestion on SQL Developer Exchange to click on "other users" and then select my user. Wait a minute... where is my current user in this menu? Am I missing something? ;-)
    As this technique seems to make sense only with DBA users exporting other schemas, I'll log a new request for the often-desired one-button-current-schema-DDL-generator...
    Best regards,
    --==/ Uwe \==--

    Nope - you're not missing something. I've logged it. Sorry. I know suggesting connecting as SYSTEM and then selecting other users is not what you are after, but if you have access to SYSTEM, that's be a solution. Alternatively, you just have to expand each node type and select the top level category.
    Sue

  • Script to copy all the objects within a Stored Procedure

    I am trying to copy all the objects from one database to another using Scripts. Now I need to put that script inside a Stored Procedure.
    Thanks.

    Refer this vbscript to generate all object scripts programatically,
    http://www.codeproject.com/Articles/16195/How-to-Script-Out-SQL-Server-Objects
    or
    Using SSMS
    http://msdn.microsoft.com/en-IN/library/hh245282.aspx#GenPubScriptWiz
    Regards, RSingh

  • Acrobat Script Object

    Hello,
    I have xdp forms dedicated for WF in the Livecycle Workflow server.
    The user has only a dynamic PDF format.
    In my forms, I have some scripts that use the Acrobat objects scripts:
    -XMLData.parse
    -XMLData.applyXpath
    Since they are not XFA objects scripts, I cannot play them at the server.
    Is it possible to execute them at client-side only based on the Acrobat Reader?
    Or another solution that does not use the Reader Extensions?
    Thanks in advance for your feedbacks.
    Best Regards,
    tina

    Hi all,
    Thank you for your first answers.
    I uploaded my forms in the Workflows with which they are supposed to work with.
    What is strange, is that the scripts with XMLData.parse and XMLData.applyXpath do not work in the workflow context.
    neither client-side or server-side.
    I mean when I test my forms standalone via the Form Designer PDF preview (with Acrobat Pro and Acrobat Reader),
    the execution of the scripts works.
    But when I access the form via the Form Manager to start a workfow:
    the scripts are not done.
    Is it normal that these 2 functions, do not work in Workflow context but work in a form standalone?
    Thank you for your help,
    Best Regards
    Tina

  • Has anyone used the IC Interactive scripting editor for the Webclient ?

    We originally received the 'Loading %0' message when loading the editor via the IC_MANAGER business role. This was overcome by updating Java (See note 717921).
    However, the editor now seesm to working, I can see two examples as standard, but when I click on them I do not see anything.  I've ifnored this issue and have started to create my own question and answers in preparation for a script.
    However, I have hit a few quirky things while using editor. Am I alone in this, or is this just the way it is.
    I'm using the latest version of CRM 7.
    If anyone's used this script editor I would dearly like to hear from you, especially in avoiding any upcoming nasties that I may hit.
    A perfect example of this kind of problem is in how you create 'Answers'. If I highlight the answer section and click on the 'Create' button I have the options to create the following: Field, Objective script, Question, Action, Button and script, of which none of these are what I want. I can however create a question with an answer section, but of course when it comes to dragging a answer in to the answer box I can't do this as I can't create any answers. Am I missing something?.
    With regards
    Jason

    Hi,
    We are facing similar kind of problem in our scenario "Loading 0%". We have crm7.0, IE6 and JRE 1.5.0 version.
    Kindly help us, which version of JRE do we need to use?
    we reffered notes: 1105843, 717921. However this did not help us.
    Kindly help us.
    Thanks!

Maybe you are looking for

  • Is there a way to pass files to a LV app in Mac OS X?

    There is an option in the Finder in Mac OS X to open files with the specified application. I tried it with my LV app, but unfortunately I haven't found any way to read out the filename passed to the app. (The Application/Command Line Arguments Proper

  • Implemention of JAAS+servlet+jboss+sql database

    Hi, I am trying to implement JAAS for login module using code and CallbackHandler( ie lc = logincontext(...).), but i got a sample code which is used for commandline execution, but i need to implement in web application, what all are the files that i

  • Validation "is a valid date" does not pass but Apex proceeding anyway

    Hi, I have a simple date-item which I validate first against "not null", then for "is a valid date", then that the date is not in the future. In debug mode the first validation passes, the second ( is a valid date ) does not pass, but the validation

  • Can't change stroke weight - help?

    It seems Illustrator has locked the stroke weight to a minimum of 1pt, which presents a big problem... How do I unlock it to be able to reduce stroke weight below 1pt? BTW I'm using CS4. Any help is much appreciated. Thanks

  • Why I can't share safari with Facebook?

    why I can't share safari with Facebook?