Total Baker - Texture Baking System

Cool Curvature ! just one thinks the hight poly must be imported in unity asset ?

1 Like

Thanks!

Yes, Total Baker is an editor tool and all input models, including the highpoly one, have to be imported as assets (.fbx, .3ds, .obj, etc.)
In the next version also mesh assets (.asset) will be supported.

I’m in the middle of making a space game and found an awesome planet generator but I would like to be able to bake the planet textures out so I can use the diffuse maps for holographic projections in various places throughout the game. Is you’re asset capable of doing?

Hello,

if the planets are generated using custom shaders it won’t be possibile to bake them.

Gotchya, thanks.

Any news about supporting linear color space?

1 Like

Hi, I just fixed the URP problem for me, it’s a simple hack but if you are using URP it’s helpful because you don’t need to switch back to Builtin:
In TotalBaker.cs replace them:

        private static readonly int _BumpMap = Shader.PropertyToID("_BumpMap");
        private static readonly int _ParallaxMap = Shader.PropertyToID("_ParallaxMap");
        private static readonly int _EmissionMap = Shader.PropertyToID("_EmissionMap");
        private static readonly int _OcclusionMap = Shader.PropertyToID("_OcclusionMap");
        private static readonly int _MetallicGlossMap = Shader.PropertyToID("_MetallicGlossMap");
        private static readonly int _SpecGlossMap = Shader.PropertyToID("_SpecGlossMap");
        private static readonly int _EmissionColor = Shader.PropertyToID("_EmissionColor");
        private static readonly int _FillColor = Shader.PropertyToID("_FillColor");
        private static readonly int _LineColor = Shader.PropertyToID("_LineColor");
        private static readonly int _WireThickness = Shader.PropertyToID("_WireThickness");
        private static readonly int _Smoothness = Shader.PropertyToID("_Smoothness");
        private static readonly int _Metallic = Shader.PropertyToID("_Metallic");
        private static readonly int _SpecColor = Shader.PropertyToID("_SpecColor");
        private static readonly int _Glossiness = Shader.PropertyToID("_Glossiness");
        private static readonly int _GlossMapScale = Shader.PropertyToID("_GlossMapScale");
        private static readonly int _LightsValidation = Shader.PropertyToID("_LightsValidation");
        private static readonly int _LightsTypes = Shader.PropertyToID("_LightsTypes");
        private static readonly int _LightsPositions = Shader.PropertyToID("_LightsPositions");
        private static readonly int _LightsDirections = Shader.PropertyToID("_LightsDirections");
        private static readonly int _LightsColors = Shader.PropertyToID("_LightsColors");
        private static readonly int _LightsIntensities = Shader.PropertyToID("_LightsIntensities");
        private static readonly int _LightsRanges = Shader.PropertyToID("_LightsRanges");
        private static readonly int _LightsOuterCosAngles = Shader.PropertyToID("_LightsOuterCosAngles");
        private static readonly int _LightsInnerCosAngles = Shader.PropertyToID("_LightsInnerCosAngles");
        private static readonly int _LightsCount = Shader.PropertyToID("_LightsCount");
        private static readonly int _AmbientColor = Shader.PropertyToID("_AmbientColor");
        private static readonly int _High2LowWpos = Shader.PropertyToID("_High2LowWpos");
        private static readonly int _High2LowNormal = Shader.PropertyToID("_High2LowNormal");
        private static readonly int _WorldNormalMap = Shader.PropertyToID("_WorldNormalMap");
        private static readonly int _Density = Shader.PropertyToID("_Density");
        private static readonly int _Color1 = Shader.PropertyToID("_Color1");
        private static readonly int _Color2 = Shader.PropertyToID("_Color2");
        private static readonly int _LayerMask = Shader.PropertyToID("_LayerMask");
        private static readonly int _Color = Shader.PropertyToID("_BaseColor");
        private static readonly int _Cutoff = Shader.PropertyToID("_Cutoff");
        private static readonly int _GlossyReflections = Shader.PropertyToID("_GlossyReflections");
        private static readonly int _TangentNormalMap = Shader.PropertyToID("_TangentNormalMap");
        private static readonly int _MainTex = Shader.PropertyToID("_BaseMap");

And in Filters.cs this:

            shader_StandardMetallic = GetShaderIfExists("Universal Render Pipeline/Lit");

I now, this is just a silly hack but it works when you use “StandardMetallic” in the selection tab, I hope the dev will soon add the URP shader because it’s very simple. But it looks like there are no more updates coming…?

Hi, I have a forest scene. A big terrain with a lot of trees and grass drawn using terrain editor. Now when I use directional light with SHADOWS ON, the verts count go upto 2 Million. and when I Turn Shadows off, the verts count drops to 400k. So I want to get rid of directional lighting for shadows and litting environment. I want to bake shadows and lighting right into main texture. Even the shadows casted on terrain. I want this for all the static elements of my scene so that I can exclude the static objects from the lighting

I just read on some other forum it would not be great idea to bake lighting directly into albedo textures because albedo textures are meant to be reused for many prefabs at many different places where lighting condition varies from position to position so it is not possible to reuse the baked albedo+lighting for many positions. Still I would like to know your opinion on such work arround where lighting and shadows are the culptiy for the environment.

Hello you all!

I’m very sorry to answer this late, I had some urgent issues to solve that didn’t allow me to actively work on Total Baker for a while.

A new version (2.0) is almost ready. Here’s what you will see in it:

  • URP Support
    Universal Render Pipeline is now supported along with the Standard Pipeline.

  • The config files have been replaced by a more robust system based on Unity scenes.
    Until this version, all the settings were stored in config files, and those files could be created, opened and saved from within the Total Baker window. This created some extensibility issues. Now, everything is much simpler: the baking configuration is stored into a component attached to a special object in the Unity scene called “TB_Scene”. The Unity scene is itself the baking session which can be created, opened and saved as you are used to.

7506668--925292--upload_2021-9-19_19-38-11.png

  • The input models are no more references to assets in the project (models/prefabs).
    Now input models are references to objects in the scene. Just drag&drop scene objects in the input slots and you’re ready to go.

  • Custom positioning
    Now it’s possible to position models freely in the scene. The only obvious constraint is that the cage object should always encompass the highpoly object.

  • Input models validation system
    One of the biggest issues users have reported to me is that Total Baker (as many other baking systems) requires the input models to have some precise characteristics. Some examples are:

  • The input model must have a single material

  • The highpoly model must not contain meshes with submeshes (multiple materials on the same mesh)

  • Models must not have missing meshes in their renderers

  • Etc…

These things created confusion because sometimes the bake failed and the system didn’t tell why.
In the new release I’ve implemented a validation system that will inform users of model compatibility issues and will prevent the start of the baking process until all the issues have been resolved.
Basically, once you set a new input object you will have to validate it by clicking on the “validate” button.

7506668--925295--upload_2021-9-19_19-38-26.png

Please, note that not all the cases will be signaled, but the most common and important ones. The reason is that some checks are too performance-killer to be implemented (i.e. check for overlapping triangles in UV map).
For some of the supported compatibility issues I’ve implemented a “Fix” function that will automatically fix the issue, while for others a “To be fixed manually” label will be shown.

