[tuhopuu-devel] Re: [tuhopuu-cvs] CVS commit: tuhopuu3/source/blender/blenkernel BKE_image.h tuhopuu3/source/blender/blenkernel/intern displist.c exotic.c image.c scene.c tuhopuu3/source/blender/blenlib BLI_arithb.h tuhopuu3/source/blender/blenlib/intern arithb.c tuhopuu3/source/blender/blenloader/intern readfile.c ...

Jiří Hnídek jiri.hnidek at vslib.cz
Thu Jun 23 22:53:10 CEST 2005


Hi,
it is so cool :-). Thanks very much! Can you create simple step by step 
tutorial? I was able to use it, but I didn't do some thinks too good. 
'Texture baker' created some white flecks here, etc.

Jiri

>   Log:
>   Big Commit
>   
>   Apologies in advance for the merging troubles this will cause. :)
>   
>   Vertex Color Baking:
>   	Writes back the vertex color into an image for the selectd mesh with UV coordinates.
>   	HotKey: Alt-B (I assume Matt will find a better one and can put that in a menu somewhere)
>   	Creates new image next to the original one (on the HD)
>   	New images are named: MeshName.OriginalImage.Extension
>   	Creates images using the file type setup in the render settings
>   	Overwrites silently images with the same name
>   	Supports more than one image per mesh
>   	Removes vertex color after baking (could be changed)
>   	Option to do blur passes or to bleed the color out of the UV islands
>   
>   	Known issues:
>   		The extension is added to the file without removing the old one, so you can get things like: blah.image.png.jpg
>   		There are some rounding errors left, but they happen very rarely
>   
>   	Old demo images (while in WIP) can be found there: http://www.elysiun.com/~theeth/bf/
>   
>   	This means you can: Bake radiosity solutions, Paint a dirt map with vertex paint and bake it back in texture, use the Make VCol trick to bake textures (subdivide a copy, make vcol and bake)
>   
>   	About the code: this code uses its own triangle raster code and blurring code, so could most likely be improved by someone with more experience.
>   
>   Object listbase sorting:
>   	This is a behind the scene improvement.
>   	Very simple concept: At all time, the listbase for object is always sorted with selected elements as head and unselected as tail.
>   	That enables to cut off pretty much all the loops that dealt on selected or unselected objects only, meaning they only have to loop over parts that interest them.
>   
>   	To do this, a couple of new functions have been added:
>   		selectObject(struct Base *base): Select and object, preserving list order
>   		deselectObject(struct Base *base): Deselect an object, preserving list order
>   		testObjects(void): test if the list has a valid order (accessible through Alt-Shift-O temporarely)
>   		sortObjects(void): Sort the list on load
>   
>   	And a couple of macros in blendef.h to end loops when they should.
>   
>   	WARNING: I had to disable listbase sorting using the depgraph to use this properly. Eventually, the depgraph will be used by itself (Ton said he'd look at it in his two weeks). Using it to sort the base list really give suboptimal results, considering what using the graph directly could do.
>   
>   BoundBox select on object:
>   	Modified selectprojektie to accept buffers of different size, so in object mode, the buffer adapts to the number of objects (no more Buffer Full errors).
>   	Also made the selection loop much smarter and killed a drawing call (for each object in the loop) that made selecting on large scene really crawl.
>   
>   Some quaternion math functions that were missing from arithb.c
>   	That pretty much says it all, not very interesting I guess...



More information about the tuhopuu-devel mailing list