Workspace Array Tools

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Workspace Array Tools // The Garage

1  |  

Post by Délé // Aug 8, 2007, 3:17pm

Délé
Total Posts: 1374
pic
Ok guys, I converted the cluster scripts into a couple of array scripts for the workspace. They're not parametric, but they do have some scale settings so you can create some scale effects.


These work very similar to the cluster scripts so the same caution should be exercised.


IMPORTANT:

There are few things I want to make very clear. Please make sure you read and understand the following before using the scripts:


1. Make absolutely sure that the bridge is set to OFF before running any of the array scripts. It will very likely freeze up trueSpace. Always make sure the bridge is OFF before using these scripts.

2. Do NOT turn the bridge on after making many copies of an object with the script. Again, it can easily freeze up trueSpace.

3. Be careful not to set the number of copies too high. I suspect the amount of copies you can make will differ from machine to machine. I personally kept the number of copies below 1,000. It's up to you as to how many copies you want to try at one time, but know that too many could cause tS to freeze up.

4. Be careful how many copies you delete at one time with the script. When I tried deleting 1,000 at one time, my video driver failed twice and I had to restart my machine. So be warned. It's best to delete a large number of copies in smaller increments. 500 at a time worked just fine for me.

5. Do not try to encapsulate a large number of copies. I tried encapsulating 1,000 copies and tS froze up.

6. Make sure the desired object is selected before executing the script. If you have the script itself or any other object selected, it will make multiple copies of those. So make SURE that the desired object is selected prior to script execution.

7. Make sure your object has a unique name. By that I mean to just make sure it does NOT have a comma and a number, like (Object, 1). Something like (Object1) would be fine. The reason is because when trueSpace makes copies it adds a comma and a number. So when you use the script to clear a bunch of copies, it will delete your original if it has a comma and number.


How to use:

1. Click on the Handle (red sphere) in the 3d space and use that to position the area you want the array to be.

2. Use the "Copies" and "Spacing" to adjust the array area. The area automatically updates to how many copies you have set and the spacing you've determined.

3. Click on the tab at the top of the script to set the start and end values for the scale of the copies. The scale will taper from your start size to your end size.

4. Click on the "Default" tab and set the number of copies you want to make in each axis.

5. Select your object that you want to create an array of and the click the "Check" button. Just below the check button it will show you how many faces and verts will be introduced into the scene when you execute the script. This will help you from accidentally introducing more geometry then tS can handle.

6. Make sure your object is selected and then press "Create".

7. If you are not happy with the results or you want to reduce the number of copies, set the clear amount to the desired amount you want to delete, and press "Clear".


Keep in mind that it can take several seconds if not minutes to make/delete the copies, depending upon the number of copies you're making/deleting and your machine specs. I tried adding a progress reader to the scripts but couldn't get it to work properly. I personally just hover over the view widget to see if it's still working. If the widget highlights, that means it's done. If the widget doe not highlight, then the script is still working.

Post by Délé // Aug 8, 2007, 3:19pm

Délé
Total Posts: 1374
pic
Cube Array:


7869


Default Tab:


Check Button - This allows you to check the number of faces and verts that will be introduced into your scene before it is actually executed. This allows you to make sure your not going to bog down your scene too much. Just select the object you're planning to make an array of and then click the "Check" button. Just below the button you will see the faces and verts number update depending upon how many copies you have the script set to.


Invisible Checkboxes - The Handle and Area invisible checkboxes allow you to set the Handle or Area view to invisible.


Copies - Set the copies to the dimension that you want the array. How many copies you want in each axis. The "Total Copies" shows you how many copies will be created in all.


Spacing - Set the desired spacing you want between copies. The area will adjust according to what you have set for the copies and spacing. The "Total Distances" will show you the distance the array will be in each axis.


Clear Button - This allows you to delete copies. You can set a minimum and maximum amount below the button. For instance, if you have made 400 copies of an object and you want to delete the last 200, set the first value to 200 and the last to 400. Then make sure you have your original object selected and push the "Clear" button. It will delete the last 200 copies and you will be left with 200. If you wanted to delete all 400 copies just set the first value to 1 and the second to 400. I highly recommend not deleting more then 500 at a time. It can take several seconds, possibly minutes to update.


