Instanced Grass Kit -- a new landscape resource

mephoriamephoria Posts: 120
edited March 3 in Freebies

Instanced Grass Kit for Daz Studio 4.8+

Are you struggling to get nice looking grass in your Daz scene? Does your favorite shader only work with 3delight? Does your grass prop cover too little ground or not handle hills? Have you considered buying a $1000 software package just to get a few million blades of grass. Me too, pal! Me too. Thus, the need for the Instanced Grass Kit.

To use the IGK, you need Daz Studio 4.8 or higher (to support IRay and instancing), and an instance scattering solution such as Ultrascatter. (All of these instructions will assume you are using UltraScatter, but if you have an alternate scattering solution, it should work too.)

Installation

To install the IGK, simply

  1. unpack the zip file into your library

  2. double-click on Runtime/Support/MEPHORIA_Instanced_Grass_Kit.dsa to install the metadata.

Basic Use

Now you’re ready to start kicking grass. Try the following to get a nice scene.

  1. Under Render Settings/Optimization, set Instance optimization to Memory.

  2. Add Adjustable ground to your scene.

  3. Use the Hilly morph dial to choose your desired amount of geography.

  4. Add !Grass clumps to your scene. (Don’t worry if you don’t see them. They load just off-camera.)

  5. Select Grass clumps in the scene graph.

  6. Activate the UltraScatter script. Set the following parameters:

    1. Target object: Adjustable ground

    2. Number of Instances: 20000 (with 4 zeroes -- twenty thousand)

    3. Preview instances: Bounding box or Full

    4. Random Seed: unchecked -- trust me on this one

    5. Rotation/Y: 180 (or thereabouts)

  7. Under Render Settings/Optimization, MAKE SURE that you have set Instance optimization to Memory! (Really, you’ll be miserable if you don’t.)

  8. Render with IRay.

Hey, What’s Going On?

Hopefully, you’ve already gotten great results and sold the resulting renders for enough to pay off your mortgage. However, if you want to tweak things, or think the above script is too arbitrary, here’s some random notes about the whys and wherefores.

  1. If you don’t set Instance optimization to Memory, IRay will allocate separate resources for each instance, and things will get slow. Unfortunately, Daz Studio resets this to Speed when you create a new scene. Bad Daz!!

  2. Your 20,000 instances correspond to about 4 million blades of grass (600 of them unique). The instancing system should handle this with no problem.

  3. You don’t need to use the provided ground -- any groundlike object will do. As a rule of thumb, you’ll want 100 instances per square meter of landscape. (If you do the math, this gives two blades of grass per cm.)

  4. You could just use the Grass clump large object if you want semi-uniform ground cover. The additional (medium, small, and small (contrast)) clumps give some non-uniform color variation that helps your lawn pop (and perhaps snap or crackle).

  5. If you want more control over the distribution of different grass clumps, run scatter on each individual clump rather than the Grass clumps group. Your baseline will be 5000 each, but you can tweak the proportions in the UltraScatter dialog.

  6. The default grass height will give you a semi-maintained lawn or landscape. For a well mown lawn, try setting the heights of each individual clump type to 35% -- either before scattering or via the XYZ Scale option in the UltraScatter dialog.  (You might also wish to change the contrast clump to use the Grass Medium material, to reflect your diligent efforts in watering the lawn regularly.)

  7. The different grass materials will all look identical in the 3delight preview render. All of the interesting work is happening in the translucency strength attribute of the IRay material.

  8. 8. You can instantly change the materials after scattering by changing the clump base instance. Changes to parameters, alas, will have no effect until you re-run the scatter script.

  9. If you wish to tweak the materials, start by adjusting the translucency strength. Other effects can be achieved by changing translucency color, diffuse overlay weight/color, and (if you really want) base color,

  10. As of 2/2018, there appears to be a bug in the “random seed” setting of UltraScatter. When checked, it seems to cause much more irregular distribution and less actual randomness. I, therefore, recommend that you uncheck it before every grass scatter. (Try it both ways if you don’t believe me. I don’t mind.)

  11. There is no suggestion 11. Previous versions reported that there was a problem with single-dimension scaling in UltraScatter, but the reports don’t bear out under examination. The author apologizes to UltraScatter’s author for the false report.

License terms

This product is copyrighted, and may not be redistributed without permission. However, you may freely use it in both commercial and non-commercial renders. Credit is not required but is encouraged.

Updates

Replaced zip file with version 2, which fixes a "missing file" error when loading !Grass clumps .
Modified comments to retract claims that there is a scaling bug in UltraScatter. I was mistaken.
Replaced zip file with version 3, which addresses many user requests. (More info in separate comment.)

Grass Promo 02.jpg
800 x 494 - 294K
Grass Promo 04.jpg
494 x 800 - 292K
zip
zip
Instanced Grass Kit.zip
1M
Post edited by mephoria on
«1

Comments

  • tkdroberttkdrobert Posts: 1,735

    Looks great but I don't have ultrascatter. sad

  • nonesuch00nonesuch00 Posts: 9,807

    Wow, thanks!

  • tkdrobert said:

    Looks great but I don't have ultrascatter. sad

    And I can't use IRay. My computer doesn't support it. 

  • Thanks, Mephoria. I already have several grass kits/props/etc. and Ultrascatter, so this should be an useful addition. And I like that you included the above suggestions/instructions as  PDF in the zip file. yes

  • manekiNekomanekiNeko Posts: 369
    edited February 28
    tkdrobert said:

    Looks great but I don't have ultrascatter. sad

    And I can't use IRay. My computer doesn't support it. 

    i don't have ultrascatter either, but a while ago i found this awesome free script for daz called surface replicator by tofusan. you don't get any grass object - whatever you want to replicate is for you to decide (including in what you wanna render it/what shaders you use).. maybe it would work together with a part of this here, like a grass prop(s)? i might try out, not now though.

    (edited to add the link)

    Post edited by manekiNeko on
  • Faeryl WomynFaeryl Womyn Posts: 1,067

    What's Ultrascatter, I have never heard of this?

  • What's Ultrascatter, I have never heard of this?

    Ultrascatter: https://www.daz3d.com/ultrascatter-advanced-instancing-for-daz-studio

  • mephoriamephoria Posts: 120
    tkdrobert said:

    Looks great but I don't have ultrascatter. sad

    And I can't use IRay. My computer doesn't support it. 

    It should actually be pretty easy to use the kit without IRay. You can create a 3delight shader from the IRay shaders by just taking using the "grass-texture-gray" texture map and using it in both the diffuse channel (with a green tint of your choice) and the bump channel. You could even just create a pure green texture with no texture maps and it would look okay from a distance. I'll consider adding dedicated 3delight renderers to version 3.

    As @manekiNeko points out, the free "Surface Replicator" script can be used in place of UltraScatter. I'll summarize my experiences with it in a follow-on post.

     

  • mephoriamephoria Posts: 120

    Thanks, @manekiNeko, for pointing out surface replicator. I've now tried it out with the grass kit, and it definitely works, with some caveats:

    • Unlike UltraScatter, it can only work on one prop at a time. This means that you'll need to reparent all of the Grass clump props to your ground object and then run Surface Replicator on each of those props individually. Ideally, you'd want up to 5000 instances of each object.
    • Surface Replicator has a wired in limit of 1000 instances per scatter. To get the 5000 instances per clump discussed above, you would need to run it 5 times per clump (for a total of 20 1000-instance executions). Alternatively, it is possible to simply edit the surface replicator script to change the instance limit, which is clearly declared. I've tried this, and it worked for me, but I don't know the script well enough to know what "gotchas" this might produce. My best guess is that it will do fine with 5000 instances, but that it starts getting slow and cranky at 20,000 instances.
    • The default settings in the replicator are ideal for the grass kit, so you can just set the instance count and apply.

     

  • tkdrobert said:

    Looks great but I don't have ultrascatter. sad

    And I can't use IRay. My computer doesn't support it. 

    You don't need an nVidia GPU to use Iray, though of course it will be slower using only the CPU (how it compares to 3Delight will depend on how many advanced features of 3Delight you are using).

  • manekiNekomanekiNeko Posts: 369
    mephoria said:

    Thanks, @manekiNeko, for pointing out surface replicator. I've now tried it out with the grass kit, and it definitely works, with some caveats:

    • Unlike UltraScatter, it can only work on one prop at a time. This means that you'll need to reparent all of the Grass clump props to your ground object and then run Surface Replicator on each of those props individually. Ideally, you'd want up to 5000 instances of each object.
    • Surface Replicator has a wired in limit of 1000 instances per scatter. To get the 5000 instances per clump discussed above, you would need to run it 5 times per clump (for a total of 20 1000-instance executions). Alternatively, it is possible to simply edit the surface replicator script to change the instance limit, which is clearly declared. I've tried this, and it worked for me, but I don't know the script well enough to know what "gotchas" this might produce. My best guess is that it will do fine with 5000 instances, but that it starts getting slow and cranky at 20,000 instances.
    • The default settings in the replicator are ideal for the grass kit, so you can just set the instance count and apply.

     

    thanks a lot @mephoria for testing this! haven't come around to yet. it's a bit what i supposed, i vaguely remembered the script interface... your detailed description is very welcome. i got your great freebie now. maybe i'll also try to get in touch with @Tofusan to ask if they have an idea about the script modifying question.
    not sure if this is a valid suggestion, but when using replicator with this here, why not do it on the near field where details are visible, and then use a less good-looking grass shader for the distance?

  • tkdrobert said:

    Looks great but I don't have ultrascatter. sad

    And I can't use IRay. My computer doesn't support it. 

    You don't need an nVidia GPU to use Iray, though of course it will be slower using only the CPU (how it compares to 3Delight will depend on how many advanced features of 3Delight you are using).

    I’m still working on a 1.83 Gz MAC Mini, a rather old computer with only 2 GB of RAM to begin with.

  • EsemwyEsemwy Posts: 491

    Awesome! Thanks!

  • mephoria said:
    The default settings in the replicator are ideal for the grass kit, so you can just set the instance count and apply.

    I would suggest to also turn up the random y-rotation fully. I find this adds that subtle touch of randomness even for grass.

    For a ragged lawn change the random scaling.

    This is a really nice grass prop mephoria, thanks so much.

  • barbultbarbult Posts: 10,507
    edited February 28

    Thank you, this is fun and works great! I am a huge fan of Ultrascatter.

    One question: Is the adjustable ground not UV mapped? I created patchy grass and wanted to have a varying texture for the exposed ground, but it would not render anything but flat color. I realize I could use a primitive plane or other ground surface, but I like the adjustable ground.

    Ruins with Mephoria Grass Kit.jpg
    2000 x 1236 - 1M
    Post edited by barbult on
  • mephoriamephoria Posts: 120
    barbult said:

    Thank you, this is fun and works great! I am a huge fan of Ultrascatter.

    One question: Is the adjustable ground not UV mapped? I created patchy grass and wanted to have a varying texture for the exposed ground, but it would not render anything but flat color. I realize I could use a primitive plane or other ground surface, but I like the adjustable ground.

    @barbult: You caught me out. I did, indeed, fail to add a UV map to the ground, and don't really have a good excuse for the failure. I'll try to put together a new version soon which adds both a UV map and some 3delight-compatible textures. (What I really want to do for the ground is to come up with a nice Perlin-base color shader, but I don't have the MDL chops yet to put it together. I agree that a UV-based texture would be a nice stopgap.)

    Thanks for sharing your render. Looks great!

     

  • mephoriamephoria Posts: 120
    mephoria said:
    The default settings in the replicator are ideal for the grass kit, so you can just set the instance count and apply.

    I would suggest to also turn up the random y-rotation fully. I find this adds that subtle touch of randomness even for grass.

    For a ragged lawn change the random scaling.

    This is a really nice grass prop mephoria, thanks so much.

    I agree with the random rotation. That's actually the default setting in replicator, and I do explicitly recommend it in UltraScatter. Random scaling is nice, but for a ragged lawn you can also simply scale all the grass clumps by 200-300%. You can still separately scale the height to your tastes via the grass clump parameters.

    I'm glad you are enjoying the kit.

  • Faeryl WomynFaeryl Womyn Posts: 1,067

    Thanks Dragonfly I saved to my wishlist.

  • barbultbarbult Posts: 10,507
    mephoria said:
    barbult said:

    Thank you, this is fun and works great! I am a huge fan of Ultrascatter.

    One question: Is the adjustable ground not UV mapped? I created patchy grass and wanted to have a varying texture for the exposed ground, but it would not render anything but flat color. I realize I could use a primitive plane or other ground surface, but I like the adjustable ground.

    @barbult: You caught me out. I did, indeed, fail to add a UV map to the ground, and don't really have a good excuse for the failure. I'll try to put together a new version soon which adds both a UV map and some 3delight-compatible textures. (What I really want to do for the ground is to come up with a nice Perlin-base color shader, but I don't have the MDL chops yet to put it together. I agree that a UV-based texture would be a nice stopgap.)

    Thanks for sharing your render. Looks great!

     

    Wonderful. A UV is all I need. I have at least a dozen Iray ground shaders I could apply. Really just a diffuse with some color variation and maybe a noise bump will do for what I was trying.
  • dragonfly_2004dragonfly_2004 Posts: 747

    Thanks Dragonfly I saved to my wishlist.

    No problem ;-)

  • SimonJMSimonJM Posts: 4,944
    edited March 1

    Did a quick use to provide something for the footie player to stand on ...

    Using the suggested Y-Scale of 35% to give a suitable length for a mown pitch/lawn

    Post edited by Chohole on
  • Robert FreiseRobert Freise Posts: 2,053

    Thank You Looking forward to giving this a go

  • mephoriamephoria Posts: 120

    I've updated my original post to remove reports of a scaling bug in UltraScatter. It appears that I was incorrect, and there is no such issue.

  • Thank you very much for this!

  • barbultbarbult Posts: 10,507

    The UltraScatter check box for XYZ Scale seems to be ignored. When it is unchecked, the values in XYZ scale are still used. For example, if I check the XYZ scale box and enter values in X,Y, and Z min and max, they are correctly used. But then if I uncheck the box and rescatter, the previously entered X,Y, and Z min and max values are still used, even though the box is unchecked  and the values are grayed out.

  • mephoriamephoria Posts: 120
    edited March 3

    I've updated the ZIP file yet again, to version 3. (My apologies for the constant churn, but Y'all have given me lots of great suggestions.)

    • Made grass stalks come to a better point.

    • Gave grass clumps have a “more random” distribution of stalks.

    • Added 3delight materials.

    • Added a UV map (and slightly better texture) to the Adjustable Ground.

    • Set grass clumps to not interact with dForce simulations.

    • Updated documentation to reflect changes and an improved understanding of UltraScatter.

    The attached image shows render differences between IRay (with the classic materials) and 3delight (with the newly added 3DL materials):

    grass-irayVS3dlight.jpg
    742 x 600 - 164K
    Post edited by mephoria on
  • manekiNekomanekiNeko Posts: 369
    mephoria said:

    I've updated the ZIP file yet again, to version 3. (My apologies for the constant churn, but Y'all have given me lots of great suggestions.)

    • Made grass stalks come to a better point.

    • Gave grass clumps have a “more random” distribution of stalks.

    • Added 3delight materials.

    • Added a UV map (and slightly better texture) to the Adjustable Ground.

    • Set grass clumps to not interact with dForce simulations.

    • Updated documentation to reflect changes and an improved understanding of UltraScatter.

    The attached image shows render differences between IRay (with the classic materials) and 3delight (with the newly added 3DL materials):

    you updated it? awesome! thanks again! and even thought to add 3dl! YAY! thanks once more ^^ great & fast work!

  • Tim NTim N Posts: 177

    This is a great resource. Thank you.

  • LlynaraLlynara Posts: 4,634

    Thank you for such an incredibly useful freebie!

  • manekiNekomanekiNeko Posts: 369
    edited March 6
    mephoria said:

    Thanks, @manekiNeko, for pointing out surface replicator. I've now tried it out with the grass kit, and it definitely works, with some caveats:

    • Unlike UltraScatter, it can only work on one prop at a time. This means that you'll need to reparent all of the Grass clump props to your ground object and then run Surface Replicator on each of those props individually. Ideally, you'd want up to 5000 instances of each object.
    • Surface Replicator has a wired in limit of 1000 instances per scatter. To get the 5000 instances per clump discussed above, you would need to run it 5 times per clump (for a total of 20 1000-instance executions). Alternatively, it is possible to simply edit the surface replicator script to change the instance limit, which is clearly declared. I've tried this, and it worked for me, but I don't know the script well enough to know what "gotchas" this might produce. My best guess is that it will do fine with 5000 instances, but that it starts getting slow and cranky at 20,000 instances.
    • The default settings in the replicator are ideal for the grass kit, so you can just set the instance count and apply.

     

    i just discovered that when you use replicator, it also replicates hierarchies (or a full figure like genesis!).

    so to avoid having to take the grass props separately, i put them all parented to each other - i.e. the big clump parented to the hill, the medium parented to the big clump, the small parented to the medium, and the 2nd small parentd to the 1st small. you still have to run it 5 times if you want your 20'000 instances, but not for every clump ^^

    Post edited by manekiNeko on
Sign In or Register to comment.