[Bf-committers] SOC Project Ideas?

Tom M letterrip at gmail.com
Wed Apr 19 06:23:46 CEST 2006


Doug,

> Would 3d painting be a to huge task to do for an SOC?

I already proposed it (projection painting), and no not a huge task. 
Basically it is fairly  simple - here is pseudo python code, plus a
brief description of a more advanced version.

#this naive implementation looks at every pixel
#better would be to backface culling to exclude pixels not facing the camera
#if desired - if you don't then you get xray painting which might not be desired
#also for faster response you could be a lot more clever
#such as allow the inividual to start painting immediately on your
buffer and do the
#uv map projection in the background - or only do the uv map
projection at the end
#after you know what faces were painted on
#and also chopping your Screen into tiles, and then you can project
the tiles back to the UV map as the user paints instead of doing it
all at the end.
for pixel in UVtexture:
****getPixel_UVCoordinate()
****project_UVCoordinate_to_ScreenCoordinate()
****store_UV_to_Screen_lookup(UVCoord, ScreenCoord)
Screen_to_image_edit_buffer()
#now you can use GIMP, photoshop, etc. as your image editor....
#done
#now transfer the paint from your screen image buffer back to the object
for pixel in Screen_image_edit_buffer:
****UVList = store_UV_toScreen_lookup.pixel
****for UVpixel in UVList:
********UVpixel = pixel

and we are all done.

LetterRip


More information about the Bf-committers mailing list