7506668--925298--upload_2021-9-19_19-38-40.png

  • Mesh assets (.asset) are now supported
    It’s now possible to use input objects which contain .asset meshes.

  • Independent smoothing system
    Input models can now be smoothed on-the-fly without the need to reimport original model assets. This is quite faster.

  • New wireframe system
    Wireframe is no longer geometry shader-based, to extend platform compatibility (should work on Mac, but not tested). The new system is based on SetIndices() line topology.

  • Removed toolbox windows and lighting bake system.
    The new changes made these tools obsolete and hard to reintegrate. Moreover, users’ feedback on such tools was quite negative.

  • Linear color space is now supported
    The system automatically detects the current color space and adjusts colors calculations.

  • Multithreaded raycasts
    Raycasts are now multithreaded (RaycastCommands) and should perform a little faster. This has a little memory cost.

  • More verbose progress bar
    Progress bar will give information about the current baking stage.

  • Added zoom and bilinear filtering toggle for texture preview
    Zooming on the preview texture area is a very useful thing to inspect the generated maps. The bilinear filtering toggle lets the user disable bilinear filtering and inspect zoomed pixels without interpolation.

  • Updated samples
    All the sample models will come with a baking scene ready to be used and tested. There will be both Standard and URP materials in the same package.

I’ll submit the new version for review as soon as I finish the tests, update the samples and the online user manual.

Meanwhile, for those interested in beta-testing the new version, I can privately send a preview package. If you are interested, please DM me including your invoice number.

Thanks for your patience,
Francesco

3 Likes

UPDATE

Total Baker 2.0.0 has been released!

There’s a new Total Baker version available in the Asset Store!

For release notes, please read my previous message in this thread.

Francesco

2 Likes

PATCH

Total Baker 2.0.1 has been released!

There’s a new Total Baker version available in the Asset Store!

Release Notes:

  • This patch fixes build errors. Some of the new scripts had references to UnityEditor which caused the build process to fail.

Francesco

2 Likes

Hello,

some users reported that Toatal Baker’s GUI has some issues with the new UnityEditor versions (reported for 2021.2.5f1). I’m working to fix those errors and release a patch soon.

F.

PATCH

Total Baker 2.0.2 has been released!

There’s a new Total Baker version available in the Asset Store!

Release Notes:

  • Fixed Unity 2021.2 compatibility
  • Improved input models validation
  • Minor GUI fixes

Francesco

1 Like

EDIT2: This issue was solved super fast within just some minutes! Crazy.
A big Thank You for this fantastic tool and awesome support!

Francesco, I - love - this - tool!
But I would need a little help for baking the normals:
The baked normal map is just a flat image, with only the typical main color of a normal map, but without any details drawn. When I select Normals Space “Object” I get a very colorful image shown, where I can recognize the normal texture, but just drawn with rainbow colors, so something gets calculated.

I’ve tested a lot of combinations, smooth, flat, bake existing map on/off, etc.
Only when I select Height Map, then I get some baked normal map, but it is very hard / flat. So the prefered setting would be Smooth shading.

Newest Total Baker Version, Unity version: 2020.3.13f1, Win,
all the elements have enabled read/write and no errors shown in the console

In an earlier version I had some similar thing with another material slot, but I could overcome this by putting the texture into another slot and then baking this slot. But this would not work now for normal maps.

EDIT1: With all the same versions (total baker and unity), just tested on another model (taken the shoes and not the vest of the model), it works. Have no clue for the possible reason.

1 Like

Hello,

thanks for your interest in Total Baker.

Please, send me an email to 3pointsoft@gmail.com so that I can give you direct support.

Francesco

PATCH

Total Baker 2.0.3 has been released!

There’s a new Total Baker version available in the Asset Store!

Release Notes:

  • Fixed tangent space normal map generation for meshes with huge offsets from pivot.
  • Tangent normal map: fixed wrong linear color space PNG saving function.
  • Removed randomly displayed console errors.

Francesco

2 Likes

Is any plan to add Bent Normal map to the baker ? It become very standard in complement to AO map in HDRP.
Thanks

1 Like

Hello,

the bent normals feature has been in the to-do list since the beginning of the project, but I never succeded to implement such feature. It’s still in the to-do list but I can’t say when it will be done.

Francesco

1 Like

Hello,
The link for sample files is not working. Where can I download sample files from?