[Bf-cycles] working around the Cuda 100 texture limit
Jonatan.Bijl at tba.nl
Wed Sep 25 09:59:20 CEST 2013
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
* 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?
Software Developer / 3D artist
T +31 15 251 5669
M +31 6 4493 4295
E jonatan.bijl at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Bf-cycles