danielenger / Principled-Baker

Blender Add-on: Bake PBR textures with a few clicks
342 stars 30 forks source link

Can it be ported to the official Blender ? #13

Open Nodragem opened 4 years ago

Nodragem commented 4 years ago

Hello Daniel,

I was just wondering what would be the main challenges to port this to the official Blender build? I am a gamedev and I think that to be able to bake PBR maps is an essential feature :)

The current Blender baker does not allow to bake all the PBR channels, and it is a bit clumsy to use as well. I have never contributed to Blender, but I would be happy to help (in terms of coding and discussing the port).

Let me know what you think!

jgwinner commented 4 years ago

I'd add another vote to this; it's really essential for real time and game dev in some way.

If some type of baking was integrated into FBX or GLTF that would be amazing. I haven't tried it yet, maybe it works.

OTOH it could be worth some money too.

    == John ==
danielenger commented 3 years ago

I think at first the code must be much cleaner and professional. I’m not sure, but I also would have to promise to maintain the code.

If some type of baking was integrated into FBX or GLTF that would be amazing. I haven't tried it yet, maybe it works.

That’s not directly related to baking, but to export. I know what you mean. You want the material from Blender as a ready-to-be-used export in what-ever-game-engine.

jgwinner commented 3 years ago

Correct! Whatever it looks like in Blender, should export in the appropriate model format.

It's actually for CAD, but yes, same idea. I find most game developers don't think this is a big deal because they redo all of the materials anyway, for realtime. Blender has a complex material system - which is appropriate for a non-realtime renderer, of course.

I eventually developed a workflow that involved completely different materials than exported for the same reason. However, I was dealing with flat polys - it would be fantastic if an actual procedurally generated material could export bitmaps in that model format.

What I eventually did was create a square plane, put a camera directly over it, then rendered the output, then exported that. This didn't create seamless textures, of course, but I was actually making plywood so the seam was fine.

But yes, what you mention would be a holy grail. Procedural textures, appropriate UV maps, export, and be able to see those procedurally generated textures as mapped PNG files.

Of course, the holy place setting to go with the holy grail would be procedural textures directly in the game engine, with the proper understanding of geometry. Destroy a board, the wood pattern shows up. No more repetitive patterns. We're probably a ways away from that. Not the least of which is because very few people understand the power of procedural textures.

fire commented 3 years ago

I do! However, it's difficult to directly integrate something like MaterialX in Unreal Engine / Unity / Godot Engine.

To integrate Material Into Blender is actually more interesting with this plugin. One of the gaps is baking existing MaterialX OSL materials into a new Blender principled BSDF shader. I believe this addon can do it. The other gap is creating a UI for MaterialX.

The other direction of creating a Godot Engine MaterialX renderer is more work, but also possible. The same amount of work would be done for Unreal Engine or Unity. See the Substances system for examples.

fire commented 3 years ago

I'm pretty sure we can bake arbitrary OSL nodes into Blender principled BSDF shader, we've got MaterialX support. I couldn't figure out how to do the various operations in this add-on.

Feel free to contact!