Digital Art Zone

 
   
2 of 4
2
Use hair as grass?
Posted: 19 September 2013 03:39 AM   [ Ignore ]   [ # 16 ]
Member
Rank
Total Posts:  128
Joined  2013-02-23

More on Garibaldi hair on terrains:  couldn’t get the Garibaldi plug-in to grow hair on any deformed ground plane, only on an un-deformed plane.  Growing hair on a ground plane of reasonable size and exporting as a .obj creates a massive file.  Mine was 5GB and growing, so I shut it off.  Went back to using a small tile of hair-grass, and instancing it over my Bryce terrain.  This worked pretty well, as you can see from the result.  Still very low memory requirement and fast rendering.  A decent way to put in background or mid-ground grass; not enough realism for the foreground.

I’ve posted the grass object at:
http://www.sharecg.com/v/72066/view/5/3D-Model/Grass-tile-for-instancing-to-make-a-lawn-or-meadow

Image Attachments
lo-res_lawn.jpg
Profile
 
 
Posted: 19 September 2013 04:05 AM   [ Ignore ]   [ # 17 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2612
Joined  2004-07-06
JStryder - 19 September 2013 03:39 AM

More on Garibaldi hair on terrains:  couldn’t get the Garibaldi plug-in to grow hair on any deformed ground plane, only on an un-deformed plane.  Growing hair on a ground plane of reasonable size and exporting as a .obj creates a massive file.  Mine was 5GB and growing, so I shut it off.  Went back to using a small tile of hair-grass, and instancing it over my Bryce terrain.  This worked pretty well, as you can see from the result.  Still very low memory requirement and fast rendering.  A decent way to put in background or mid-ground grass; not enough realism for the foreground.

I’ve posted the grass object at:
http://www.sharecg.com/v/72066/view/5/3D-Model/Grass-tile-for-instancing-to-make-a-lawn-or-meadow

That looks very good!  And fast rendering?  That is impressive, one of the problems I have had with grass is that while the initial passes are not too bad, the AA pass (due to the use of transparency) is rather crippling.

 Signature 

that Bryce Tutorials Info and this Products made by Horo and myself and a link to my gallery at DAZ 3D

Profile
 
 
Posted: 19 September 2013 12:46 PM   [ Ignore ]   [ # 18 ]
Member
Rank
Total Posts:  128
Joined  2013-02-23

That grass has the “Leaf 1” texture from the materials library, which uses 20%  ambient glow but no transparency.  Render time for the scene about 4 minutes using an older 5i, including AA.  That seemed pretty fast to me, not sure what else you might compare it to.

Profile
 
 
Posted: 19 September 2013 04:13 PM   [ Ignore ]   [ # 19 ]
Active Member
Avatar
RankRank
Total Posts:  732
Joined  2006-05-26
JStryder - 19 September 2013 03:39 AM

More on Garibaldi hair on terrains:  couldn’t get the Garibaldi plug-in to grow hair on any deformed ground plane, only on an un-deformed plane.  Growing hair on a ground plane of reasonable size and exporting as a .obj creates a massive file.  Mine was 5GB and growing, so I shut it off.  Went back to using a small tile of hair-grass, and instancing it over my Bryce terrain.  This worked pretty well, as you can see from the result.  Still very low memory requirement and fast rendering.  A decent way to put in background or mid-ground grass; not enough realism for the foreground.

I’ve posted the grass object at:
http://www.sharecg.com/v/72066/view/5/3D-Model/Grass-tile-for-instancing-to-make-a-lawn-or-meadow

Looks fantastic, and renders quickly. As far as the quality of the blades, it isn’t any worse than the pine tree leaves used as grass in some simulations. Up close the pine tree leaves also fail to be convincing, but if you have enough blades it can be fine even up close.

It is unfortunate that the Garabaldi doesnt want to paint directly onto terrains. I have a suspicion one might need to prepare the target mesh in some way. From the look of characters like bears and cats it appears as though Garabaldi should be capable of painting onto a dynamic surface. At some point I hope to have time to test it myself. If memory was the problem then that is a different concern altogether.

Looking at this terrain there are a couple of considerations. Even though the grass object itself is low poly there are still a few considerations if you plan to populate an extremely large area. It is still possible to consolidate the grass into a single object but you need an external UV mapping application to do it.

1. Create the grass in DS using Garabaldi or Look my Hair just as you did above.
2. Export the clump as an obj.
3. Open your external UV Mapper and ensure that the hair has a default UV which it most likely does.
4. Once you are certain you have a UV map in place save the obj again.
5. Open an instance of Bryce. Import the Uv mapped grass clump you just exported from UV Mapper.
6. Once in Bryce you will build up your target terrain.
7. Now you are ready to start painting. But there are few important considerations:
    A. Make sure you give the original grass object a unique family color.
    B. Make sure you assign the original clump as “Show as Box” before you begin painting it.
8. Now enter the Instance Lab. Within the Instance Lab make sure to UN-CHECK the “Instance” option. In the current situation we want to paint real copies, not instances. I will explain.
9. Paint as you see fit, but do be careful of total polygons. You dont want to exceed about 1 million polygons. I will explain this too.
10. Exit the Instance Lab and you will notice that the canvas updates very quickly due to the show as box setting.

11. The newly painted objects are in a group called Unnamed. All you need to do is to export the entire group called Unnamed as an .obj. But before you do make sure the group doesnt total over 1 million polygons.

12. In UV Mapper import your collection of grass clumps. You will see it takes a minute or two for UV Mapper to get to grips with the complex mesh. Even though it is made of a million separate copies, they share the same uv mapping domains. This is why we need to stay under a million polygons

13. All you need to do now is to export the grass collection but do so with the following options checked
A. Enable the check mark for “Flip UV along Vertical coordinates” (This step is only necessary because Bryce erroneously flips the uv maps on objs when it exports. If you dont fix this the texture will appear upside down when rendered)
B. Enable the check mark “Dont Export Materials.” This will allow Bryce to import the model as a single object instead of a bunch of separate pieces.
Save the model.

14. Now comes the magical part. You will now re-import the model you just saved out of UV Mapper. The OBJ importer will give you certain options for import, you want to select the top one called “Materials”. Now wait a minute or two. It is a complex object with nearly a million polygons in it so it will take a couple of minutes to load into the scene and may cost over a hundred mb in ram memory. No matter.

Once loaded you will find that the model that used to be comprised of hundreds of separate pieces is now a single mesh object. AMAZING, No?

All you need to do now is to copy the matrix of the original Unnamed, and apply its matrix settings to the new consolidated mesh you just created. That’s it.

Now you’ve got grass covering the terrain without using up all your instances. Success. Make sure you delete Unnamed now that you dont still need it.

Why does this all matter? Have you ever tried to paint grass into a scene by using a single blade of grass instanced hundreds of thousands of times? What you discover is that even though instances are cheap, they are not completely free. There is a limit to the number of unique instances the software is willing to keep track of, as each instance no matter how low poly still has a position, rotation and scale information that must be retained costing memory. Over time, the more instances in a scene the more memory used keeping track of the matrices. For this reason, it is sometimes best to consolidate things like grass into a real solid mesh so that you can use your instances for trees and flowers and stuff.

Is this all making any sense? If It’s not please ask me to clarify. Though this might seem like a lot of babble, there is an important point here and I hope you appreciate what we are on the verge of accomplishing here.

One can even create “Tiles” that can be used to cover super large areas.

I have for example, created grass clumps that are spread out over several Bryce units covering a small area. I then save it as a obj and reimport it as a material so that it is all one mesh. I call this a tile. I can then instance that Tile easily spreading grass for as far as the eye can see in all directions without running out of memory. It only works well with generally flat terrains so that the tiles edges arent too noticeable. Yep, that’s right.

I’ve got more to share bu no more time for now. See ya soon!!!!!!!

 Signature 

Please view my Daz3d User Gallery
http://www.daz3d.com/gallery/#users/465/

Profile
 
 
Posted: 19 September 2013 11:43 PM   [ Ignore ]   [ # 20 ]
Member
Rank
Total Posts:  128
Joined  2013-02-23

Thank you Rashad.

Not sure what you mean by external UV mapper.  I guess a program like Hexagon, Carrara or Blender that does that sort of thing?  If something else please clarify.  I’m also not familiar with the idea of a default UV map.  I’ve done nothing with UV maps and have only a vague idea of how they work.  I thought that no UV map exists until the modeler creates it, and am unclear on how Bryce uses UV maps if at all. If there is an option for specifying the UV map for an object in Bryce, I haven’t found it yet.

Your recipe is useful, I gather, any time a huge number of instances is needed.  I can see why you might need that in a large, landscaped terrain like your island model.  In my simple-minded approach, I just try to avoid anything that resource intensive as I have so many other skills to develop in less challenging circumstances.  Admittedly instancing won’t work in Bryce once the number of instances gets too large.  Whatever “too large” is, it does seem to be inversely related to the complexity of the item being instanced. 

I’m kind of surprised that a model with a million polys is workable; never worked with something that large myself and noticed that the UI gets laggy before that number of polys is reached.  Perhaps setting the wireframe to box mode reduces the lag, but makes it so much harder to visualize what’s going on without pushing the render button.

You must be a very patient person, to push the limits of Bryce as you do.  Respect.

Profile
 
 
Posted: 20 September 2013 10:32 AM   [ Ignore ]   [ # 21 ]
Power Member
Avatar
RankRankRank
Total Posts:  1546
Joined  2003-10-09
JStryder - 19 September 2013 11:43 PM

Not sure what you mean by external UV mapper.

You can download “UVMapper”, a 3rd party piece of software, here: http://www.uvmapper.com/  .  The basic application is free, you can also pay to upgrade to another version that has more features.

Profile
 
 
Posted: 27 September 2013 04:14 PM   [ Ignore ]   [ # 22 ]
Member
Rank
Total Posts:  146
Joined  2009-10-16

Hi,

It’s me again. Didn’t have time to check all posts out and do 3D work. I will react to earlier posts later. But wanted to show my newest achievement. I now used Marvelous Designer 2 (a clothing creation program!) to create clumps of grass. After searching for proper info, thanks to Rashad Carter I finally got the picture of how to do instancing, so I did.
I made this in several groups and now have in those groups 128732814 polygons. Size is only 1.38 MB and rendering time with regular aliasing (and IBL, which is a stupid combination, I realise) took about 45 minutes.
This is my best attempt so far. I will keep playing with this.

Hans

Image Attachments
testclothgrassinstance16.jpg
Profile
 
 
Posted: 27 September 2013 04:26 PM   [ Ignore ]   [ # 23 ]
Power Member
Avatar
RankRankRank
Total Posts:  1546
Joined  2003-10-09

            Very nice!

Profile
 
 
Posted: 28 September 2013 01:21 AM   [ Ignore ]   [ # 24 ]
Addict
Avatar
RankRankRankRank
Total Posts:  3568
Joined  2004-10-01
hansmar - 27 September 2013 04:14 PM

... rendering time with regular aliasing (and IBL, which is a stupid combination, I realise) took about 45 minutes.

Why is that a stupid combination? Very nice example.

 Signature 

**  [ Stuff by David Brinnen and myself**  [ My DAZ 3D Gallery**  [ My Website**  OPC 4565 **

Profile
 
 
Posted: 28 September 2013 02:56 PM   [ Ignore ]   [ # 25 ]
Member
Rank
Total Posts:  146
Joined  2009-10-16

Hallo all,

Thanks for many inputs, suggestions and replies. I will try to answer a number of questions and ideas in the order they were posed from the beginning.

@GussNemo. I think the approach in my last original picture (of the ‘look at my hair’ grass) could lead to reasonable or even good looking grass. Depends on the length of ‘hair’, colours, etc. However, that approach was to make a very large ‘hair’ on a full terrain and Look at my hair tends to crash very often when I attempt this. So, it is not the way forward, I am afraid.

@Rashad Carter. The polygon count of the hair object (in third example) was 404064. The terrain was ‘ultrafine’. But it was not a very big terrain, so I am afraid that with a slightly bigger terrain or with a denser ‘hair’ the grass will easily be more than a million polys. I think that instancing is indeed a better idea (as can be seen in my previous mail).

@Horo. Thanks. Though the exact way of doing it is not optimal, I think using hair as grass can still work (with instancing). Still have to try that.

@JStryder. Indeed: instancing is a good idea. I saw a posted tutorial by Rashad that thought me a lot. Before I read (and mostly understood) it, the lab crashed on me very frequently. When making the grass in the previous mail, it worked more or less flawlessly! Your second mail shows that Garibaldi hair is like tubes (which hair is too). Strangely enough, Look at my hair hair is like leaves and therefore (by accident) more suitable for grass. Your (first) picture doesn’t really look much like grass indeed.
The second attempt is slightly more grassy, but the hairs are in my view too thick.
In the render that chohole referred too, it does look reasonable in the distance.
Am I to understand that Garibaldi cannot paint grass on an imported object? Look at my hair makes grass on any imported object.
The Carrara moss looks nice.
And your final terrain with Garibaldi hair/grass works well when seen from somewhat further apart. Although I can still see the tubelike forms. Not much can be done about that, I fear.

@David Brinnen. Indeed, I noted slow AA, even withouth transparency. Of course, good grass and good leaves do have some transparency. That is why I made my last attempt with no transparency, but somewhat lighter colours (which I, by the way) made somewhat more vibrant in Picturenaut after exporting the Bryce render to HDRI.

@JStryder: impressive render speed! My attempt was much slower, though part of that may, of course, be related to differences in our machines. Mine is not a very modern one with Core 2 Duo T6600 2.20 GHz and 4 GB RAM. I assume that even an ‘older’ 5i can be faster.

@Rashad. I do have to try your method! Looks complicated, but probably I will be able to follow it after a few trials. I would like to see an example of what you made with it! Luckily, my last attempt did work quite nicely without memory problems (yet).

Finally. to ad to my thoughts on using clothing instead of hair for grass.
1. I find that Marvelous Designer (which I bought in version 2, still rather cheap) works easier than Look at my hair, although I will attempt is again.
2. You can make several forms of blade that you want.
3. You can control where each blad comes. That is relatively tedious, so I just made lots of lines and fixed blades within regions more or less random.
4. You can add wind, though in my example it didn’t seem to have a lot of effect.
5. You can choose the stiffness and flexibility etc. of the material. I used settings for leather, but stiffer and more flexible can also be used.
6. You can make one basic ‘clothing pattern’ (pieces of not yet stitched cloth). When you ‘run’ the tool, the cloth is stitched, but also dynamically falls around the avatar. When you stop the run after longer or shorter time, you can export the result as object. By rearranging to starting position and doing the run again (longer and shorter periods and more or less wind, or even with changed material settings) you can very quickly create several more or less similar, but slightly different clumps. (Something similar can be done by modifying hairs too, I have to admit).

The process I used was:
a. Make a terrain in Bryce, export as object, import as avatar in Marvelous Designer
b. Create a ground cloth pattern and place it right over the terrain/Avatar (so when running, it falls and stays on the terrain/avatar)
c. Create many lines in the ground cloth to fix the leaves to.
d. create many leaves (one or more forms and sizes)
e. prepare the future stitches by ‘seaming’ the underside of the leaves to a line (you can put more than one on the same line). See picture 1 for the result (from the pattern window).
f. In the 3D window, place the leaves close to the and above the ground cloth and ensure that they have a more or less free fall zone (to prevent strange clumps within the clump of grass). See picture 2 for the result (in the 3D window).
g. Now run, until you like the result (example picture 3). And stop the run!
h. Export the object to obj.
i. Rearrange all patterns.
j. Rerun until you like the results
Repeat h, i and j several times for more clump objects that are not exactly the same. When you want to, also modify the patterns or the material in between reruns.

I think I will give it more tries later. But I will also reattempt Look at my grass with small clumps and instancing!

I would love to see more hair-grass and clothing-grass attempts!

 

 

 

 

Image Attachments
grasscloth.JPGgrasscloth1.JPGgrasscloth2.JPG
Profile
 
 
Posted: 05 October 2013 01:54 AM   [ Ignore ]   [ # 26 ]
Active Member
Avatar
RankRank
Total Posts:  732
Joined  2006-05-26

Hansmar,

Everything you are doing here looks incredible!!!!! Thanks so much for all the detail you’ve provided on your work flow. I will look into this more specifically when I have some time.

 Signature 

Please view my Daz3d User Gallery
http://www.daz3d.com/gallery/#users/465/

Profile
 
 
Posted: 05 October 2013 03:54 PM   [ Ignore ]   [ # 27 ]
Member
Rank
Total Posts:  146
Joined  2009-10-16

Thanks all for the positive feedback.
I made another one. I used several results with the ground ‘cloth’ either fixed or free to move. I wanted to try out Rashad Carter’s advice, but Bryce crashed on exporting (step 11). So I made this one with instancing many times. I also added some trees and it rendered fine, but on saving Bryce crashed again. Probably too many instances.

Still, this one looks nice, I think, though some grassleaves upfront may be a bit big (wide). I will retry the set-up of Rashad later.

Image Attachments
grass-hair5.jpg
Profile
 
 
Posted: 06 October 2013 12:41 AM   [ Ignore ]   [ # 28 ]
Power Member
Avatar
RankRankRank
Total Posts:  1500
Joined  2011-09-25

@hansmar:  The last image is nice looking, even if you believe the foreground blades are too wide.  I don’t think this is something to worry about because it’s how they’d look in RL, depending on the species, and if this is what you’re after.  What I think needs to be considered is angle of view and viewing height.  At the angle in your latest scene, the blades will look larger.  Had that same angle been higher, while the blades would be wide, they wouldn’t necessarily look wide.  Regardless, your results are amazing.

 Signature 

If you constantly look backward, it’s guaranteed you’ll run into something on your forward journey.
My Gallery Page: GussNemo’s Efforts

Profile
 
 
Posted: 06 October 2013 01:40 AM   [ Ignore ]   [ # 29 ]
Addict
Avatar
RankRankRankRank
Total Posts:  3568
Joined  2004-10-01

@hansmar - grass looks really good. I suggest that you use these blades only near the camera. From the middle ground to far you can just use a a bumpy material using the same colours. That’ll fix the memory issue.

I wonder - have you ever used Bantam Grass? It’s free and if you cannot find it on Bantam3D anymore, you can download it from my site (see sig). Go to Raytracing > Tools > Bantam3DGrass.

 Signature 

**  [ Stuff by David Brinnen and myself**  [ My DAZ 3D Gallery**  [ My Website**  OPC 4565 **

Profile
 
 
Posted: 10 October 2013 02:36 AM   [ Ignore ]   [ # 30 ]
New Member
Total Posts:  11
Joined  2006-01-06

this is my new grass (jpg) man I hope this comes out.All Bryce hair made in Daz 4.6 and then redone in Bryce big render time ,5MINS,BMP IS 2.9MIL Just a thought works for now in what I going to do soon.

Image Attachments
grass_set.jpg
Profile
 
 
   
2 of 4
2