amboc ray spread.
9579 15 4- Wren
- Member
- 527 posts
- Joined: July 2005
- Offline
- jason_iversen
- Member
- 12447 posts
- Joined: July 2005
- Offline
Yes you can- have a look at the ray options in the link below. Unfortunately none of these nice optional parameters have been exposed in VOPs (why?) so you'll have to do it yourself.
http://www.sidefx.com/docs/content/vex/guide/vex_shading_rayopts.xml [sidefx.com]
Do you know how to do that?
http://www.sidefx.com/docs/content/vex/guide/vex_shading_rayopts.xml [sidefx.com]
Do you know how to do that?
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
also, http://www.odforce.net [www.odforce.net]
- Wren
- Member
- 527 posts
- Joined: July 2005
- Offline
- Wren
- Member
- 527 posts
- Joined: July 2005
- Offline
- jason_iversen
- Member
- 12447 posts
- Joined: July 2005
- Offline
It will respect displacement, but bear in mind that Mantra will tesselate geometry in order to create displacements that are raytracable. This is controlled by the Level Of Detail slider in the Geometry Object's “Render” tab.
There is no way to really know how finely it's tesselating the surface - and usually it over-tesselates (IMO) for polygonal geometry and this can cause really slow renders. I'd make tests for speed .vs. quality with LOD from 0.1 -> 1.0 and see what happens.
As for “doing it yourself” - you'll need to make a copy of the Occlusion VOP using the Type Manager, and then modifying the copy's VEX code by adding your addntl arguments. It's not too hard to do.
There is no way to really know how finely it's tesselating the surface - and usually it over-tesselates (IMO) for polygonal geometry and this can cause really slow renders. I'd make tests for speed .vs. quality with LOD from 0.1 -> 1.0 and see what happens.
As for “doing it yourself” - you'll need to make a copy of the Occlusion VOP using the Type Manager, and then modifying the copy's VEX code by adding your addntl arguments. It's not too hard to do.
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
also, http://www.odforce.net [www.odforce.net]
- lisux
- Member
- 581 posts
- Joined: July 2005
- Offline
It will respect displacement, but bear in mind that Mantra will tesselate geometry in order to create displacements that are raytracable. This is controlled by the Level Of Detail slider in the Geometry Object's “Render” tab.Mantra always tesselate geometry in order to get micropolygons no?
I have understood that the level of tesselation was controlled by the shading rate (similar to RenderMan i think), here you control the micropolygons per pixel?
And the LOD is the same as shading Rate but for raytracing?
So the render uses Shading Rate when is making a simple scanline render and When needs to sample a hit over a surface uses the LOD to create the micropoligons.
Then you can get situations where for the same geo the render needs to tesselate for the scanline pass and to tesselate for the raytracing pass not?
Please Mark and Jason put some clear here.
Thanks
Un saludo
Best Regards
Pablo Giménez
Best Regards
Pablo Giménez
- wolfwood
- Member
- 4256 posts
- Joined: July 2005
- Offline
lisux
Mantra always tesselate geometry in order to get micropolygons no?
I have understood that the level of tesselation was controlled by the shading rate (similar to RenderMan i think), here you control the micropolygons per pixel?
And the LOD is the same as shading Rate but for raytracing?
So the render uses Shading Rate when is making a simple scanline render and When needs to sample a hit over a surface uses the LOD to create the micropoligons.
Then you can get situations where for the same geo the render needs to tesselate for the scanline pass and to tesselate for the raytracing pass not?
Please Mark and Jason put some clear here.
Thanks
(IIRC)
The Shading Rate controls how much dicing is done to a piece of geometery. A shading quality of 1 roughly equals a micropolygon the size of a pixel. (This is for micropolygon rendering.)
When Raytracing mantra needs to tesselate the geometery, and the amount of tesselation that is done is controlled by the LOD parameter.
You can look at mantra as being two renderers in one. A micropolygon renderer and a raytracer, both the Shading Rate and LOD control the resolution of the geometry that is being rendered but the ShadingRate is limited to the Micropolygon side of things, and LOD is for the raytracing.
<Insert someone saying this is all wrong here>
if(coffees<2,round(float),float)
- wolfwood
- Member
- 4256 posts
- Joined: July 2005
- Offline
Hmmmm examples
Shading Rate: 1
LOD : 1
No Raytracing
Shading Rate: 1
LOD : 0.25
No Raytracing
Shading Rate: 0.25
LOD : 1
No Raytracing
Shading Rate: 0.25
LOD : 0.25
No Raytracing
Shading Rate: 1
LOD : 1
Raytracing (mantra -r)
Shading Rate: 1
LOD : 0.25
Raytracing (mantra -r)
Shading Rate: 0.25
LOD : 1
Raytracing (mantra -r)
Shading Rate: 0.25
LOD : 0.25
Raytracing (mantra -r)
Shading Rate: 1
LOD : 1
No Raytracing
Shading Rate: 1
LOD : 0.25
No Raytracing
Shading Rate: 0.25
LOD : 1
No Raytracing
Shading Rate: 0.25
LOD : 0.25
No Raytracing
Shading Rate: 1
LOD : 1
Raytracing (mantra -r)
Shading Rate: 1
LOD : 0.25
Raytracing (mantra -r)
Shading Rate: 0.25
LOD : 1
Raytracing (mantra -r)
Shading Rate: 0.25
LOD : 0.25
Raytracing (mantra -r)
Edited by - Feb. 11, 2006 04:27:03
if(coffees<2,round(float),float)
- lisux
- Member
- 581 posts
- Joined: July 2005
- Offline
Thansk Wolfwood for your examples, very instructuve.
When you run mantra using -r the raytracer is activated.
Then if my shaders don't use any raytracing function the LOD is taking in count?
The rays are only activated when you use -r and call to any raytracing function into a shader (like prman where the raytracin engine is only called when you use some ray function like trace()).
When you run mantra using -r the raytracer is activated.
Then if my shaders don't use any raytracing function the LOD is taking in count?
The rays are only activated when you use -r and call to any raytracing function into a shader (like prman where the raytracin engine is only called when you use some ray function like trace()).
Un saludo
Best Regards
Pablo Giménez
Best Regards
Pablo Giménez
- pbowmar
- Member
- 7025 posts
- Joined: July 2005
- Offline
The LOD is _only_ used by raytracing, as pointed out above.
Remember that Mantra is a hybrid micropoly/tracer. So, when you do mantra -r it's in raytrace only mode, but that's not the usual case.
Usually, it's an object being shaded with micropolys, but then some raytracing is done too, like ambient occlusion.
What happens there, the “main” surface is rendered with micropolys, so the shading rate applies. However, the ambient occlusion calls are raytracing, so for that part, the LOD applies. It controls how much tesselation is done on geometry that the rays intersect. It's very very unlikely that you need very high LOD for this. Even a perfect mirror, you can usually turn down the LOD to .1 or so (I just tried it).
As Jason correctly points out, the LOD is usually _way_ too high, and makes things too slow.
Cheers,
Peter B
Remember that Mantra is a hybrid micropoly/tracer. So, when you do mantra -r it's in raytrace only mode, but that's not the usual case.
Usually, it's an object being shaded with micropolys, but then some raytracing is done too, like ambient occlusion.
What happens there, the “main” surface is rendered with micropolys, so the shading rate applies. However, the ambient occlusion calls are raytracing, so for that part, the LOD applies. It controls how much tesselation is done on geometry that the rays intersect. It's very very unlikely that you need very high LOD for this. Even a perfect mirror, you can usually turn down the LOD to .1 or so (I just tried it).
As Jason correctly points out, the LOD is usually _way_ too high, and makes things too slow.
Cheers,
Peter B
- wolfwood
- Member
- 4256 posts
- Joined: July 2005
- Offline
lisux
Thansk Wolfwood for your examples, very instructuve.
When you run mantra using -r the raytracer is activated.
Then if my shaders don't use any raytracing function the LOD is taking in count?
The rays are only activated when you use -r and call to any raytracing function into a shader (like prman where the raytracin engine is only called when you use some ray function like trace()).
The -r option tells mantra to do *only* raytracing.
If you are rendering in micropolygon mode, the default, and your shaders need to raytrace for ambient occlusion or whatever then mantra will start raytracing and use the LOD parameter. It will render as much as it can with micropolygons then what raytrace the extra stuff.
So if your shaders don't use any raytracing at all then the LOD parameter isn't used. (AFAIK)
if(coffees<2,round(float),float)
- wolfwood
- Member
- 4256 posts
- Joined: July 2005
- Offline
Bah! Peter scooped me. :wink:
The two foreground objects are real. The two back ones are reflections.
Right Object-
Shading Quality: 1
LOD: 1
Left Object-
Shading Quality: 1
LOD: 0.1
I agree with Peter and Jason though, 95% of the time the LOD defaults to a value a lot higher than it needs (1), but its also the safest setting, (and slower.)
I think the documentation guys should grab this thread and roll it up into the help documenation.
The two foreground objects are real. The two back ones are reflections.
Right Object-
Shading Quality: 1
LOD: 1
Left Object-
Shading Quality: 1
LOD: 0.1
I agree with Peter and Jason though, 95% of the time the LOD defaults to a value a lot higher than it needs (1), but its also the safest setting, (and slower.)
I think the documentation guys should grab this thread and roll it up into the help documenation.
if(coffees<2,round(float),float)
- lisux
- Member
- 581 posts
- Joined: July 2005
- Offline
- Simon
- Member
- 2199 posts
- Joined: July 2005
- Online
Have any of you guys tested whether lowering the LOD actually improves render times for occlusion. I tried a very simple test with simple geometry and it didn't matter if I set the LOD to 0.1 or 5 the render times were identical.
If I did a mantra -r render the render times varied a little but nothing dramatic. Does that concur with your findings?
If I did a mantra -r render the render times varied a little but nothing dramatic. Does that concur with your findings?
The trick is finding just the right hammer for every screw
- wolfwood
- Member
- 4256 posts
- Joined: July 2005
- Offline
Simon
Have any of you guys tested whether lowering the LOD actually improves render times for occlusion. I tried a very simple test with simple geometry and it didn't matter if I set the LOD to 0.1 or 5 the render times were identical.
Try it with displacement
Same displacement shader as above, with a occlusion coverage shader, (32 samples).
NURBs:
LOD: 1.0
Memory - 18.81 MB
CPU - 6:29.39
LOD: 0.1
Memory - 6.42 MB
CPU - 0.39.81
So LOD 0.1 was about 9.75 faster than LOD of 1.0
SubDs:
LOD: 1.0
Memory - 18.29 MB
CPU - 6:50.39
LOD: 0.1
Memory - 6.27 MB
CPU - 1:03.81
(no displacement)
LOD: 1.0
Memory - 15.32 MB
CPU - 1:18.75
Polys:
LOD: 1.0
Memory - 16.62 MB
CPU - 4:04.32
LOD: 0.1
Memory - 5.44 MB
CPU - 27.74
if(coffees<2,round(float),float)
- Simon
- Member
- 2199 posts
- Joined: July 2005
- Online
I thought that would be it, mantra is clever enough not to tesselate when it doesn't need to. Since I'm not that bothered about displacement when calculating occlusion i not going to get much speed up there. Oh well. Back to the drawing board. Cheers for the stats.
The trick is finding just the right hammer for every screw
-
- Quick Links