[Bf-cycles] working around the Cuda 100 texture limit

Brecht Van Lommel brechtvanlommel at pandora.be
Wed Sep 25 13:39:35 CEST 2013


Hi,

Something like this is possible, but it would mean we have to do
manual texture sampling for repeated textures instead of letting the
hardware do it for us, due to the border issue. It also adds quite a
bit of complexity to the code.

NVidia Kepler architecture cards supports "bindless textures", which
are an unlimited number of textures. Adding support for those seems
the right solution to me. It's on the todo list but I haven't had time
to do it yet.

Brecht.

On Wed, Sep 25, 2013 at 9:59 AM, Jonatan Bijl <Jonatan.Bijl at tba.nl> wrote:
> Hi,
>
>
>
> I was thinking of a way to circumvent the 100 texture limit imposed by Cuda,
> by automatically merging same-sized textures into a texture atlas. In the
> post
> http://blenderartists.org/forum/showthread.php?309902-Suggestion-for-workaround-for-cycles-texture-limit
> at blenderartists I posed the Idea, but I think this mailinglist is a better
> place for this kind of discussion.
>
>
>
> I’ve taken a look into the code concerning image textures, but I don’t know
> enough about the design of the cycles renderer to figure out the whole
> approach. Also, I have some concerns about whether this proposed approach is
> actually going to work. So I hope you guys might be able to help me
> answering that.
>
> Here is (copied from my blenderartists post) the state of my idea:
>
>
>
> Requirements for the solution
>
> amount of textures should not be the limit, only the size of your graphics
> memory
> typical UV tricks that are supported now (tiling textures, textures outside
> of [0,1] range) should be still supported
> solution should be transparent (invisible) to the user
>
> Suggested approach
>
> before rendering starts, textures which have the same size and pixel-type
> are grouped together in an atlas.
> The concerned image nodes are notified that they have to re-map to an area
> of that atlas.
> When a node has to sample the texture, it will use the remapping info to
> sample the right area. border-cases should be handled correctly.
> When rendering a movie, the same atlas can be re-used for rendering the
> whole movie in this way.
>
> Areas of concern
>
> The design of the node system will probably get more complicated: some
> manager needs to manage all the texture nodes
> performance - the re-mapping is not a difficult calculation, but will happen
> a lot (every time that one of the textures is sampled) so the code needs to
> be written with care
> limits - is there a limit to the texture sizes?
> Graphics pipeline features - does the cuda code use typical
> graphics-hardware features like mipmapping or texture border handling, which
> could be messed up when playing with the sampling coordinates?
>
>
>
>
>
> Jonatan Bijl
>
> Software Developer / 3D artist
>
> T  +31 15 251 5669
>
> M +31 6 4493 4295
>
> E  jonatan.bijl at tba.nl
>
> S  jonim8or
>
>
>
> TBA
>
> Karrepad 2a
>
> 2623AP Delft,
>
> The Netherlands
>
> www.tba.nl
>
>
>
> ------------------------------------------------------------- This e-mail is
> intended exclusively for the addressee. If you are not the addressee you
> must not read, copy, use or disclose the e-mail nor the content; please
> notify us immediately [by clicking 'Reply'] and delete this e-mail.
>
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
>


More information about the Bf-cycles mailing list