RE: massive hair instance render

Date : Thu, 31 May 2007 09:17:48 -0400
To : <XSI(at)Softimage.COM>
From : "Halfdan Ingvarsson" <hingvars(at)Softimage.COM>
Subject : RE: massive hair instance render
Because XSI partitions the render hairs into a number of mental ray hair objects, each containing no more than X hair segments. So the more hairs you set it to, the more hair objects the render hairs get split up into. 

This has nothing to do with BSP settings. What you're seeing is more hair objects in the main BSP tree at this point.

This was done for two reasons: First, over a certain amount of hair segments, the mental ray hair BSP tree showed some significant degradation in performance. Secondly, the rasterizer likes to play with triangle objects that contain no more than roughly 16K triangles at a time. This is to avoid it pinning too many triangles in memory for each tile.

 - ½ 

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Bernard Lebel
Sent: 30-May-2007 21:42
To: XSI(at)Softimage.COM
Subject: Re: massive hair instance render

Kris: dynamic bsp is in the optimization tab of the mental ray options.


Halfdan: when I change the hair settings like hair total and strand multiplier, why is it affecting the scene bsp tree coloring in the diagnostic mode?, even when working in scanline/raytrace?

Strangely, when I posted the above test, I was doing it in XSI 5.11. I tried the same thing in XSI 6.01. Is there a difference between the two versions?



Bernard




