Re: Texture mip streaming prioritization
Josh Green <[email protected]> Tue, 23 Jul 2013 10:21:14 +1000
| Newsgroups | gmane.games.devel.algorithms |
|---|---|
| Message-ID | <CALy-u-RFqM8TY7PC1TX-AuvkVX0xGr4CZER8HfGce4nFNZHrFQ@mail.gmail.com> |
--===============4337109331890715550==
Content-Type: multipart/alternative; boundary=047d7b1604295c08ef04e222c566
--047d7b1604295c08ef04e222c566
Content-Type: text/plain; charset=ISO-8859-1
Thanks for your thoughts,
>Alternatively - object X is Y meters from camera - what should I load.
This is essentially what my current calculation gives me. It describes what
I need to load in order to render the seen at it's highest image quality.
The problem though is then applying a memory constraint to that, that says,
I can't have everything I need.... So what will I choose to load?
I must admit, I am currently thinking down the line that Sebastian
described above:
>Assuming you only load one MIP level at a time (i.e. if MIP N is currently
loaded, you'll only consider N-1), maybe something like:
>(desired_mip - current_mip) * num_pixels / memory_usage, add tuning knobs
as needed...
I have the concept of the "Ideal" mip I would like loaded.
And I also think dealing with one mip at a time (from prioritisation point
of view at least) makes sense.
Though that doesn't necessarily mean only one mip is loaded at a time, just
one mip is considered for being loaded at a time.
I'm thinking if I start with my "target set" as equal to the "ideal set",
then execute the following:
while (memoryUsage of target set > budget)
{
sort target texture set according to the "Priority" of having it's
current target mip loaded.
where priority = (idealMip - currentTargetMip) * numPixelsUsingTexture
/ MemoryUsage
Select texture with the lowest priority
subtract 1 from it's currentTargetMip.
}
This would remove all the mips that will have the least benifit to the
scene.
Then I would task the resource system with making sure the target set gets
loaded.
Unfortunately the above algorithm looks like it'd be very serial, and
involve a bunch of sorts... But I think it might acheive good results?
Have any of you seen these implementations executed in a product or game
before? Was it successful? Tricky? worth the time?
Thanks for the comments and suggestions so far,
Josh
--047d7b1604295c08ef04e222c566
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Thanks for your thoughts,<div><br>><span style=3D"font-=
family:arial,sans-serif;font-size:13px">Alternatively - object X is Y meter=
s from camera - what should I load.<br>This is essentially what my current =
calculation gives me. It describes what I need to load in order to render t=
he seen at it's highest image quality.<br>
The problem though is then applying a memory constraint to that, that says,=
I can't have everything I need.... So what will I choose to load?<br><=
br></span>I must admit, I am currently thinking down the line that Sebastia=
n described above:<span style=3D"font-family:arial,sans-serif;font-size:13p=
x"><br>
</span></div><div><div class=3D"gmail_extra">><span style=3D"font-family=
:arial,sans-serif;font-size:13px">Assuming you only load one MIP level at a=
time (i.e. if MIP N is currently loaded, you'll only consider N-1), ma=
ybe something like:</span><br>
><span style=3D"font-family:arial,sans-serif;font-size:13px">(desired_mi=
p - current_mip) * num_pixels=A0/ memory_usage, add tuning knobs as needed.=
..<br></span><br>I have the concept of the "Ideal" mip I would li=
ke loaded.<br>
And I also think dealing with one mip at a time (from prioritisation point =
of view at least) makes sense.=A0</div><div class=3D"gmail_extra">Though th=
at doesn't necessarily mean only one mip is loaded at a time, just one =
mip is considered for being loaded at a time.<br>
<br>I'm thinking if I start with my "target set" as equal to =
the "ideal set", then execute the following:<br><br>while (memory=
Usage of target set > budget)<br>{<br>=A0 =A0 =A0sort target texture set=
according to the "Priority" of having it's current target mi=
p loaded.</div>
<div class=3D"gmail_extra">=A0 =A0 =A0where priority =3D (idealMip - curren=
tTargetMip) * numPixelsUsingTexture / MemoryUsage<br>=A0 =A0=A0<br>=A0 =A0 =
=A0Select texture with the lowest priority<br>=A0 =A0 =A0<br>=A0 =A0 =A0sub=
tract 1 from it's currentTargetMip.<br>
}<br><br>This would remove all the mips that will have the least benifit to=
the scene.<br>Then I would task the resource system with making sure the t=
arget set gets loaded.</div></div><div class=3D"gmail_extra"><br>Unfortunat=
ely the above algorithm looks like it'd be very serial, and involve a b=
unch of sorts... But I think it might acheive good results?<br>
<br></div><div class=3D"gmail_extra">Have any of you seen these implementat=
ions executed in a product or game before? Was it successful? Tricky? worth=
the time?<br></div><div class=3D"gmail_extra"><br></div><div class=3D"gmai=
l_extra">
Thanks for the comments and suggestions so far,=A0<br><br>Josh<br><br><br><=
/div></div>
--047d7b1604295c08ef04e222c566--
--===============4337109331890715550==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
--===============4337109331890715550==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
--===============4337109331890715550==--