Itoo Software Forum

Author Topic: scattering groups  (Read 6105 times)

mitviz

  • Jr. Member
  • **
  • Posts: 85
    • mitviz
scattering groups
« on: March 23, 2018, 07:57:45 AM »
when scattering a group for me, especially in this scene sometimes the group seems exploded, i am using the custom option and scatting along a spline, is this some bug?
« Last Edit: March 23, 2018, 08:00:14 AM by mitviz »
Professional architectural renders

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: scattering groups
« Reply #1 on: March 23, 2018, 09:47:53 AM »
Do every object in the group have pivot position and orientation in the same place?

If that doesn't help, could You please attach your scene to check what exactly goes on ?
Rokas

mitviz

  • Jr. Member
  • **
  • Posts: 85
    • mitviz
Re: scattering groups
« Reply #2 on: March 23, 2018, 09:53:52 AM »
in the same place? like a central point for all the models? they all have their pivots now centered
Professional architectural renders

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: scattering groups
« Reply #3 on: March 23, 2018, 10:07:14 AM »
Yes same place, does not matter where exactly.
P.S. Centered as You wrote is not good, if You centered to every object local center.


Is it still "exploded"? Do You use any transformations? If so- they can cause this effect.

It would help to see Your scene.
Rokas

mitviz

  • Jr. Member
  • **
  • Posts: 85
    • mitviz
Re: scattering groups
« Reply #4 on: March 24, 2018, 12:42:20 AM »
yeah this worked! having all pivots in the same place solves the issues, thanks man!
Professional architectural renders

abdelrahmanazmi

  • Newbie
  • *
  • Posts: 1
Re: scattering groups
« Reply #5 on: April 16, 2018, 10:03:47 AM »
Group scattering helped me save a considerable amount of time. Yet, most of time, I needed the rotation of my objects to be relative to the whole group so the shape of my group doesn't miss up.
I don't want to take time changing the pivot of every group's object (sometimes more than 50 objects per group) to the same pivot of the whole group to achieve that.
I suggest that IToo puts a check point for that, and better, a check point for every object in the group to control which one I need to be independent and which do not, hopefully in the next update.
The problem could derive from the Forest Pack object considering the pivot of every object independently in scattering, ignoring the group's pivot.
Thank you very much.
« Last Edit: April 16, 2018, 10:11:54 AM by abdelrahmanazmi »

mitviz

  • Jr. Member
  • **
  • Posts: 85
    • mitviz
Re: scattering groups
« Reply #6 on: April 16, 2018, 10:05:29 AM »
yeah that would be the best! its annoying to try to fix that
Professional architectural renders

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: scattering groups
« Reply #7 on: April 16, 2018, 01:39:26 PM »
I created a demo example about scattering groups. Maybe some users will find that usefull.
yeah that would be the best! its annoying to try to fix that
1 Pivot is used for sampling randomizations. It must be in the same position if You want the same transformation as Your neighboring objects.
2 Objects are scaled from the pivot location. It plate on the table hadn not had pivot in the same position as table:
« Last Edit: April 16, 2018, 01:41:02 PM by Rokas »
Rokas

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 4394
    • iToo Software
Re: scattering groups
« Reply #8 on: April 20, 2018, 11:44:03 AM »
Quote
I suggest that IToo puts a check point for that, and better, a check point for every object in the group to control which one I need to be independent and which do not, hopefully in the next update.
The problem could derive from the Forest Pack object considering the pivot of every object independently in scattering, ignoring the group's pivot.

I made some tests to implement this, but unfortunately it's much more complex than it seems at first glance.
The problem is that once scattered, the items of a group are handled as independent objects, with its own transformation.

There is not a simple way to keep the rotation relative to the group either. Forest computes multiple rotations at different steps (random, look-at, effects, etc.), and any change has undesired effects in other parts of the code.

To make it correctly, we should modify the scattering workflow to handle the group as an single item, and then generate the sub-items at the render stage.
This is a major change which we cannot afford at this moment (FP6 is pretty stable and ready for the final release). I don't discard the idea for the future, but for now we'll keep it as now.

Thanks,
Carlos Quintero
iToo Software

mitviz

  • Jr. Member
  • **
  • Posts: 85
    • mitviz
Re: scattering groups
« Reply #9 on: April 20, 2018, 01:31:35 PM »
you know there is a reason why i scattered the group, the plant  had different displacement strengths for each leaf so i just made it a group but seems its a challenge but someone i got it to work
Professional architectural renders

GT4505

  • Full Member
  • ***
  • Posts: 133
    • claar.be
Re: scattering groups
« Reply #10 on: May 01, 2018, 09:30:14 AM »
Hi there,

I'm looking for something similar.
I'd like to distribute some groups via forest on a railclone surface.
I've got this to work at the moment but I'd like to distribute certain items(groups) on certain surfaces.
The surfaces are colored based on their width.

But I can't seem to find the option in forest to match certain objects to certain colors. (I'm using the reference mode here).
Please let me know if there is another way to get to this result if it's not possible at the moment.

Thanks
Pieter van Stee

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: scattering groups
« Reply #11 on: May 01, 2018, 01:25:25 PM »
Hi,

Thanks for the question. You can achieve something similar by following these steps. Note that in this case I'm not using reference mode as it doesn't have the option to control items using colour of material IDs.

  • Create triangular markers
  • Create a Gradient Ramp with evenly space solid colours. You'll need one colour for each of the items you wish to scatter with Forest Pack.
  • Apply the gradient to the triangles and apply a UVW Map so that each triangle is one solid colour.
  • Create your Forest object and add the items you'd like to scatter.
  • Add the triangles to the Surfaces list and set the mode to UVW.
  • In the Distribution rollout, Use a grid map and adjust the density and offset setting until you have just one object in the middle of each triangle.
  • Enable Diversity > Match Color ID on Map and add the gradient ramp to the map slot.
  • In the Geometry rollout, assign Color IDs to the object to match those used in the Gradient map.
  • You can now use your triangles to create a RailClone object, swapping the markers based on the length of the spline using Conditional nodes.
  • Finally, add the RailClone objects to the Forest object's Surface list, replacing the test markers.


I've attached a sample file that uses two colours. I hope it helps.

Another option of course would be to forget about Forest Pack and use RailClone for the whole thing. You could use Compose operators to rebuild the groups.

If you have any further questions, please let me know.


All the best,


Paul.
« Last Edit: May 01, 2018, 01:36:28 PM by Paul Roberts »
Paul Roberts
iToo Software

GT4505

  • Full Member
  • ***
  • Posts: 133
    • claar.be
Re: scattering groups
« Reply #12 on: May 01, 2018, 09:58:27 PM »
Hi Paul,

Thank you for your extensive reply, works very nice here!
I'm just interested to understand this workflow fully.
Bacause I believe you use reference to place the object at the centre of the surface/triangle.
At the moment it's looking very well centered, can you further explain how this grid is centered.
Is each distribution image mapped to the side of each triangle, and then scaled to match the dit to the centre?

I've attached some tests I did with regular sizes. So now I can edit the RC & FRST to adapt to each position and with.
Looking forward to get this fixed so it can be used in each future project.

Thanks!
Pieter van Stee

GT4505

  • Full Member
  • ***
  • Posts: 133
    • claar.be
Re: scattering groups
« Reply #13 on: May 17, 2018, 06:24:00 PM »
Hi Paul,

I'd like to follow up on this thread.
As I'm refining this workflow further.
I'd first like to ask if you could provide some further information about the thought behind the spaced grid layout of the dotted image, because this doesn't makes any sense to me :p is the grid spaced based on each triangle? or is it spaced across all the surfaces?
Also the workflow with the mapped gradient ramp is very strange and unefficient, cause I'm planning to use this with 5-10 different colors, to get them accurate isn't very straightforward. Is there any other way to get to this result?

And last, also most important: If I add different geometry objects/groups with the same color, only the last one is picked, it's supposed to mix them randomly (so all red geom groups distributed randomly on the red surfaces...)
This way I can create different groups and duplicates that are slightly different to get some randomization.

Please get back to me quickly (the last question is urgent)
Thanks!
Pieter van Stee

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: scattering groups
« Reply #14 on: May 18, 2018, 11:08:42 AM »
I dig into this set up and expanded it a bit.

To get gradient divided into equal parts- it is not that hard- You can rightlick on flag and edit their parameters in exact numbers.

To randomize between same Color ID segments we need to do that in RailClone, (as we use UV mode in Forest Pack).
We need to make stepped UV transform to randomize that way.

I am not sure why values are the ones I chose they are not exact but works OK. I am interested in what values there should be to avoid any wiggling.

Rokas