Scale Tab:


X, Y, and Z radio buttons - These will determine the direction of any tapering you have set.


Scale Start and End - Set these to whatever amount you want the scale to be. If both numbers are the same for an axis, then all copies will be scaled to that number for that axis. If you have different numbers, then it will taper the copies scale for that axis from the start number to the end number in the direction chosen with the radio buttons. So for instance, if you have the X axis start set to 1 and the end set to 10, the first copy will be a scale of 1 in the X axis and the last copy will be a scale of 10 in the X axis. The rest in between will scale incrementally. This will occur in the direction chosen by the radio buttons above.

Post by Délé // Aug 8, 2007, 3:21pm

Délé
Total Posts: 1374
pic
Cylinder Array:


7870


Default Tab:


Check Button - This allows you to check the number of faces and verts that will be introduced into your scene before it is actually executed. This allows you to make sure your not going to bog down your scene too much. Just select the object you're planning to make an array of and then click the "Check" button. Just below the button you will see the faces and verts number update depending upon how many copies you have the script set to.


Invisible Checkboxes - The Handle and Area invisible checkboxes allow you to set the Handle or Area view to invisible.


Look At Path Checkbox - If this is checked, the object copies will rotate following the circle pattern.


Copies - You can set how many copies you want in the circular "XY" axis, or how many you want in the Z axis. The "Total Copies" below will show you how many total copies will be made.


Spacing - You can set the spacing that you desire for the circular "XY" axis and the Z axis. The area will adjust depending upon how many copies and you have set and how much spacing you have set. The "Total Distances" will show you the distance the array will be in each axis.


Clear Button - This allows you to delete copies. You can set a minimum and maximum amount below the button. For instance, if you have made 400 copies of an object and you want to delete the last 200, set the first value to 200 and the last to 400. Then make sure you have your original object selected and push the "Clear" button. It will delete the last 200 copies and you will be left with 200. If you wanted to delete all 400 copies just set the first value to 1 and the second to 400. I highly recommend not deleting more then 500 at a time. It can take several seconds, possibly minutes to update.


Scale Tab:


Z, Circle radio buttons - These will determine the direction of any tapering you have set. If it is set to Z, it will taper in the Z axis. If it is set to Circle, it will taper around the circle.


Start/End - The start and end is used to determine the scale start and end IF the Z radio button is checked below. If both start and end are the same, no scaling will occur. It will just be scaled to whatever you have set in both. If one is larger then the other, then it will scale the copies uniformly from the start number to the end number in the Z axis.


First, Middle, Last - These are used to adjust the scaling when you have the radio button above set to "Circle". You can set the initial size, middle size, and last size. For instance, if you have the first size set to 1, the middle size set to 5, and the last size set to 1, the copies will scale from 1 to 5 and then back down to 1 again. So around the circle, the scale will grow and come back down.

Post by Délé // Aug 8, 2007, 3:25pm

Délé
Total Posts: 1374
pic
Again, here's a few very simple examples:


Cube Array:

7871


Cube Array:

7872


Cube Array:

7873


Cylinder Array:

7874


Cylinder Array:

7875

Post by Délé // Aug 8, 2007, 3:25pm

Délé
Total Posts: 1374
pic
Cylinder Array:

7876

Post by weaveribm // Aug 9, 2007, 3:09am

weaveribm
Total Posts: 592
Lovely work Dele

1,000 copies

Talking about GPU's in here nearby it strikes me that another useful tool for TS involving object arrays is the geometry instancing feature on modern graphics cards' hardware. Where TS programmers could (or perhaps have already) hook into that D3D (DX9) function. Which would make for more efficient memory use and so on especially for object numbers in the thousands

Peter

Post by Délé // Aug 9, 2007, 5:12pm

Délé
Total Posts: 1374
pic
Thanks weaveribm.


Interesting about the instancing. Not sure if it's possible through tS, or if it is how to go about it. Would be nice to find a way to speed things up though since tS isn't very good at handling a lot of objects at once. It's great with large polygon counts, but struggles with a lot of objects.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn