PDA

View Full Version : Sampling vegetation in Mental Ray


techmage
12-27-2006, 12:38 AM
I've always used pfx in maya software or billboards for vegetation. I'm trying to work out a workflow to use full 3D tree models in mental ray. I'm sort of daunted by how many samples mental ray has to use to render a tree. Full 3D trees seem to pump the rendertime up more than I expected it to. So I'm just wondering if anyone who has already worked this out would be willing to share some possible performance tips when it comes to rendering vegetation in mental ray. Or is attempting this in mental ray even worthwhile because of rendertimes? Should I just invest some time in learning Vue and Xstream?

and BTW, the mia_material set up to be thin walled tranluscent and fast interpolated works remarkebly well as a leaf shader. http://team.digitalpaintball.net/rygoody/trees.jpg

joit
12-27-2006, 02:47 PM
if you really need the trees to be 3d, you could use antialias samples overrides (in the mental ray section of ech object). you won't see any difference if you use dof ;)

joie
12-27-2006, 04:28 PM
You may think Im stupid but I dont tend to render everything with Mental Ray, in this case, vegetation is render much faster and cleaner with MAYAs own renderer, I had to render a huge animation and Mental Ray ruined all my trees, I rendered again that layer with MAYAs renderer and all worked as espected.

Hope it helped.

:)

MaNdRaK18
12-27-2006, 05:10 PM
You may think Im stupid but I dont tend to render everything with Mental Ray, in this case, vegetation is render much faster and cleaner with MAYAs own renderer...

Yeah, but then, how would You FG it AO it?

ghostlake114
12-27-2006, 08:04 PM
Or is attempting this in mental ray even worthwhile because of rendertimes? Should I just invest some time in learning Vue and Xstream?



At first, I must say I always face project with large area, or town with many tree, plant, forest and.... sorry, but myself CANT find a good way to do them with Maya :buttrock:
==
I make model with Maya and then there are 2 option:
===
1. Convert it into Vue native and Render with Vue. I think It has a good renderer If we know how to control
2. Use Vue Xstream: in this case, only do If u have small vue file (<100 MB, Vue file usally large If u make many tree cuz of the eco system). Good to render in Maya, but one thing in VueXstream with Vue 5: GI and FG *DO NOT* affect Vue object in Maya... But most case they are not necessary :)
The fact I found making nature using Vue is great... and If we know Maya, so we have nature in our hand :)
==

techmage
12-28-2006, 12:47 AM
ghostlake114, so the plants from xstream don't have any GI or FG on them at all? Is there any way to get some GI calculation on them? I though the vue xstream renderer had that built in.

Exo7
12-28-2006, 01:55 AM
I'm sort of daunted by how many samples mental ray has to use to render a tree.
That's talking about AA samples or fg rays ? I remember that the only time fg had to compute LOT of additional fg rays was when rendering a pfx tree. I think this is because the leafs are very near from each other, sometimes beneath the distance of the fg radius and I'm not sure but that may be the cause for a longer render time. Definitly overrides may help, fg overrides I mean. This doesn't exclude AA overrides as well.

techmage
12-28-2006, 02:47 AM
I set my FG min radius on view to rather large, like 10 min, 1000 max. Then use AO to get into the smaller areas. So calculating FG on the trees actually doesn't take very long at all. The AA samples is what gets me.

Also I think raytracing the area light shadows through the tree is doing a number on rendertime as well. Anyone know of a way to lower the sampling quality of shadows on the tree?

jbradley
12-28-2006, 01:38 PM
I've always used pfx in maya software or billboards for vegetation. I'm trying to work out a workflow to use full 3D tree models in mental ray. I'm sort of daunted by how many samples mental ray has to use to render a tree. Full 3D trees seem to pump the rendertime up more than I expected it to. So I'm just wondering if anyone who has already worked this out would be willing to share some possible performance tips when it comes to rendering vegetation in mental ray. Or is attempting this in mental ray even worthwhile because of rendertimes? Should I just invest some time in learning Vue and Xstream?

and BTW, the mia_material set up to be thin walled tranluscent and fast interpolated works remarkebly well as a leaf shader. http://team.digitalpaintball.net/rygoody/trees.jpg

If you are using MR for Maya, good luck. MR for Maya does not have the memory capacity to deal with huge poly scenes. Unfortunately, Alias (at the time) did not implement the ability to use dynamic geometry shaders properly. The .mi text node and piping that information into the geometry shader is straight up broke... which has been a major beef with me for a long time.

