Script or Plugin

Hi guys, this is my first attempt at writing any script for 3DC but I’ve had alot of fun with it. I took Geo_Jenner’s original fragment script and added support to copy normals over to the new fragments. I also fixed various problems with the way the fragments were being created. There were some faces being left out and duplicates of other faces/points/texture coords were being made that weren’t necessary.

I am still working on the script and I am planning on making an option to create random sized, contiguous fragments. This would be a great way to record several different explosions of the same object. It should also look great because there won’t be seperated faces within the same fragment.

I also have yet to edit the group script posted by Geo_Jenner yet. Although, when I am satisfied with the fragment object script I might give it a go. Someone with some decent knowledge of physics could really make some awesome group scripts for the fragmented pieces like Les mentioned.

For those interested in checking out the script, it can be found on [img:2t4gyu1b]http://handwired.home.mchsi.com[/img:2t4gyu1b]
my website
under the 3DC section.

Mad props go out to Geo_Jenner for laying the groundwork to make this script possible, and to Les_Patterson for inspiring him <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

Hi Les.
andnbsp;I like it. Trying to shot off parts of a ship without blowing the whole thing up with the burst/swirl ? andnbsp; andnbsp; andnbsp; <!– s:D –><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" /><!– s:D –>

andnbsp; KB

Or maybe a ship slowly falling apart as it hurtles through space? With its engines blowing apart as they drift behind?? andnbsp;:oops:

Hi All,
First let me say that I have no clue about how to write scripts or plugins, so I don’t know if this would even be possible, but I will ask again anyway.

Would it be possible for one of you very talented folks to write a script or plugin that would seperate(break up) an object at irregular points or intervals?

Here are a couple of things it might need to do;

1) Allow the user to designate an area, or multiple areas of the object where the irregular separation(s) would occur.

2) Once the separation has been accomplished, designate each part or piece of the original object as a separate object so that rotation or other effects can be applied for animation purposes.

Note:
Irregular separations would allow for a much more realistic look to explosion animations and would also allow for secondary explosions within the different objects. This could be used for buildings, airplanes, automobiles, spacecraft, and more.

I’m hoping this will be just the sort of challenge that would spark someones interest, but if not then just tell me to shut up and I’ll be quiet….. ;D

Thanks guys,
Les

Hi

All this sounds very very very good <!– s:D –><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" /><!– s:D –>

James

Hi

All this sounds very very very good.

James

very fun.
first problem is you can’t andnbsp;make multiple selections of one object.
Easiest way I see to do it is to manually break up your object into many objects. andnbsp;Then you can assign a component script to each object defining the way it flies away. andnbsp;That would be fairly easy.

Or you can have one object and a script that breaks it into objects somehow – perhaps by material definition.( but then you’d have to pre-assign the materials so same as first way really).

Or you have two scripts – the first is a modelling script that parses the object and makes andquot;bitsandquot; of it. andnbsp;These could be defined in a file. andnbsp;Then your component script reads that file for the animation.

The hardest bit would be defining your irrecgular bits. andnbsp;Try this – say you have an object with 100 faces. andnbsp;Break it into 10 pieces. andnbsp;say faces 1-20, 21-29,….91-99. andnbsp;Would still be best to make a new object of the peices so your component script could just move the objects.

Make sense? andnbsp;Hope someone thinks of an easy way.
George

hi,
andnbsp;
andnbsp; andnbsp; andnbsp;my thoughts aswell, easy way out.

James

Hi Guys,
Thanks for all the replies. Separating an object can be done at the modeling stage, but its a tedious task getting every part or component to be just right. Then I have to copy/paste the different parts into a new scene as separate objects, and reassemble them, which is another very tedious task……hehehe.
Was hoping for an easier way out……. ;D

Let me know if you get any ideas?……. ;D

Les

for some reason I can’t post the poxy animation

try this file if you want to see

[img:1lnxsb6k]http&#58;//users&#46;skynet&#46;be/gj/3DC/scripts/groupout&#46;zip[/img:1lnxsb6k]
<!– m –><a class="postlink" href="http://users.skynet.be/gj/3DC/scripts/groupout.zip">http://users.skynet.be/gj/3DC/scripts/groupout.zip</a>&lt;!– m –>

On the other hand, it doesn’t seem to be possible to run a script or plugin in animation mode. :-/
KB

well I wrote half a script that don’t work but I’ve come to this conclusion – at least I’ve come to how I would do this.

first andnbsp;- write a normal script to break your object into pieces. andnbsp;Create a new group and put the pieces as objects in that group. andnbsp;I did this by breaking the object into an array of 10 fragments which contain faces with contiguous numbers. andnbsp;If you use random number of faces in each fragment, the result might look like a blown up object. andnbsp;Maybe

second – write a group script to animate the pieces. a bang wouldn’t be too hard if the pieces leave the scene with constant velocity and a random angle.

gotta go

3rd try

Hi Paul,
andnbsp;Would a script be posible with adjustable parameters for the burst, swirl, adjust operations, that could be applied to the resulting seperate objects? In the same way PSP8 lets one run frequently used tasks. I tried inserting a picture of PSP8’s script but keep getting a server error.
andnbsp;KB

sure you can. andnbsp;You can assign a script to a group.

For example (and this was quicker to write than doing the poxy attached animation tanj tanj <!– s:-| –><img src="{SMILIES_PATH}/icon_neutral.gif" alt=":-|" title="Neutral" /><!– s:-| –>)

Language = VBScript

Sub AnimateGroup (Time, 3DCGroup)

andnbsp; andnbsp; Kids=3DCGroup.GetChildCount
andnbsp; andnbsp; for siblings=0 to Kids-1
andnbsp; andnbsp; andnbsp; andnbsp; set KidGroup=3DCGroup.GetChild(siblings)
andnbsp; andnbsp; andnbsp; andnbsp; KidGroup.GetPosition Nothing,x,y,z
andnbsp; andnbsp; andnbsp; andnbsp; KidGroup.SetPosition _
andnbsp; andnbsp; andnbsp; andnbsp; andnbsp; andnbsp;Nothing,Time,x+(cos(siblings)*Time)/10, _
andnbsp; andnbsp; andnbsp; andnbsp; andnbsp; andnbsp;y+(sin(siblings)*Time)/10,z+(cos(siblings)*Time)/10
andnbsp; andnbsp; next

End Sub

To do this animation several objects in the scene, each in its own group. andnbsp;Then make a head group to put all the little groups in. andnbsp;Then right click on the main group in the heirarchy and open a group script. andnbsp;Put in the code and press the animate button.

Clear?

Thats wild, George. I was tring to run a script from other than 0 in the time line. Can a delay be inserted into the script?
Another question-When I saved the script into the andquot;run scriptandquot; drop down I get
andquot;The script does not include the required andquot;Mainandquot;. Edit the script.?
I get the same error with another script [flair extrude, I think] any ideas?
I’m sure you’ve been asked this before but where would one get his/her feet wet in scripting? I’ve done some HTML
and thought it was fun. Or does it just hasten ones way to the funny farm?
Thanks, KB.

andnbsp;The other script was andquot;textureAnimationandquot;, not andquot;FlairExtrudeandquot;.

You must be logged in to reply in this thread.

25 posts