HP Sauce Posted December 2, 2009 Share Posted December 2, 2009 How would one go about scripting such a thing? Usage in example: Ten image prop symbols of a bush are placed at Z0. The user selects the symbols, executes the script, and is asked for a minimum and maximum Z height along with a direction constraint (lower only for example). The script then randomly moves the symbols up or down on the Z plane. Quote Link to comment
MullinRJ Posted December 2, 2009 Share Posted December 2, 2009 Use Move3DObj(0, 0, dZ); to move an individual object. To generate a random value between to numbers, use the following function: function RandVal(LL, UL :Real) :Real; { Generate a random value in the range LL -> UL inclusive. } Begin UL := UL - LL; RandVal := Random * UL + LL; End; { RandVal } By sending the appropriate limits to the RandVal function you can control whether your objects move up or down. Raymond Quote Link to comment
Kool Aid Posted December 2, 2009 Share Posted December 2, 2009 How would one go about scripting such a thing? Usage in example: Ten image prop symbols of a bush are placed at Z0. The user selects the symbols, executes the script, and is asked for a minimum and maximum Z height along with a direction constraint (lower only for example). The script then randomly moves the symbols up or down on the Z plane. Shouldn't the symbols be Sent to Surface? In the absence of a DTM? Ah-ha! Lower only? Whatever. I must investigate this in relation to my Forest Simulator. Quote Link to comment
HP Sauce Posted December 2, 2009 Author Share Posted December 2, 2009 Forest Simulator... Gold! That looks like a great tool. Sent to Surface? No sir, this was purely for artsy renderings wherein a row of duplicated bush symbols are not all exactly the same height, producing a much more natural look. Thanks for the code snippet and direction MullinRJ. Quote Link to comment
MullinRJ Posted December 2, 2009 Share Posted December 2, 2009 You are welcome, Highpass Petri, your woods are lovely, dark and deep. Raymond Quote Link to comment
Kool Aid Posted December 3, 2009 Share Posted December 3, 2009 Sent to Surface? No sir, this was purely for artsy renderings wherein a row of duplicated bush symbols are not all exactly the same height, producing a much more natural look. Yes, a great idea, which I may incorporate into my tool, although the main workflow is that after the forest has been created, trees & shrubs are sent to surface. (I use it to create random tree covers as backdrops.) Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.