• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Troygbiv · Sep 28, 2012 at 07:39 PM · lightmapatlassurfaceareatool

How to calculate surface area of a Mesh for Lightmapping

I am an artist and was wondering if there was a way to query the surface area of a Mesh and have it display inside the lightmapping tools? The reason I was wanting to do this was so I could optimize my light map usage. This way I can calculate before bake how much space an object would take Tiling X,Y for a given Size 512-4k BEFORE baking the object.

I know the numbers exist Unity uses them in determining the Max Object size in lightmap per the atlas. But it would be great to know the math beforehand.

Case in point, if I had global scale set to 1 and I wanted to know the tiling order of individual objects as I adjust the "Scale in Lightmap" attribute on a per object basis. Then I am just missing the surface area figure for the object in order to finalize my calculations. This is under the assumption that I am only calculating 1 single map and that the global scale does not change.

I get the feeling Unity retains this information already however it is not displayed. =/

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Neil Smith · Apr 11, 2014 at 10:16 AM

Did you find out any script for this?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Lightmap atlas packing inefficiencies 0 Answers

Unity changing locked atlas index across multiple lightmapped meshes? 1 Answer

UV2 Lightmap Atlas Creation Outside of Unity? 2 Answers

Sprite Atlas Generation in android build 1 Answer

Is it possible to assing a colour to the surface delimitated by the line renderer loop? 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges