Re: Texture mip streaming prioritization
Sebastian Sylvan <[email protected]> Mon, 22 Jul 2013 13:55:22 -0700
| Newsgroups | gmane.games.devel.algorithms |
|---|---|
| Message-ID | <CAGZgfT5g4mheURuwgnTtQZ8_sj6SoyLapXLf71Crxot2WAyhmw@mail.gmail.com> |
--===============2650254915106648969== Content-Type: multipart/alternative; boundary=001a11c218ae1dc38d04e21fe50d --001a11c218ae1dc38d04e21fe50d Content-Type: text/plain; charset=ISO-8859-1 On Mon, Jul 22, 2013 at 12:16 AM, Josh Green <[email protected]> wrote: > Hi There, > > I'm currently working on a texture streaming system and looking into ways > to prioritize which mips on which textures should be loaded. > I was hoping that people on this list may have experience with these > algorithms that they could share? > > Currently I know which mips need to be loaded in order to render a scene > without degradation in image quality. > I would now like to apply a memory budget to textures, and make decisions > about which mips of which textures should be loaded over others. > > My current line of thinking involves comparing cost / benefit of loading > each individual mip. > i.e. > > How many pixels would be affected by a particular mip level being loaded > versus how much memory would that mip level use? > > This becomes Priority = Benefit / Cost > > I'd then sort for highest priority and assign memory budget to those mips > at the top of the list. > > Any thoughts? comments? Alternatives that work better? Alternatives that > have worked enough? > I would bake in some kind of factor that relates to "quality improvement" as well. If you have a 4k eye ball texture and it's currently at MIP 2 (1Kx1K), it probably won't gain much from loading another MIP even if it's covering a lot of pixels. So you need to compute how far off the pixel currently is from the *ideal* MIP level, and improve pixels that are far off first (weighted by pixel count). 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... That first factor relates to how far "off" a pixel currently is from its ideal MIP level, i.e. how much in need of improvement those pixels are. -- Sebastian Sylvan --001a11c218ae1dc38d04e21fe50d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quo= te">On Mon, Jul 22, 2013 at 12:16 AM, Josh Green <span dir=3D"ltr"><<a h= ref=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>>= ;</span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding= -left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-l= eft-style:solid"><div dir=3D"ltr">Hi There,<br><br>I'm currently workin= g on a texture streaming system and looking into ways to prioritize which m= ips on which textures should be loaded.<div> I was hoping that people on this list may have experience with these algori= thms that they could share?<br> <br>Currently I know which mips need to be loaded in order to render a scen= e without degradation in image quality.<br>I would now like to apply a memo= ry budget to textures, and make decisions about which mips of which texture= s should be loaded over others.=A0<br> <br>My current line of thinking involves comparing cost / benefit of loadin= g each individual mip.<br>i.e.<br><br>How many pixels would be affected by = a particular mip level being loaded versus how much memory would that mip l= evel use?<br> <br>This becomes Priority =3D Benefit / Cost<br><br>I'd then sort for h= ighest priority and assign memory budget to those mips at the top of the li= st.<br><br>Any thoughts? comments? Alternatives that work better? Alternati= ves that have worked enough?<br clear=3D"all"> </div></div></blockquote><div>=A0</div><div>I would bake in some kind of fa= ctor that relates to "quality improvement" as well. If you have a= 4k eye ball texture and it's currently at MIP 2 (1Kx1K), it probably w= on't gain much from loading another MIP even if it's covering a lot= of pixels. So you need to compute how far off the pixel currently is from = the <em>ideal</em> MIP level, and improve pixels that are far off=A0first (= weighted by pixel count).</div> <div>=A0</div><div>=A0</div><div>Assuming you only load one MIP level at a = time (i.e. if MIP N is currently loaded, you'll only consider N-1), may= be something like:</div><div>=A0</div><div>(desired_mip - current_mip) * nu= m_pixels=A0/ memory_usage, add tuning knobs as needed... </div> <div>=A0</div><div>That first factor relates to how far "off" a p= ixel currently is from its ideal MIP level, i.e. how much in need of improv= ement those pixels are.</div><div><br>-- <br>Sebastian Sylvan </div></div></div></div> --001a11c218ae1dc38d04e21fe50d-- --===============2650254915106648969== 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 --===============2650254915106648969== 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 --===============2650254915106648969==--