Documentation

​
​

Development

User Acquisition

Monetization

Industry

Asset Transformer SDK

2026.1

Supported
​

User Manual

Python API

C# API

Changelog

Discussions

Asset Transformer SDK

2026.1

Supported
​

​
​
Get started
  • System requirements
  • Licensing
  • Setup
  • Migrate from Scenario Processor
Framework
  • Framework
  • Preferences
Input/output files
  • Supported formats
  • Import files
  • Export files
  • Export textures
  • CAD vs Mesh
Scene
  • Product structure
  • Occurrence
  • Component
  • Material
  • Image
Algorithms
  • CAD
  • Healing
  • Optimization
  • Combine and bake
  • Reconstruction
  • UVs
Viewer
  • Viewer
Pixyz UI
  • Setup
  • Overview
  • Create a custom UI
Guidelines
  • Data preparation
  • Process point clouds
Debug and diagnose
  • Log files
  • Debug best practices
Other
  • Samples
  • Glossary
  1. Asset Transformer SDK (ex Pixyz)

Old to new baking API

Code sample to ease transition to new baking API
Read time 1 minute
Last updated 9 months ago

Transitionning to new baking API

from pxz import *destinations = [ ... ] # list of destination occurrencessources = [ ... ] # list of source occurrencesuvChannel = 0resolution = 1024padding = 2defaultDiffuse = [1, 0, 0, 0]nAOSamples = 64# Old API:maps = []maps.append(algo.BakeMap(algo.MapType.Diffuse, [scene.PropertyValue("DefaultColor", f"{defaultDiffuse}")]))maps.append(algo.BakeMap(algo.MapType.Normal, []))maps.append(algo.BakeMap(algo.MapType.ComputeAO, [scene.PropertyValue("SamplesPerPixel", f"{nAOSamples}")]))result = algo.bakeMaps(destinations, sources, mapList, uvChannel, resolution, padding)diffuseMap = result[0]normalMap = result[1]aoMap = result[2]# New API:sessionId = algo.beginBakingSession(destinations, sources, uvChannel, resolution)algo.setBakingSessionPadding(sessionId, padding)diffuseMap = algo.bakeDiffuseMap(sessionId, defaultColor=defaultDiffuse)[0]normalMap = algo.bakeNormalMap(sessionId)[0]aoMap = algo.bakeAOMap(sessionId, samples = nAOSamples)[0]algo.endBakingSession(sessionId)

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.

  • On this page
    • Transitionning to new baking API


Report a problem with this page