Populate trees using image mask

claudiu.oneaclaudiu.onea Posts: 0
edited December 1969 in Bryce Discussion

Hi,
I have an image that shows the distribution of the forest (derived from land cover data). Can I use it in Bryce to populate it with trees?
Thanks.

Comments

  • OroborosOroboros Posts: 326
    edited December 1969

    I will allow it, yes.

  • claudiu.oneaclaudiu.onea Posts: 0
    edited December 1969

    How can it be done?
    Thanks.

  • Dave SavageDave Savage Posts: 2,433
    edited December 1969

    It'd be quite complex, but it'd be done by importing your image as a mask into the terrain editor, then using the red and yellow clipping filters to create a terrain that matched the areas where you want trees.
    Then you populate it with trees using the Instancing lab.

    The advantage of creating a terrain using the clipping filters is that you then create a terrain that only shows to areas you want trees once you're in the instancing lab and you can only see a wireframe where you brush the trees on.

    How much you already know about Bryce will depend on how much you understand these instructions.
    If this doesn't make sense, let me know and I'll fill in some details with screen grabs to illustrate.

  • claudiu.oneaclaudiu.onea Posts: 0
    edited December 1969

    Thanks TheSavage64,

    Some more help will be much appreciated. I'm just a newbie in Bryce.
    Thanks.

  • OroborosOroboros Posts: 326
    edited February 2013

    We'll need to see the picture.

    We have no idea what you're working with. It could be a contour map, a DEM, or simply a satellite pic of some trees.

    Post edited by Oroboros on
  • claudiu.oneaclaudiu.onea Posts: 0
    edited December 1969

    The landcover data are ESRI shapefiles (vectors).
    What I want to do is to color the forest with some color save it as raster format (psd, tiff, bmp, ......) and use that as a mask.

  • claudiu.oneaclaudiu.onea Posts: 0
    edited December 1969

    And here is the picture.
    Thanks

    Forests.jpg
    1500 x 1500 - 696K
  • Dave SavageDave Savage Posts: 2,433
    edited February 2013

    What sort of scale/area is that pic covering?

    You'd be creating a real monster scene if you had to populate it with thousands of trees.
    The instancing lab in Bryce is temperamental at the best of times and as Bryce is only 32 bit, it doesn't take much nowadays to get 'out of memory' errors and crashes.

    Also, is your terrain flat or mountainous?

    I'm just rendering something at the moment but I'll have a look at what I can put together for you this afternoon.

    Post edited by Dave Savage on
  • Dave SavageDave Savage Posts: 2,433
    edited December 1969

    Guessing that the forest area pic you supplied covers miles, I've done this quickly.
    If this would do for your requirements, let me know and I'll write up how to do it.

    Because it only uses the terrain editor it's much less complicated than having to populate the whole scene with trees which are very memory intensive and will slow down the scene to the point where it's unusable or even crash Bryce.

    ForestLandscape.jpg
    800 x 500 - 133K
  • dwseldwsel Posts: 0
    edited December 1969

    You might be able to achieve quicker and simplier required result using method similar to one from this tutorial:
    www.daz3d.com/forums/discussion/8441/

  • Dave SavageDave Savage Posts: 2,433
    edited February 2013

    That's kind of the method I used, only at distance, it's not necessary to use a volumetric foliage material and there are some extra steps because the trees have to follow a set area plus there may be height map to take into account too.

    But really my method only took 5 minutes and is quite simple. :)

    But the OP may still come back and say he needs real trees. :bug: In which case we'll have to hope Rashad comes along and explains the process he goes through to create his mega populated scenes.

    Post edited by Dave Savage on
  • claudiu.oneaclaudiu.onea Posts: 0
    edited December 1969

    Thanks TheSavage64,
    That's exactly what I want to do.
    And yes it is a mountainous area. I would give you the heightfield I use but it's a PGM 90 mb.
    I really appreciate your willing to help.
    I also tried to find a way to import DEMs directly but it seems Bryce doesn't import a classic USGS DEM file. Maybe in future versions.

  • claudiu.oneaclaudiu.onea Posts: 0
    edited December 1969

    This is what I did so far but using bump mapping for forests

  • claudiu.oneaclaudiu.onea Posts: 0
    edited December 1969

    This one, sorry.

    Hateg_Render5.jpg
    1999 x 1333 - 1M
  • Dave SavageDave Savage Posts: 2,433
    edited December 1969

    Thanks TheSavage64,
    That's exactly what I want to do.
    And yes it is a mountainous area. I would give you the heightfield I use but it's a PGM 90 mb.
    I really appreciate your willing to help.
    I also tried to find a way to import DEMs directly but it seems Bryce doesn't import a classic USGS DEM file. Maybe in future versions.

    If you could save the height map as a greyscale .jpg and post it I'll knock up the example using it instead of just a random one.
    It's not ideal as height maps should really be 32 bit tiffs to prevent stepping but for the purposes of an example, we can use it.

    The same size and a direct overlay as the forest area pic is fine if you can (1500x1500px).

  • claudiu.oneaclaudiu.onea Posts: 0
    edited December 1969

    Here it is. Thanks.

    DEM.jpg
    1500 x 1500 - 140K
  • Dave SavageDave Savage Posts: 2,433
    edited December 1969

    Sorry for the delay, I haven't forgotten about this.
    I downloaded the pic thanks and have put it together, it's just a case of writing up the instructions.
    I'll try and do it tomorrow but I may not get time now until Monday.

  • claudiu.oneaclaudiu.onea Posts: 0
    edited December 1969

    It's not a problem. When you have time.
    Thanks for your help.

  • claudiu.oneaclaudiu.onea Posts: 0
    edited December 1969

    Hey TheSavage64,
    Sorry to bother you.
    Can you tell how I can do that?
    Thabks

  • Dave SavageDave Savage Posts: 2,433
    edited February 2013

    Oh yeah sorry, my bad... got carried away with other stuff.
    Here we go:

    First in a photo editor make sure both the height map and forest area are the same size and directly overlay each other and save them as grey scale for the height map and forest area as bitmap.

    Open Bryce and create a new terrain.
    Click the Edit Terrain icon to take you to the Terrain Editor window.
    Delete terrain that is displayed by clicking the 'New' button.

    Pic 1:
    A. In the 'Editing Tools' pane, click the 'Picture' tab.
    B. Click 'Load' and navigate to the height map picture you've just saved and load it.
    C. Click 'Apply'

    Click the tick to accept your changes and go to the main viewport and adjust the Y axis until the height looks correct.
    Click the Attributes button (the little 'A' in the selected object's floating sub menu) and change the name to 'Height'.

    Duplicate this terrain, don't move it at all yet, but go to Attributes and change it's name to 'Forest'
    Then with forest selected go to the Terrain Editor and follow the same procedure above to get the Forest Area picture loaded.

    New we're going to use the clipping filter to get rid of the top and bottom of the terrain so that hopefully what we are left with is just the area where the trees will be.

    Pic 2:
    D. Click on the very top of the bracket and drag it downward. you will see that above the bracket turns yellow and a corresponding area on the flat preview also turns yellow. You may not have to drag with down very far (if at all), it's just to get rid of any peaks, but really for what we're doing here, it's not essential as you will see.
    E. Click on the very bottom of the bracket and drag it upwards. You will see that below the bracket turns red and a corresponding area on the flat preview also turns red. This is the important one here as this is cutting off and therefore making invisible anything below the height you set.

    It's a bit tricky selecting the correct part of the bracket and if you don't get it just right,and click on the greyscale strip it will simply drag the strip and do something completely different.

    Picture-1.jpg
    1280 x 800 - 213K
    Picture-2.jpg
    1280 x 800 - 254K
    Post edited by Dave Savage on
  • Dave SavageDave Savage Posts: 2,433
    edited December 1969

    So now go back to the main viewport and move the forest area up on it's Y axis so it's out of the way.

    Select the terrain you named Height and again duplicate it,

    Pic 3
    in the attributes, change the duplicates name to 'Canopy' (these names aren't important only it makes it easier to identify them later so call them what you want as long as you can remember which is which).
    Also set it's Boolean status to 'Intersect'

    Go to any of the side views and using the Y axis, move the Canopy terrain upward so that it is about the relative height of the forest away from the main Height terrain (working at the scale of this example it's only a very small amount).

    Now move your Forest terrain down so it's base is at the same level as the base of the height map and stretch it's Y axis so that the top extends beyond the highest part of the Canopy.

    In the Forest terrain attributes, set it's Boolean status to 'Positive'.

    Now select both the Forrest terrain and the Canopy terrain and group them together (use the little G in the selected item's floating sub menu).

    Picture-3.jpg
    1280 x 800 - 485K
  • Dave SavageDave Savage Posts: 2,433
    edited December 1969

    So at the various stages, here's what you should see.

    Pic 4
    Top Left: The Height Map
    Top Right: The Forest Area
    Bottom Left: The Forest area and the Canopy as a grouped Boolean
    Bottom Right: All three terrains composed together.

    Fine alterations can be made easily by selecting the Canopy or Forest terrain and adjusting them upwards or downwards.

    It's better to choose contrasting colours for this so you can see at a glance if there's anything wrong.

    Example-Renders.jpg
    1600 x 1000 - 583K
  • Dave SavageDave Savage Posts: 2,433
    edited December 1969

    Then by choosing the height terrain and adding an appropriate texture and then selecting the grouped boolean of the forest and adding an appropriate texture, you're done.

    Hope this helps.

    Finished-Render.jpg
    800 x 500 - 160K
  • claudiu.oneaclaudiu.onea Posts: 0
    edited December 1969

    Thanks a lot TheSavage64.
    It helped me a lot. Much appreciated.

Sign In or Register to comment.