norgeotloic / BakeMyScan

Blender add-on to turn high resolution scans into lowpoly assets
http://bakemyscan.org
GNU General Public License v3.0
145 stars 15 forks source link

WIP - Update for 2.80 #97

Open spelman7 opened 4 years ago

spelman7 commented 4 years ago

Hi there! This addon is awesome! I spent a few hours today seeing if I could update it to work in 2.80, and I got fairly far. I thought I would just PR it and see what your thoughts were.

The biggest difficulty seems to be in the actual baking, since a lot of the functionality in the original addon depends on Blender's internal render engine, which has been significantly deprecated in 2.80.

Specifically, I ran into trouble with the addon's usage of a material's texture_slots in the bakeWithBlender function. I played around with adjusting the function, but ultimately I fear the paradigm has fundamentally changed, and programmatic access to the material is really only possible via the Nodes APIs. Instead of tearing apart the op_BAKING_bake.py file I decided to just hook in a new file that I called op_BAKING_bake_nodes.py. I attached a new button for this operator which I labeled "Bake textures w Nodes".

All of that work is really just an experiment to test that it would still work in 2.80. I'm in over my head a bit with the PBR-based baking, so I think I would need help porting it all over in a good state.

Hopefully this is a start, though!

PS - I work at Ubiquity6. We make display.land. You should check out some of our open positions - we're basically making a free, full version of BakeMyScan in a product with thousands of users.

Dragoy commented 3 years ago

don't work in 2.90.1