Sometimes ForestPack users wants to scatter groups (instead of collapsed mesh) and wants randomization which does not "explode" their composed geometry.
Lets see how can we do just that by creating floating lanterns on the river scene.Step 1
Starting with basic geometry items. Total of 4 pieces: Frame, Candle, Candle Flame, and Paper:Step 2
Let`s move every item to its intended position.
We should prepare Geometry, so all of the items have the same pivot location
First picture shows pivots in different positions. Second- in the same position, just as we need.
If You have a lot of objects, You can use script to set pivots for all the objects at once:
for obj in selection do obj.pivot = [Selection.center,Selection.center,0]Step 3
Easy one- Group Objects.
Now the fun part. Let`s add ForestPack object to the scene.Step 5
Choose "Custom Object": and select None to initiate object picking...Step 6This where it is tricky.
Instead of direct clicking your grouped composition, press "h" to open max "Select From Scene" dialog.Double click Your group name.
This how to add a group instead of only one object if You directly clicked.*Tip. If group were opened
, You could click group's bounding box
. It would be the same.
This is what we have right now:Step 7
Too bad default randomization messes up("explodes") whole composition.
Thankfully we can make randomization the same for all grouped objects, by sampling a map.
And since we made pivots in the same location, all composition items will get the same randomization.
Lets create a simple noise map:
... and instance it in all "Transformation" roll-out Map slots:
Result haven't changed, as we need to enable that map:
Check all "Map" Check-boxes and Uncheck "Probability Map"
I disabled rotation along X and Y axis by putting values to 0.
Result start to look like good:Step 8. Lights.
Easy way to make candles emit light is to apply light material to the sphere we created.
I use vray, so I chose VRayLightMaterial and added Forest Color for randomization:
3 maps to variate flame color and
Tint Override -black and white gray-scale map with multiply blending mode to variate light intensity:
My final scene looks like this:Bonus There is
another way to distribute real lights
instead of object with light-material.Caveat: Lights will not be dynamically linked.
So do it as the last step.
What we done so far is good, and only few steps are needed:Step 1
Detach Flame object from the group.Step 2
Geometry wont refresh automatically, so refresh it by adding the same group the same way.
This time there will be no flame:Step 3.
Lets copy (not instance) ForestPack object and replace Composition object with our flame object:
We got flames back as separate ForestPack object. Yey..!Step 4.
Replacing ForestPack with real light:
There is script to do just that. Realy easy, user friendly. Download it from forum here
Create Light You want to distribute.
Run the script.
Choose "Pick object to instance" Select Light object.
Select Your ForestPack Flame Object, and press "Instances to Forest" and press "Del" to delete ForestPack object.
Variable light intensity and color can be achieved using other scripts, like this one
That is it!
Final scene with scatter lights:
Hope You find techniques described here useful.
Now You should understand how to add groups to scatter. What are their limitations. And how to work around them.
How to scatter real lights with ForestPack Pro and this method drawback.
Let me know if all the steps were clear to understand. I attach my max file for You to check any details.