Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2024 Dec 03 1:43 am)
Philc has got an Array script in poser toolbox, that may do what you want.
Of course, it is fixed distances, it seems.
For something like Carrara's Surface Replicator...there is a randomnization to the locations (which seems "addable" or makeable, based on something like PhilC's script as a base...for owner/personal use only of course)
...there is also spacing (i.e. when randomizing, don't choose a point that is within x/y from another (this seems the hard part)
...a randomnization to the rotations
...then you could use a drop to floor script on all of 'em.
I gotta believe that someone has a mathematical formula (random distribution of points or something) for it, then it takes someone to plug that into a python script for props
Here is a chap who had a similar quandry, and came up with something: Random Non-Overlapping Distribution of Objects
...and here is another loooong discussion on same topic: Random distribution of objects in space, with no overlap
Attached Link: randomize prop rotation values
**PhilC** and ****markschum**** made a script to randomize prop rotation values in this thread I guess with some modifications it could make what you wantSometime ago I wrote something quick and dirty that does this. It has no UI - you have to edit the values in a the parameters section of the code, near the top:
import poser, random
'''
ALL MEASUREMENTS ARE IN INCHES!!!
'''
PROP = 'RuntimelibrariespropsVegetationTreesBlossom tree.pp2'
XTRANSNAME = 'xTran'
ZTRANSNAME = 'zTran'
YROTATENAME = 'yRotate'
MAXIMUM_NO_OF_INSTANCES = 30
MIN_X = -500
MAX_X = 500
MIN_Z = -500
MAX_Z = 500
RANDOM_ROTATE = True
MINIMUM_SEPARATION = 100
GIVE_UP_AFTER = 8
scene = poser.Scene()
count = 0
rangeX = MAX_X - MIN_X
rangeZ = MAX_Z - MIN_Z
done =
print 'Starting prop generation ...'
while count < MAXIMUM_NO_OF_INSTANCES:
# Load the prop
scene.LoadLibraryProp(PROP)
prop = scene.CurrentActor()
print 'nProp #%s loaded' % (count + 1)
# Generate random co-ordinates
attempt = 0
give_up = True
while attempt < GIVE_UP_AFTER:
bx = (random.randint(0, rangeX) + MIN_X)
bz = (random.randint(0, rangeZ) + MIN_Z)
x = bx / 103.2
z = bz / 103.2
block = (int(bx / MINIMUM_SEPARATION), int(bz / MINIMUM_SEPARATION))
print 'Attempt %s: x,z = %s,%s, block = %s' % (attempt, bz, bx, block)
if not done.get(block, None):
done[block] = prop
give_up = False
break
else:
attempt += 1
if give_up:
print 'n--- GIVING UP!! ---'
break
# Place prop
prop.SetParameter(XTRANSNAME, x)
prop.SetParameter(ZTRANSNAME, z)
print 'Positioned at %s, %s' % (x, z)
# Rotate if requested
if RANDOM_ROTATE:
r = random.randint(0, 360)
prop.SetParameter(YROTATENAME, r)
print 'Rotated to %s degrees' % r
count += 1
print 'nAnalysis of prop generation:'
for k, v in done.items():
print 'Block %s : %s' % (k, v.Name())
Free stuff @ https://poser.cobrablade.net/
Works for me....but I dont understand the inputs? It says max coverage, but keeps failing for invalid max distance? Is it supposed to put the selected prop on another prop that you load, like a plane (first field)? What is the min and max coverage? (number of I assume means the number of props you are attempting to dup)
I just kept getting "invalid max distance"...never got it to do anything. :(
Quote - Works for me....but I dont understand the inputs? It says max coverage, but keeps failing for invalid max distance? Is it supposed to put the selected prop on another prop that you load, like a plane (first field)? What is the min and max coverage? (number of I assume means the number of props you are attempting to dup)
I just kept getting "invalid max distance"...never got it to do anything. :(
In my code, Min/Max X and Z is used to constrain the random generation to a square area defined by those values. The Min values need to be lower than the Max values.
Everything is placed at a yTrans value of 0 so no plane is needed.
The code isn't clever, but has been used enough (by others) for me to know that it works :-)
I don't have Poser with me at the moment so I can't see what Phil has done, but knowing him I don't doubt that it's something cool :-)
Have fun ...
Free stuff @ https://poser.cobrablade.net/
OK, so the first field, you have to select a prop (it does not use the selected prop in the scene, it will just say invalid distance or something)
For the other fields I put (this is using version 3 above):
Max x and z Tran in Poser - 25
Max x and z Tran in Poser - 10
Number of - 10
I did get 10 objects, but the first one was at x=1526.6, z=1382.7...all of them were way far away.
I was thinking they would be constrained to between 10 and 25?
I tried similar with version 2, and got the output below:
Starting prop generation ...
Prop #11 loaded
Attempt 0: x,z = -491,-495, block = (-5, -5)
Positioned at -4.79651162791, -4.75775193798
Rotated to 41 degrees
Prop #12 loaded
Attempt 0: x,z = -498,-489, block = (-5, -5)
Attempt 1: x,z = -485,-496, block = (-5, -5)
Attempt 2: x,z = -497,-496, block = (-5, -5)
Attempt 3: x,z = -493,-490, block = (-5, -5)
Attempt 4: x,z = -493,-489, block = (-5, -5)
Attempt 5: x,z = -491,-497, block = (-5, -5)
Attempt 6: x,z = -486,-488, block = (-5, -5)
Attempt 7: x,z = -494,-492, block = (-5, -5)
--- GIVING UP!! ---
Analysis of prop generation:
Block (-5, -5) : Blade_uvm_1
Max dist = 25
Min dist = 10
Num of copies = 10
Which Poser version and what OS are you using?
In 2012 in Windows the label reads "Max x and z Tran in Poser units." I'm aware that a Mac will do its level best to screw up the formatting and possibly trubcate the text. The size of a Poser unit does vary between versions but not by much. A average adult figure is about 0.75 Poser units high. If you put in values of 10 and 25 then yes the props will be very spread apart.
You can select what units the dials will display by going to Edit > General Preferences > Interface > Units.
I wanted to give it a try at making a distribution...so I just added another routine. There was not enough fields for the variables I used, so one of them is "fixed". The pic is with 3/3/200 (200 objects in a 3x3 area with a distance of 0.1). There is probably a better way to optimize that last loop (i.e. remove used values so there are less choices), but I just wanted to see if I could do it. :)
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
Something like ecosystem in VUE, even if on a much smaller scale?
Thanks