Itoo Software Forum

Forest Pack => Forest Pro (*) => Topic started by: mitviz on March 23, 2018, 07:57:45 AM

Title: scattering groups
Post by: mitviz 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?
Title: Re: scattering groups
Post by: Rokas 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 ?
Title: Re: scattering groups
Post by: mitviz 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
Title: Re: scattering groups
Post by: Rokas 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.
(https://i.imgur.com/fIc09OV.png)

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

It would help to see Your scene.
Title: Re: scattering groups
Post by: mitviz on March 24, 2018, 12:42:20 AM
yeah this worked! having all pivots in the same place solves the issues, thanks man!
Title: Re: scattering groups
Post by: abdelrahmanazmi 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.
Title: Re: scattering groups
Post by: mitviz on April 16, 2018, 10:05:29 AM
yeah that would be the best! its annoying to try to fix that
Title: Re: scattering groups
Post by: Rokas on April 16, 2018, 01:39:26 PM
I created a demo example about scattering groups. (https://forum.itoosoft.com/forest-pro-(*)/scattering-groups-5300/) 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:
(https://i.imgur.com/sbEIlLB.gif)
Title: Re: scattering groups
Post by: iToo 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,
Title: Re: scattering groups
Post by: mitviz 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
Title: Re: scattering groups
Post by: GT4505 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
Title: Re: scattering groups
Post by: Paul Roberts 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.

(https://i.imgur.com/eaHJpNh.gif)

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.
Title: Re: scattering groups
Post by: GT4505 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!
Title: Re: scattering groups
Post by: GT4505 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!
Title: Re: scattering groups
Post by: Rokas 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.

(https://i.imgur.com/ALRViWv.gif)
Title: Re: scattering groups
Post by: GT4505 on May 18, 2018, 05:17:31 PM
Hi Rokas,

Thank you for this quick and thorough explanation.
I've been trying that with offset in railclone, but didn't get into it enough I think...

I'll have a thorough look at the file you've attached.
thanks for the help!

btw, is there a way to preview the distribution texture on the surface somehow?
this way I can understand more how that texture is placed and scaled on the surfaces...
Title: Re: scattering groups
Post by: W on March 28, 2019, 04:51:58 PM
Hi Rokas,

It is possible to get the exact position on each triangle.
If I put an UVW MAP-modifier on the triangle, the left-bottom-corner of the plane-gizmo is the pivot-point of the distribution image.
But in UV-mode the map channel-option is greyed-out (map instead of image) and the 'match-color ID on map' doesn't seem to work anymore on a map channel different from 1.

Do you know it it is possible to work with 2 map channels in UV-mode? (1 for distribution, 1 for match color ID)
It works for a mesh with 1 face, but not for RC or a mesh containing multiple faces.
Title: Re: scattering groups
Post by: Rokas on April 03, 2019, 09:41:29 AM
Hi Wouter

You can use 2nd map channel for Diversity.
(https://i.imgur.com/oplxQuy.png)

Regarding exact position on triangle - there is no better way for now.
Hope this helps.
Title: Re: scattering groups
Post by: W on April 03, 2019, 10:55:08 AM
Thanks for the answer but it doesn't work in UV-mode. It was already at map channel 2 in the post above.
For now I have a workaround using offset and tile in the bitmap settings to use both maps at map channel 1.
Title: Re: scattering groups
Post by: morph on April 15, 2019, 09:46:19 PM
Hi, i have such issue. I got many trees as groups (trunk/branches/leafs). i want to scatter a forest on hills/mountains and dont want to remake several of those trees as single objects... now i follow the tutorial of how to use groups in FP, but it doesnt work... Rotation and scaling works, but if i turn  on the transformation (move) all groups explodes, really cant have any idea whats going on.. i try it on some simple scatering with 3simple boxes gruped with closed spline as area but it doesnt work as well.
Title: Re: scattering groups
Post by: Rokas on April 16, 2019, 01:06:04 PM
Hi morph.
Please try these settings:
(https://i.imgur.com/xfa6nG9.png)
Title: Re: scattering groups
Post by: morph on April 16, 2019, 03:33:52 PM
i did.. and it does not work, i have downloaded newest version of FP, but that does not change anything.... as i said rotation and scaling works.. but transformation doesnt. what is more, when i turn on transformation it affects also rotation and scaling,  meaning objects rotates even more and scale even more when transformation enables.. i can paste screen shoot:/
Title: Re: scattering groups
Post by: Rokas on April 16, 2019, 03:40:53 PM
please attach Your scene.
Title: Re: scattering groups
Post by: morph on April 16, 2019, 04:29:18 PM
ok, will clear it and post.
Title: Re: scattering groups
Post by: Rokas on April 17, 2019, 01:55:45 PM
Hi
OK, i see the problem

Translation uses objects bounding box and use percentage of that when translating items. Each individually in the group.
We need to make them of the same Bounding Box.
You can do that by attaching 8 empty vertices to all the items in the group:
(https://i.imgur.com/yqiXERT.gif)

After doing this translation is unified.
Title: Re: scattering groups
Post by: morph on April 17, 2019, 03:33:05 PM
u mean, that i have to add 8 vertices to each object in the group and those vertices need to be in the same exact position? but the problem occurs only if i add to forestpack trees that are displayed as bounding boxs? if i display it as a mesh the problem will disapear?. my objecst are trees vrayproxys so i display them that way to optimize the viewport. Adding 8 ver. to each object in the group is to much work....:/
Title: Re: scattering groups
Post by: Rokas on April 17, 2019, 04:00:13 PM
Adding 8 ver. to each object in the group is to much work....:/
Sorry, then. I hope You will get away without using Translation transform.
Title: Re: scattering groups
Post by: morph on April 17, 2019, 04:06:15 PM
transformation is a must, otherwhise foret looks like some pattern... :( but in your tutorial, candle and flame doesnt have such vertices so...?, any way, is there a chance that in future that problem may be solved?
Title: Re: scattering groups
Post by: Rokas on April 17, 2019, 04:12:06 PM
In candle tutorial I did not use translation. Groups works as it works now.
If You need translation transform You have 2 options:
Title: Re: scattering groups
Post by: morph on April 17, 2019, 04:45:34 PM
ok, understood. already colapsed, generaly it was faster than converting all tree parts once again.
So it works as it works and it cannot be solved internaly by FP right?.
Title: Re: scattering groups
Post by: iToo on April 18, 2019, 08:55:38 AM
That's correct. We have not plans to modify the way that groups work.
We tried it in the past, adding an option to handle groups as a single entity, but we found many problems and the idea was discarded.
Title: Re: scattering groups
Post by: morph on April 18, 2019, 09:49:41 AM
ok, thanks for information.:)