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