Itoo Software Forum

Author Topic: distribution map  (Read 3146 times)

CO2263

  • Jr. Member
  • **
  • Posts: 94
distribution map
« on: August 15, 2013, 09:28:53 AM »
Hi all,
I'm having some trouble with ajusting custom distribution map...

When I use standard map "dense.bmp" everything is fine except grass is coming out of the curb, see the screenshot    - http://clip2net.com/s/5z7jiU
units 10x10m

I was trying to use vray distance text (intersection with curb geometry)
for the far area I took same "dense.bmp"  from forestpack folder
http://clip2net.com/s/5zjBRo
and I put uvw mapping on top of the surface with channel '2'  (mapping size plane 10x10m, that was my logic)
finally I have strange result...  ???   no grass at all - http://clip2net.com/s/5zjVlv
please guide me how to fix it, what's the mistake

CO2263

  • Jr. Member
  • **
  • Posts: 94
Re: distribution map
« Reply #1 on: August 15, 2013, 09:56:57 AM »
this would be very helpfull to use vray distance map
it's not always easy to make contour splines for all the geometry to include/exclude areas
hope there is a simple solution

CO2263

  • Jr. Member
  • **
  • Posts: 94
Re: distribution map
« Reply #2 on: August 15, 2013, 10:29:45 AM »
some more tests...

standard dense map (units 10x10m)
http://clip2net.com/s/5zkVXv

vray distance map, uvw mapping - planar 10x10m   (vray distance settings - http://clip2net.com/s/5zllrT)
http://clip2net.com/s/5zl4IJ

same forest settings
plane uvw mapping changed to 1x1m, noise dense looks correct now- BUT! we nave just planted rows
http://clip2net.com/s/5zl6GT

have no idea how to get this to work properly, looks like all parameters are messed up now
« Last Edit: August 15, 2013, 10:31:59 AM by CO2263 »

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3151
    • iToo Software
Re: distribution map
« Reply #3 on: August 15, 2013, 11:07:38 AM »
I've done a couple of tests and VRayDistanceText works fine here. The only problem i've found is the map alignment; to fix it, set Forest coordinates to [0,0,0] (F12->Move) and click Display->Rebuild. If it doesn't work, please send us a test scene.

Quote
When I use standard map "dense.bmp" everything is fine except grass is coming out of the curb, see the screenshot    - http://clip2net.com/s/5z7jiU
In these cases we suggest to set Areas->Boundary Checking to Size. To get more sharped edges, please see the following tutorial:

http://www.itoosoft.com/forestpack/tutorials/tutorial_grass_edges.php
Carlos Quintero
iToo Software

CO2263

  • Jr. Member
  • **
  • Posts: 94
Re: distribution map
« Reply #4 on: August 15, 2013, 11:20:39 AM »
nothing changed that much after moving forest to 0,0,0
http://clip2net.com/s/5zmqmC

the thing is its kind of big work to make spline areas all the time, especially when you have lots of pathways
I would love to use vray distance texture - but still don't know how to make grass the same as with standard forest dense map

CO2263

  • Jr. Member
  • **
  • Posts: 94
Re: distribution map
« Reply #5 on: August 15, 2013, 11:22:05 AM »
here is my test scene

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3151
    • iToo Software
Re: distribution map
« Reply #6 on: August 15, 2013, 11:58:53 AM »
You must set map channel 2 at Distribution Map (see image). Beside this, i don't see other problems in the scene.

By the way, it's not necessary to use VRayDistanceTex to exclude by geometry. Forest provides this feature as Object Areas. It's much faster and supports falloff, groups, etc.
Carlos Quintero
iToo Software

CO2263

  • Jr. Member
  • **
  • Posts: 94
Re: distribution map
« Reply #7 on: August 15, 2013, 12:07:57 PM »
it was always set to 2 - http://clip2net.com/s/5znuGd
(see my previous screens)

still grass is not following the map

I know about object areas, but I need to create those splines or vertexes painted (I would need to make lots of those splines and very precisely to follow ground shape/edge so falloff works properly)
this distance texture already exsists - as I use it for the ground texture at edges
my guess was I could use it, just swap the far area texture to "dense.bmp"
« Last Edit: August 15, 2013, 12:10:51 PM by CO2263 »

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3151
    • iToo Software
Re: distribution map
« Reply #8 on: August 15, 2013, 12:21:28 PM »
Did you try rendering the scene ? If you increase the density over certain limits, the desnsity on viewport doesn't match the final result (because the limits at Display->Max.Items). Perhaps that is the problem.
Carlos Quintero
iToo Software

CO2263

  • Jr. Member
  • **
  • Posts: 94
Re: distribution map
« Reply #9 on: August 15, 2013, 12:33:19 PM »
I think I located the misuderstanding point...

I noticed you changed units from 10m to 4.8m (on your screen)
I didn't change that, it was always set to 10m in my case

so it comes the procedure is something like that:
1. switch to custom map and set appropriate map channel
2. set the uvw mapping size 10 times smaller than forests units (in my case units 10x10m, so the uvw mapping size goes 1x1m)
3. decrease forest units by 2 (appr.), was 10m - became 5m

and only after you get the similar result

P.S. please correct me if all above is right

P.P.S. does it mean the density units have no connection to uvw mapping
or what is the initiall mapping size for the standard maps?

« Last Edit: August 15, 2013, 01:11:02 PM by CO2263 »

CO2263

  • Jr. Member
  • **
  • Posts: 94
Re: distribution map
« Reply #10 on: August 15, 2013, 01:25:52 PM »
maybe I just need to know the mapping size forest uses for its standard maps
then there will be no difference in object population when switching from standard map mode to custom map mode (using same texture)
please advise

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3151
    • iToo Software
Re: distribution map
« Reply #11 on: August 15, 2013, 01:41:41 PM »
I'm sorry, you are right. By one moment i forgot how the map channel parameter works here:

1) If map channel is 2, the size of the distribution map is taken from the UVW coordinates (in this case 1x1 m). In this mode, X/Y Units don't change the map's size, but only the density (basically it has the same effect than X/Y Pixels).
2) If map channel is 0, Forest generates its own coordinates, and X/Y Units modifies the size of the procedural map. In this case, 10x10 m.

