After releasing version 1.0 of my Grass Generator script, a lot of people responded really positively, of which some had some great ideas regarding what could be added in the future.
So for now, I'm releasing version 1.1, which has a lot of improvements code-wise, thanks to user barigazy on Scriptspot, who took a look at it as well and suggested some improvements.
Not a lot of new features just yet, except for the option to automatically create a Multi/Sub material for the grass patches. The overall speed of the script has improved quite a bit as well though, so that's always nice. :)
What are the plans for developing this script further, then? I've been reading the feedback both here and on Scriptspot and there's a few features I'll be looking to implement in the future, though some might take (a lot) more time than others, seeing that the work is being done in my free time. A few examples of suggested features are the following.
- Saving custom presets
- Automatic generation of Proxies (Initally for Corona, Vray & mental ray)
- Multi/Sub creation specific to renderer
- Scattering on existing geometry / More controls for scattering
- Option to delete existing / old grass patch(es) when creating a new one
These are just a few of the many suggestions that were brought up. I'll also look into creating a video tutorial on how to use the script, again when I find the time to do so.
I also wanted to thank everyone for the kind words and the suggestions, it's been really nice hearing from all of you! I'm always open to suggestions and would love to see some of the work created with the script.
Doing archviz work, you're bound to run in a situation where you're going to need some natural / organic elements to fill up your scene. Of course, there's a quite a few plant libraries available to buy, but sometimes it's nice to have techniques to make your own stuff. Not only is it cheaper, but it grants you more control over the final look of your renders.
Rather than modeling each individual blade, I found a way to get similar results using just modifiers. This, in turn, allowed for the process to be automated into a script. And so the Grass Generator was born.
Scattering individual grass blades however, isn't very optimal in scenes where large areas need to be covered in grass. So after the blade creation algorithm was finished, it was time to add functionality to create patches of grass ready to be scattered with plugins such as Multiscatter or Forest Pack.
The Grass Generator interface
At first glance, there's two sets of controls present in the interface. Grass Blade Settings and Grass Patch Scatter Settings.
Grass Blade Settings
With the parameters in the Grass Blade Settings you can control the look of the grass blades themselves.
Amount of Unique Blades controls how many different blades will be generated, the more of these are present in your grass patch, the more randomness you'll have.
Length, Width and Bend will control the look of the individual blades. Random values between the set minimum and maximum will be used. The Lock button allows use to use a set value (min) instead of a random one.
Cut Grass allows you to simulate a mowed lawn type of look. UV's are also automatically cut off at the specified length. Note that the cut length can never be longer than the blade length.
Grass Patch Scatter Settings
These parameters will control how the individual blades are scattered to create a grass patch. The checkbox on the right turns scattering on and off, allowing you to keep the individual created grass blades if you so desire.
Grass Patch Scatter Radius does exactly what it sounds like. This setting will control how large your patch of grass will be.
Grass Patch Scatter Density gives three options for how many blades are created per patch. This amount scales automatically depending on how big the patch is and how dense you want it to be.
Blade Random Rotation controls the rotation of the blades in the patch starting from their base.
Blade Random Scale adds a random scale percentage to the individual blades, again starting from the base of each blade.
Random Material ID's allows for each blade to be assigned a random material ID starting from 1 to the selected number. (ie. If the standard of 3 is selected the grass blades will have ID's 1, 2 and 3)
- Run the script in Max.
- Look for the category "DAZE" in the "Customize user interface" section.
- Add the "GrassGen" command to a toolbar / quadmenu.
- Click it and have fun!
Grass Generator v1.0 has been tested in 3ds Max 2013 and 2014, but should work in a few earlier versions too.
If you've come this far, congratulations! In the next section I'll explain how the grass is generated. This is the technique I mentioned earlier.
Step 1: Setting up the plane
First you'll create a plane with 1 width segment and a few (in this case 5) length segments. Using this method ensures you have correct UV's for use with a basic grass texture (such as the one linked in Part 2 of Peter Guthrie's tutorial), without having to set them manually. (Make sure "Generate mapping Coordinates" is enabled in the plane's options.) After centering it in the scene, you'll then turn it 90 degrees on the X axis.
Move the plane up until a small part of the bottom is sitting under 0 on the Z-axis. Then position the pivot point of the plane on [0,0,0]. (See screenshot)
Step 2: Adding modifiers for the basic shape
In this step you'll add the first two modifiers to start giving our grass the right shape. The first one is a Taper, with the amount set to a negative value (-0.8 in my case). Make sure to set it' primary axis to the Y-axis, otherwise the plane won't deform at all.
Next, add a bend modifier to simulate gravity making the grass blade hang down a little. For this to give you the correct result, you'll have to change the Bend Direction to -90 and the Bend Axis to Y. Setting the Bend Direction to -90 is important as the front facing polygons will be aligned correctly. Bend Angle is, of course, set to your preference. Your plane should now look like the screenshot.
Step 3: Meshsmooth
As the name of the step suggests, next you're going to add a "Meshsmooth" modifier. Not a Turbosmooth!
Meshsmooth has a Subdivision Method called "Quad Output". When this is used on the geometry you created it will add a "dip" in the middle of the mesh, which brings you closer to the shape of a grass blade.
If you turn off the "Isoline Display" option in the "Local Control" rollout, you'll be able to see the effect more clearly. This little dip really adds to the detail of the grass reflection.
You can leave the Subdivisions set to 1 and the Smoothness set to 1.0
BONUS 1: You can add a "Relax" modifier to accentuate the dip even further. In the script the Relax Value is set to 1.0 and the iterations to 1. Make sure you leave "Save Outer Corners" checked or your mesh will start to deform, losing the blade's shape.
BONUS 2: Add a Turbosmooth modifier to smooth out the final shape.
And that's it! :)
Now, you might ask yourself what the advantages of this method are, rather than just modeling it yourself. In my opinion, flexibility. Doing things this way allows you to quickly generate different variations, without having to model each one individually. It also allowed me to automate the process into a script, making the process even faster.
If you've read this far, thanks, that's it for now. I hope you enjoy using the script and I look forward to seeing your results. If you'd ever like to suggest features or would like to work with me on improving the script, be sure to click on the version number for my details.
When searching for the right tools for the job, you often end up on the website of a company offering a (range of) commercial plugins(s) that is suited to the task. Sometimes though, if you only need subsets of the plugin's functionality, you can find free tools that equally well suited.
That's the reason for this roundup. When it comes to fracturing objects in 3ds Max there's a wide variety of tools available to you... for free! Rather than focusing on the big well-known commercial plugins such as RayFire or Volumebreaker, I'd like to give you an idea of what you can find if you look around a bit on a website such as ScriptSpot, which provides a plethora of free and commercial scripts and plugins for 3ds Max. This roundup is still only a selection of what you can find for free, based on my personal experience with these great tools.
With that said, it's time to get down to business.
1. Fracture Voronoi
This script by user Garp on ScriptSpot has been around for quite some time. A lot of 3ds Max VFX tutorials on the web use this script as their preferred quick fracturing solution. The interface is very self explanatory, which makes it fast and easy to use. If I'm ever in need of quick, basic fracturing I find myself coming back to this script quite a bit. You can find it here.
Also, Louis Marcoux made a variant of this script where it fractures the currently selected objects, rather than the picked object. That version can be found for download here. BONUS: The page also contains a great 3 part tutorial on how to blow stuff up in 3ds Max.
More a plugin than a script, this great tool by user LittleLordPotala works a little different than the other two featured items in this list. It's a modifier which can be applied to all kinds of objects in 3ds Max, effectively giving you the option to procedurally fracture objects and retain control down the line.
One of its key features is dynamic interaction with different objects in your scene, even particle systems. This makes it a lot of fun to experiment with, as you can see your fractures update in the viewport in real-time. When you're satisfied with the result, just hit the fracture button and VoroFrag will create the geometry. (see screenshot below)
3. Advanced Fragmenter
As the name suggests, this script by user Jbond is quite fully featured indeed. If you've ever used RayFire, Advanced Fragmenter will definitely look familiar. One could say a fair amount of design decisions regarding the interface (and some other features) have been "inspired" by its commercial counterpart.
All jokes aside though, this script has a lot to offer in terms of functionality. Not just all kinds of custom and automatic fracturing, but also things like bullet holes, a bunch of mesh cleanup utilities and even a history where you can hide, unhide and delete individual layers of fractured geometry.
One thing to note at the moment is that Advanced Fragmenter is currently at version 1.0, so some things still need to be smoothed out. For example, part of installing the script requires copying some icons to a hidden system (sub)folder. There also exists a dependency on iToo Software's free Clone modifier, which will have to be installed to access the cloning functions in the Modifiers Tab. Also, with all its functionality, it would be nice to have seen some kind of user manual, as at first it can be a bit daunting trying to figure out what every button does.
These are just minor gripes though, because once you get used to the interface, experimenting is easy and a lot of fun.
The Fragment Tab contains all the basic controls for quick and custom fragmentation. You can easily just break up your geometry in a certain amount of chunks or really get down and dirty with the look you're after by using a custom cutter shape.
Custom fragmentation is a breeze thanks to a dedicated interface in the Modifiers Tab, where you can tweak and clone your slicing geometry by adding modifiers via a custom interface. This is great for when you need precise control of how the fragments should look. There's even controls for freehand drawing a shape in the viewport to create your custom shape.
The Post Tab allows you to quickly iterate by removing or hiding fragmentation layers.
The Advanced Tab has options for creating bullet holes, down to the creation and control of a custom shape for the holes themselves.
The Pro Tab allows you to use helpers and existing scene geometry to fragment your objects.
And finally, the Utilities Tab allows you to clean up your fractured geometry.
Advanced Fragmenter has a lot more to offer than what I just glossed over here, so definitely have a look at what it can do. To get started, there's a few videos supplied by the creator of the script, which give you a nice overview of what's possible with it.
There's still a few bugs present as it's version 1.0, so be wary of course, but don't let it spoil your fun as you get to know the ins and outs of this great free script.
You can find it on the ScriptSpot page here.
Keeping an eye out for scripts such as these can really help you create some amazing work, without adding additional cost to production. Like I mentioned before, these are just three scripts I hand-picked because I use them every now and then. There's many more great free tools like these available, and the 3ds Max scripting community is very active in a lot of places. I hope you enjoyed reading this article and wish you a lot of fun experimenting!
Another update to my Rorschach script. It's a script for generating weird shapes in 3ds Max. It started off as a personal exercise to teach myself Maxscript, but every now and again I like to add little things to give it more control or functionality.
So what's changed in version 2.5?
- A new base geometry selector was added.
- A progress bar was added.
I came across a post on the Autodesk Area 3ds Max Forums asking about how to render a hidden line look (with a glow). My first quick attempts with a Standard material set to "Wire" didn't quite hit the mark. I noticed using that using this material tends to override any other shaders you combine it with. (Blend, Composite,...)
So I tried to approach the hidden line effect from a different angle. A gradient map set to "Box" and its interpolation set to "Solid", combined with and UVW Map modifier set to "Face" can produce a hidden line look. This could be enough to use in production if you're not concerned with the alpha channel being fully white for your entire object. Setting the render to Add / Screen / Plus in your compositing package can yield the result you want when using black are your base colour in the gradient map.
I like to be thorough though, so combining this technique with a Blend shader and a Matte shader not only gave me the desired result but also a clean alpha channel containing only the lines. I decided to make a quick tutorial explaining the process. This is the first tutorial I've made so if you have any comments for improvement, let me know.
Every now and again, I'll try these quick shots to see what I can get done in about an hour. It's a great little exercise to see how quickly you can prototype something and get a nice result. This one took just a little under an hour, rendering not included.
The final image in 1920 x 1200 and took about 15 minutes to render with Corona. A little post was done in Nuke.