On 5/30/07, Halfdan Ingvarsson <hingvars(at)softimage.com> wrote:
>
>
> Right-o.
>
> From the perspective of the scene BSP, the hair object is just an 
> opaque box. When a ray/scanline hits that box, the hair sub-renderer 
> is called, which uses its own BSP, the settings of which are found on 
> the individual hair primitive's ppg.
>
> A BSP tree is only used to accelerate ray/triangle intersection. It 
> does this by collecting triangles into a recursive set of axis-aligned 
> boxes and eliminating those triangles whose boxes the ray doesn't hit. That's all.
>
> In scanline/raytrace mode, the hair is rendered directly from the hair 
> object, using the original hair data. In this case the hair's BSP 
> settings are used.
>
> In rasterizer mode, the hair is converted directly to triangles and 
> added to the global pool of renderable triangles. In this case the 
> hair's BSP settings are ignored.
>
>  - ½
>
>  ________________________________
>  From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On 
> Behalf Of Bernard Lebel
> Sent: 30-May-2007 09:50
>
> To: XSI(at)Softimage.COM
> Subject: Re: massive hair instance render
>
>
> Gods of mental ray, correct me if I'm wrong.........
>
>
> Just to be pedantically clear about what does the hair BSP:
>
> The geometry generated by hair is part of the "main" BSP tree and 
> changing the hair generation settings like number of hairs and strand 
> multiplier will affect the "main" BSP tree, as this will affect the 
> number of triangles in the scene. You can verify that by doing diagnostic renders:
>
> Application.CreatePrim("Sphere", "MeshSurface", "", "")
> Application.DeleteObj("sphere")
> Application.CreatePrim("Cylinder", "MeshSurface", "", "") 
> Application.SetValue("cylinder.cylinder.radius", 2.39, "") 
> Application.SetValue("cylinder.cylinder.height", 40, "") 
> Application.SetValue("cylinder.polymsh.geom.subdivu", 24, "") 
> Application.SetValue("cylinder.polymsh.geom.subdivv ", 24, "") 
> Application.SetValue("cylinder.polymsh.geom.subdivbase",
> 24, "")
> Application.SetValue("cylinder.polymsh.geom.subdivbase",
> 24, "")
> Application.SetValue("cylinder.polymsh.geom.subdivv", 24, "") 
> Application.SetValue("cylinder.polymsh.geom.subdivv", 48, "") 
> Application.FreezeObj("", "", "") Application.Rotate("", 0, 0, 90, 
> "siRelative", "siLocal", "siObj", "siXYZ", "", "", "", "", "", "", "", 
> 0, "") Application.FreezeObj("", "", "")
> Application.ActivateObjectSelTool("")
> Application.DeselectAll ()
> Application.ActivateObjectSelTool("")
> Application.CreatePrim("Sphere", "MeshSurface", "", "") 
> Application.Translate ("", 0, 0, -7.84688268062173, "siRelative", 
> "siLocal", "siObj", "siXYZ", "", "", "", "", "", "", "", "", "", 0, 
> "") Application.Translate("", 0, 0, 0.721777065527067, "siRelative", 
> "siLocal", "siObj", "siXYZ", "", "", "", "", "", "", "", "", "", 0, 
> "") Application.ApplyHairOp("sphere", "") 
> Application.InspectObj("ViewRenderOptions", "", "", 1, "") 
> Application.SetValue ("ViewRenderOptions.DiagnosticPhoton",
> 0, "")
> Application.SetValue("ViewRenderOptions.DiagnosticGrid ", 0, "") 
> Application.SetValue("ViewRenderOptions.DiagnosticGrid", 0,
> "")
> Application.SetValue("ViewRenderOptions.DiagnosticBspTreeDepth",
> 1, "")
>
> Draw a render region
>
> Set the strand multiplier to 0, render Set the strand multiplier to 2, 
> render Set the total hairs to 13,000, render
>
> Unless there are shaders being used that modify the hair geometry 
> on-the-fly or other characteristics of hair, changing the hair BSP 
> should not affect actual render time (when buckets are being rendered).
>
> The hair BSP deals with the pre-processing phase, that is, the 
> generation of hair geometry. The aim at the hair BSP tree is not to 
> speed up ray intersection, but to speed up things like surface 
> collisions and similar things that require the renderer to know where 
> the geometry is in space to generate accurately the hair geometry. So 
> changing the hair BSP should affect the hair generation time only (if, 
> like I said, there is nothing that modifies that geometry or else during rendering).
>
> Ultimately the hair BSP will affect the "overall" render time, because 
> the rendering doesn't happen without the pre-processing of hair.
>
>
>
>
> Bernard
>
>
>
>
> On 5/30/07, Kim Aldis < XSI(at)kim-aldis.co.uk> wrote:
> > I'm not sure if this also applies to instancing but hair has its own 
> > BSP settings. Normal hair renders that can make a huge difference.
> >
> > > -----Original Message-----
> > > From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On 
> > > Behalf Of Bernard Lebel
> > > Sent: 30 May 2007 01:27
> > > To: XSI(at)Softimage.COM
> > > Subject: Re: massive hair instance render
> > >
> > > Definitely consider using dynamic bsp and lower the mesh splitting 
> > > factor (try 0.5, then 0.2, then 0.1...). Will make rendering 
> > > slower, but will render. Also, definitely consider using the 
> > > rasterizer, if it doesn't change too much your lighting.
> > >
> > >
> > > Cheers
> > > Bernard
> > >
> > >
> > >
> > >
> > > On 5/29/07, Kris Rivel <krisrivel(at)gmail.com> wrote:
> > > > I'm building a tree with many extremely photo-realistic leaves on it.
> > > > I'm using some SSS shading which looks great but together with
> > > massive
> > > > leaf instance count, my renders are hitting the roof.  I'm 
> > > > trying to stick to a 2GB memory limit too which is all thats 
> > > > available on the
> > > farm
> > > > I will be using.  Just curious if anyone has any tips for 
> > > > handling
> > > such
> > > > massive hair instance renders.  I still have a lot of tweaking 
> > > > and optimization to fiddle with but it would be great to know of 
> > > > any
> > > other
> > > > nice tricks up front that I may not have thought about.  Thanks.
> > > >
> > > > Kris
> > > > ---
> > > > Unsubscribe? Mail Majordomo(at)Softimage.COM with the following 
> > > > text in
> > > body:
> > > > unsubscribe xsi
> > > >
> > > ---
> > > Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text 
> > > in
> > > body:
> > > unsubscribe xsi
> >
> > ---
> > Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
> > unsubscribe xsi
> >
>

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.