Aside from doing that, if you can handle the scene in Maya, you can use Export Objects on Demand in MR and trees will be loaded into memory when a ray intersects the bounding box for that specific tree. Render times will be quite long though.

BTW, that's a very good result on that tree. Would you be willing to share a test scene with a very simplified tree for any of us to check out? Given some time, I have a few scenes using instanced geometry from a particle system (on a land area basically) that I may be able to test out and see what kind of performance I can get.

good luck!

ghostlake114
12-28-2006, 05:06 PM
Vue render engine is good and fast .. so MR is not necessary :)

techmage
12-29-2006, 10:01 PM
If you are using MR for Maya, good luck. MR for Maya does not have the memory capacity to deal with huge poly scenes. Unfortunately, Alias (at the time) did not implement the ability to use dynamic geometry shaders properly. The .mi text node and piping that information into the geometry shader is straight up broke... which has been a major beef with me for a long time.

Aside from doing that, if you can handle the scene in Maya, you can use Export Objects on Demand in MR and trees will be loaded into memory when a ray intersects the bounding box for that specific tree. Render times will be quite long though.

BTW, that's a very good result on that tree. Would you be willing to share a test scene with a very simplified tree for any of us to check out? Given some time, I have a few scenes using instanced geometry from a particle system (on a land area basically) that I may be able to test out and see what kind of performance I can get.

good luck!

I'm rendering archviz still shots, mostly fancy residential houses. So I don't need many trees, just a few really good looking ones. I don't think I'll hit mental rays limitations. But just in case, do you have any links about that export on demand?

My tree is not that diffucult to replicate at all. That render is just using the max9 physical sky with default settings and the mia_material. I've attached the mia_material preset I used for the leaves. Plug a leaf texture into the diffuse color and the tranlucency color. Then put the alpha map into the cutout opacity.

pudand
01-29-2007, 04:18 PM
Hello, I've followed Rygoody tips about using a billboard file with a mia material but I get a square shadow from the plane, I'm going crazy... Is there anybody so kindly to post an easy scene with the correct setting, please?
Thank u in advance.
Andrea

techmage
01-29-2007, 08:10 PM
make sure the mia_material is plugged into the shadow shading slot on the SG node as well

pudand
01-29-2007, 09:31 PM
Rygoody, thank u for your help, but I can't understand how to do it what you said. Sorry, I'm a little bit thick in my mind, I've already spent a couple of hours for nothing.

techmage
01-30-2007, 04:46 AM
Go into the hypershade and expand all the input and output connections on your mia_material. The shadingEngine node is the last one in the chain, click it, make sure your in the attributes of the shadingEngine and not the mia_material, sometimes it will default your attribute editor to the material's attributes and not the shadingengine nodes attributes. Then expand the mental ray section, then middle mouse drag your mia_material into the Shadow Shader slot.

pudand
01-31-2007, 12:37 AM
Hi Rygoody, I still have not luck with the alpha shadows, they are not correct. Can you please have a look at my scene to check what is wrong?
Thank you in advance for your help.

techmage
01-31-2007, 12:59 AM
That problem is caused by using scanline, use raytracing.

pudand
01-31-2007, 01:11 AM
Thank u so much Rygoody, now it works!

victor
01-31-2007, 02:51 PM
Yeah, but then, how would You FG it AO it?Accurate FG and AO is not very important on trees since the leaves are so random anyway. Clever use of texures can achieve mostly the same look, and if you do still want to render everything with MR, you can turn down the FG and AO samples for the trees significantly and still get a nice render.

techmage
02-01-2007, 01:04 AM
^^ Ya, I found you can render the leaf billboards with atleast 20% lower FG quality than you'd use on a building render.

You can also sample the leaf billboards at 0,0 and not have the quality degrade much.

and since leaf billboards don't really need to be darked in really tight corners, you don't even need AO

techmage
03-06-2007, 07:29 PM
I rendered out this test just to see.
Rendertime 3:31:40, inside of objects sampled at 0,0, the edges sampled at 1. FG accuracy 50, density .1, interpolation 100. Rendered across six 2.8 P4's with satellite. 833520 triangles, each tree is 2665. Used large BSP and export on demand.

...ya full 3D trees like this definanetly aren't a possibility

CGTalk Moderation
03-06-2007, 07:29 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.