So, setting dense.bmp as procedural Map (or embedded in VRayDistanceTex), Mapping Channel = 0, X/Y Pixels = 100, X/Y Units = 10m should generate the same result as using dense.bmp as Bitmap. But there is a small difference more: the map filtering changes the result slightly, so set map filtering to None.

Tip: to see visually how each parameter modifies the distribution map, use a checker bitmap for the tests. It's what i've done here.
Carlos Quintero
iToo Software

CO2263

  • Jr. Member
  • **
  • Posts: 94
Re: distribution map
« Reply #12 on: August 15, 2013, 02:12:07 PM »
Hi Carlos,
Thanks for all replies

here some new tests
still cannot get same result as when using standard dense.bmp

yes, setting filtering to none does something, but still...

see the bottom right render
looks like when I set dense units from 10m to 5m - forest just puts another instance of object almost at the same plaсe with some small shift (you see it as double objects, like not focused camera)

I'm not sure how to deal with that
And it's still a puzzle - how forest sets its own mapping for the density map
Thx
« Last Edit: August 15, 2013, 03:06:42 PM by CO2263 »

CO2263

  • Jr. Member
  • **
  • Posts: 94
Re: distribution map
« Reply #13 on: August 15, 2013, 04:09:04 PM »
here is the other thing...
I made a spline area for this peace (see the screen)
http://clip2net.com/s/5ztkJ9

forest combines bunch of single grass straws and after use that bunch for scattering grass
the spline area affect the whole bunches
as a result I still have grass over curb or blank gaps near the curb
any way to fix it? or include this in the new features
(scattering single straws would be a very huge number of instances)

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3151
    • iToo Software
Re: distribution map
« Reply #14 on: August 15, 2013, 04:24:52 PM »
Well, i've realized there are certain differences using gray maps. This is caused because forest and max use different algorithms to convert gray images to b/w. Please, try the following settings:

- Plane UVW Map = 10m
- Distribution Mapping channel = 2 (it seems VRayDistanceTex doesn't work with 0)
- X/Y Pixels = 100
- X/Y Units = 10m
- Filter map = None
- Texture map->U/V Offset = 0.5 / 0.5 (Forest bitmap coordinates are aligned with the Forest object, not with the Plane)
- Texture map->Output->RGB Level = 1.5

I attach a scene with these settings. I think now the result is very similar.

Quote
And it's still a puzzle - how forest sets its own mapping for the density map

Yes, Forest uses its own mapping algorithm for the bitmap mode, but we must keep for historical reasons. If not, all scenes created with previous versions would change. Take in account that Forest is on the market for more than 12 years.
Carlos Quintero
iToo Software