Itoo Software Forum
Forest Pack => Forest Pro (*) => Topic started by: in3des on October 06, 2020, 06:36:10 PM
-
Hi,
I'm trying to scatter roof stuff on top of the buildings using forest.
created rotation color map, it works somehow - but still objects not following desired direction.
screen_496 - UVs for roof
screen_500 - how I want all objects to be directed
Could you please help with the correct color map for this case?
Thanks!
-
Hi. Thanks for the question.
You can use this Slope Angle Face Towards effect:
vector v = fpItem.surfnormal;
real angle = atan2(v.y,v.x)-degtoRad(Angle1);
fpItem.rotation.z = angle+fpItem.rotation.z;
fpItem.surfDirection = 100;
Full scene attached for Your reference. I have used reference mode and placed items on their pivots. Effect aligned them to face away from roof.
(https://i.imgur.com/i0oXzt4.png)
Hope this helps.
-
Hi, Rokas!
Thanks for reply.
The thing is - I have all roof absolutely flat (forgot to attach perspective view).
Is there any solution in this case?
PS. cannot open your example because my max version is 2018.
Thx!
-
In that case use Surface- UV mode and Align feature:
(https://i.imgur.com/Y2uc8lJ.png)
-
Cool! Thanks a lot, Rokas!
That works for me :)
One more thing - is there any way to combine my custom distribution map + default scattered? So boxes populated not on every roof but with some randomness?
Thx
P.S. and I forgot how to avoid objects being scattered too close to the surface edge. Thx
-
That is now controlled by Your UVs. Move UV ilands to (re-)move items.
-
Ok, I see...
Any way to select random objects in 'Custom Edit' mode? So I could delete those manually.
-
Not really built in, You can use this scripts (https://forum.itoosoft.com/forest-pro-(*)/scripts-for-forest-pack/msg28260/#msg28260) Limit to feature.
-
Thanks!
Will give it a try
-
Hi,
Limit works fine!
Got another issue - if I want to scatter 2 types of objects then it scatters only object #2 in UV align mode... object #1 is missing
Any walkaround for this?
Thx
-
That is UV mode in effect. They are in the same UV position, so they get the same element scattered.
You can run this command while FP is in custom edit mode to randomly assign geometry items:
(for i = 0 to ($.trees.count()-1) do $.trees.setGeomID i (random 1 $.cobjlist.count) ; $.trees.update())
(https://i.imgur.com/8Oq0i59.gif)
-
Thank you, Rokas!!! :)
-
In that case use Surface- UV mode and Align feature:
(https://i.imgur.com/Y2uc8lJ.png)
Hi, Rokas.
Another one tiny thing...
can we combine UV align + stepped rotation?
looks like it doesn't work in UV mode (actually it works, but breaks UV alignment)
-
once again UV mode controls distribution and rotation as well.
You can once again override it in custom edit mode:
(step= 90 ; for i=0 to ($.trees.count()-1) do $.trees.setRotation i [0,0,(($.trees.getRotation i)[3]+ pi/180*step*(random 0 360/step))] ;$.trees.update())
-
Thank you!
Works like a charm! ))
-
In that case use Surface- UV mode and Align feature:
(https://i.imgur.com/Y2uc8lJ.png)
Hello Rokas,
is it possible to have your max file to see how it is done. I tried to reproduce it but it does not work.
Best
Pierre
-
Hello Rokas,
is it possible to have your max file to see how it is done. I tried to reproduce it but it does not work.
Best
Pierre
Sure, Pierre.
Nothing special here, apart that that is uses UVs. Let me know if You need any further explanations.