[Bf-committers] Proposed changes re: procedural textures

Emanuel Greisen blender at emanuelgreisen.dk
Thu Nov 23 13:56:58 CET 2006


> I'd been thinking about this; collisions would only be a problem for 
> plugins, and I'd imagined Blender assigning each plugin an ID in the 
> order they are loaded, starting at 1 greater than the highest builtin 
> ID. Then it writes a list of plugin filenames so it knows which plugin 
> corresponds to which generated ID.

Collisions might also occur in built-in. Assume some developer of 
built-in textures is both developing a new texture AND making cool 
blender scenes. The same goes for some other developer (assume two teams 
like Orange project working at the same time, at two different places). 
Now they are both done, and want to commit back to the 
core-blender-trunk.... they have both taken the same "next-id", hence 
one of them will have to take the next one, and then all their blender 
files will have the wrong textures when running with the latest blender 
version. Actually, if the core team deside at some point in time to 
remove procedural texter X, then X+1 will become X, X+2 will become X+1, 
and so forth. This means that any old blenderfile will have incorrect 
textures.... due to shifting in indexes !

> Using GUIDs here does have the advantage of plugin authors being able 
> to change the filename of their plugin, or give two plugins the same 
> name. I'm assuming your idea of using GUIDs is similar to the above, 
> but replacing filenames with GUIDs stored in the plugin itself?

Moreover, it has the advantage that no "unseen" errors occur, like 
loading an old blender-file with textures that no longer exist (and due 
to indexing just gets some other texture). Blender could let the user 
know about the "missing textures"

>
> I'm not actually a fan of GUIDs; the fact that they're not absolutely 
> guaranteed to be unique bothers me. But if they're the most practical 
> option we have, I'm all for using them.

There is only one situation when they are not guarantied to be unique, 
and that is when doing copy-paste code, or creating them by hand. As 
long as you use the RFC or some other "good" generator. (I am aware of 
the mathematically possibility of collision, but alas, even when blender 
will be the most used software on the planet, and thus has 1.000.000 
procedural textures, the chance of collision is something like 1 to

With hand-made GUIDs we totally aggree on collision-posibility, who 
would not have:

4B1E2DE5-CAFE-C001-CAFE-B1E2DE5C001

Or something similar as their GUID....


More information about the Bf-committers mailing list