Home Technical Talk

Using alpha planes in a scene, how do I optomize them for efficiency?

polycounter lvl 10
Offline / Send Message
Chris Bruin polycounter lvl 10
In this project I'm working on, I need to populate the ground with bushes, the trees with leaves, walls with plants, etc. etc.. I have a lot of alpha planes I have to work with and eventually light (This is going to suck so hard) and I have way, way too many already.

Here are two shots of said alphas

The total right now is about 6000 polys, and about 2000-3000 alpha'd objects in the scene. If I fill the entire ground up with plants, I am expecting hours a frame to render. I am looking for results like this when I am done, but I don't have months to render this scene. Is there a way to optimize my use of alphas to get great results yet keep it fast for rendering? I've just started this project, so I am willing to change everything I've done to help me out in the long run.

Thanks a bunch!

Replies

  • Eric Chadwick
    Best bet is to actually do this in a game engine, if at all possible, not offline-rendered. Crysis is a good bet for vegetation, if you get Crysis Warhead you can use the Cryengine2 editor. It has great tools for making levels like this. Or UE3 since it's easily available now.
  • commander_keen
    Offline / Send Message
    commander_keen polycounter lvl 18
    For non realtime rendering:
    Render times are pretty much completely dependent on your render settings, not triangle count. Just dont use fancy lighting stuff and it should be fine. In a real work environment you would probably have hundreds of depth map shadow lights and/or other cheap to render lights, no radiosity or anything. Even though your reference image is mostly low poly I would still consider it to be a non realtime render. It also looks like there was a ton of 2d post work done on it.

    For realtime rendering:
    You would use hard (1 bit) alpha so stuff doesnt have to be depth sorted. Use larger foliage geos and have some of them LOD out. Do more with the ground geo, make steep ledges and blend a few textures together and maybe use parallax displacement on it.
  • AnimeAngel
    What software you using? If max, i believe, you can make several bushes and trees and use them as proxies in your scene. This way you can have really high poly objects with textures and alphas, but they are in a separate file so they wont bog down your system. Takes some time to setup and you need to use xref materials but worth it for something like this. I know my wife uses all the time to build heavily detailed cities and landscapes.
    Proxies are only available in the last few versions of max though. Dont know if maya or others have this feature
  •  Chris Bruin
    Offline / Send Message
    Chris Bruin polycounter lvl 10
    Best bet is to actually do this in a game engine, if at all possible, not offline-rendered. Crysis is a good bet for vegetation, if you get Crysis Warhead you can use the Cryengine2 editor. It has great tools for making levels like this. Or UE3 since it's easily available now.

    I have Crysis and can get the Cryengine 3 (Student license) to use for my project, but I have no clue how to use the engine and how to set everything up in it. I'm just using Maya 2010 for now and will be rendering with Mental Ray. I have UE3 and again, I don't know how to use it. Time is limited for my project, I have 6 weeks to get this thing completed and learning a whole new software package is quite time consuming. I'll take a look into the CE3 and UE3 (again) and see if I can get something up and running in short order, but chances are I won't be using it.
  •  Chris Bruin
    Offline / Send Message
    Chris Bruin polycounter lvl 10
    AnimeAngel wrote: »
    What software you using? If max, i believe, you can make several bushes and trees and use them as proxies in your scene. This way you can have really high poly objects with textures and alphas, but they are in a separate file so they wont bog down your system. Takes some time to setup and you need to use xref materials but worth it for something like this. I know my wife uses all the time to build heavily detailed cities and landscapes.
    Proxies are only available in the last few versions of max though. Dont know if maya or others have this feature

    I'm using Maya 2010. I assume proxing the objects is the same thing as caching in Maya, but does that work with animated (gobo's) lighting?
  •  Chris Bruin
    Offline / Send Message
    Chris Bruin polycounter lvl 10
    For non realtime rendering:
    Render times are pretty much completely dependent on your render settings, not triangle count. Just dont use fancy lighting stuff and it should be fine. In a real work environment you would probably have hundreds of depth map shadow lights and/or other cheap to render lights, no radiosity or anything. Even though your reference image is mostly low poly I would still consider it to be a non realtime render. It also looks like there was a ton of 2d post work done on it.

    For realtime rendering:
    You would use hard (1 bit) alpha so stuff doesnt have to be depth sorted. Use larger foliage geos and have some of them LOD out. Do more with the ground geo, make steep ledges and blend a few textures together and maybe use parallax displacement on it.

    I was planning on using a few nice lighting tricks, god rays, light fog, soft lights, gobo's, and a few other types of lighting. This piece I'm using for part of my demo reel (Hopefully) so I want to keep the render times down without sacrificing quality.

    I'll definitely be LOD'ing my stuff out if it is far away from the camera. I haven't used Parallax Displacement before; does that add to the total poly count? I am trying to keep my project low poly while getting everything I can from it. If low poly isn't working out for me I will crank it up and disregard poly count then.
  • teaandcigarettes
    Offline / Send Message
    teaandcigarettes polycounter lvl 12
    ParadoxTLH wrote: »
    I have Crysis and can get the Cryengine 3 (Student license) to use for my project, but I have no clue how to use the engine and how to set everything up in it. I'm just using Maya 2010 for now and will be rendering with Mental Ray. I have UE3 and again, I don't know how to use it. Time is limited for my project, I have 6 weeks to get this thing completed and learning a whole new software package is quite time consuming. I'll take a look into the CE3 and UE3 (again) and see if I can get something up and running in short order, but chances are I won't be using it.

    You can open one of the maps included in the single-player campaign and take a look how it's done. All vegetation and texture layers can be exported - that would give you a nice amount of stuff to play around with and you can replace the vegetation models (and retain their position, rotation etc.) at any given time via database editor.
    CE2 (can't say anything about CE3 - since I haven't used it yet) is incredibly easy to use. As long as you know how to operate objects in 3d space you shouldn't have any problems. Just export a bunch of presets, set up a basic scene and you can tweak them whenever you want. That's pretty much how I learned it.

    Normally, exporting vegetation can be a little bit tricky, since you have to apply propper settings in the material editor, in order to achieve right foliage bending. But if it's just a scene you can easily export your models and apply avegetation shader to them.

    http://wiki.crymod.com/index.php/Main_Page
    http://doc.crymod.com/

    These links should help you with basic map creation and exporting.



    If you want to quickly make a scene with heavy vegetation I highly recommend CE.
  • Ark
    Offline / Send Message
    Ark polycounter lvl 11
    I agree with commander_keen, don't use GI/FG to light scenes that are classed as game scenes because your scenes won't look as good when you get them in a game engine.

    If you still want to do this, you could render the alpha mapped stuff as a separate pass using the standard maya software render to keep render times down, then render the rest with Mental Ray and composite them later in Photoshop.

    CE2 as mentioned above, is great for this stuff, although it should be possible in any engine.
  • frubes
    If this is for offline rendering then Proxies are definately the way to go (i would recommend Vray proxies). We have had tens of billions of polygons in max using proxies. Mostly foliage. If you can keep the variety of foliage down to say 4/5 different types of tree or leaf etc then that will help with render times. 6000 polys in mental ray will most definately not take hours unless you are doing something drastic with your render settings. As others have said for a scene like this then you really dont need to use GI/FG. Take a look at this tutorials from gnomonolgy and you will see how emulating GI using traditional techniques effectively can render in very small amounts of time.

    http://gnomonology.com/group/16

    Also check out the soulburn scripts from Neil Blevins here:

    http://www.neilblevins.com/soulburnscripts/soulburnscripts.htm#Soulburnscripts_for_3dsmax

    There is a script called "object painter" which will allow you to paint all your foliage onto the ground super quickly.
  • Mark Dygert
    Frubes, he's using Maya2010...
    ParadoxTLH wrote:
    Using alpha planes in a scene, how do I optimize them for efficiency?
    Don't use them.

    Great for realtime in certain scenarios.
    Piss poor for offline rendering, avoid them whenever possible unless you can cheat the shadows somehow.
    ParadoxTLH wrote: »
    I was planning on using a few nice lighting tricks, god rays, light fog, soft lights, gobo's, and a few other types of lighting. This piece I'm using for part of my demo reel (Hopefully) so I want to keep the render times down without sacrificing quality.

    I'll definitely be LOD'ing my stuff out if it is far away from the camera. I haven't used Parallax Displacement before; does that add to the total poly count? I am trying to keep my project low poly while getting everything I can from it. If low poly isn't working out for me I will crank it up and disregard poly count then.
    Straight geometry is always faster than rendering shadows that include opacity maps. Sounds like crazy talk but its true most offline rendering engines handle extreme amounts of tris really well but toss them an opacity map and everything slows down to a crawl, start stacking them and adding lights and you're screwed.

    Run some simple tests before digging in and creating a lot of stuff based on realtime construction methods. It's not always about saving tris, its about saving complex computations, and rendering shadows through opacity maps falls into complex computations.

    You can keep it relatively realtime or easily converted over by trimming your planes to mimic the over all shape of the vegetation and use the geometry to render the shadows instead of the opacity map. Or turn off shadow casting on the planes all together. Then use negative lights to fake the shadows or AO.

    Rendering a shadow that has to include opacity info from a map, is going to kill render times, especially if you have a scene full of them.
  • frubes
    Vig wrote: »
    Frubes, he's using Maya2010...

    I dont know quite what you mean? You can get Vray for Maya now if thats what you are querying.
  • Mark Dygert
    Opps probably should have quoted this
    Also check out the soulburn scripts from Neil Blevins here:

    http://www.neilblevins.com/soulburns...pts_for_3dsmax

    There is a script called "object painter" which will allow you to paint all your foliage onto the ground super quickly.
    Neil doesn't have an object painter script for Maya, there are object painter scripts out there, but the only one Neil has done is for 3dsmax. Everything else was fine =)
  • frubes
    Ahhhh! i see! Good spot.
  •  Chris Bruin
    Offline / Send Message
    Chris Bruin polycounter lvl 10
    I may switch to geo objects instead of alpha planes if I can't get decent render times in Maya or can't learn the CE3 in the span of two or three weeks.

    For Painting stuff in Maya, that's easy enough (I have a script for doing easy painting).

    Thanks guys for the suggestions, I'll see what I can do. Also, I'll probably post progress shots if anyone wants to see.
  • ivars
    Offline / Send Message
    ivars polycounter lvl 17
    Did anyone say Paint Effects?
  •  Chris Bruin
    Offline / Send Message
    Chris Bruin polycounter lvl 10
    ivars wrote: »
    Did anyone say Paint Effects?
    My teacher constantly recommends them. I want to avoid them, because it feels like cheating to me... But, I may end up just using it for grass. After all, it is the end result that matters.
Sign In or Register to comment.