Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to "Bake" shading directly into texture?

Discussion in 'General Graphics' started by Rudy-Pangestu, Jan 30, 2015.

  1. Rudy-Pangestu

    Rudy-Pangestu

    Joined:
    May 24, 2013
    Posts:
    16
    Hi guys,

    I'm trying to get the best performance on Android. So far, I know the best way is by using the mobile/Unlit shader and no lighting. It gives a significant boost of FPS. However, the downside is that all 3D objects becomes flat.

    To achieve "shading" effect, usually the texture itself is painted with shading. This way, it is still technically flat but from appearance, it looks like there is shading. As far as I know to do this, the texture must be painted manually. It will take a very long time when there are lots of 3D objects.

    Is there any way to automate this process?
     
  2. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    You'd need to either render to texture or grab the screen to a texture, after drawing the 3d lit object with a camera, and then save that off as a texture.
     
  3. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Bake AO into the diffuse texture. Currently I'd do this in my animation package only because I don't know the entire process in Unity - yet.
     
  4. TechnoCraft

    TechnoCraft

    Joined:
    Apr 6, 2012
    Posts:
    28
  5. sui0528

    sui0528

    Joined:
    Sep 15, 2014
    Posts:
    52
    Madfinger has a tool to do the job for you , it is the render to texel ,you can get it for free in asset store, but you have to know that it is something like light map, so the uv must have no overlap, this means you can't mirror the texture or other uv operation,and will increase the texture count and influence the performance