Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • 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 LegionBreaker · Jun 03, 2020 at 11:37 AM · runtimetexturesnormal map

How can I merge 2 Normal Maps into a single Normal Map at runtime?

Preface:

I am a solo developer, and I am working on a project that requires building meshes piecemeal at runtime so that they can fit together the way RuleTiles work on TileMaps. The individual parts are mapped and will have both a texture map and normal map shared among all parts used to build each mesh. I am using CombineMeshes() to build each mesh from these parts, then again to merge a map of these meshes to reduce load on the game engine.

These meshes represent structure objects in the game that can take damage. I want to visually show this damage via scratches, cracks, and other deformations on the normal map. I could go through the effort of creating 4-5 high-poly sets of models for each kind of structure, and require any modders that want to add their own variants to do the same. However, this would require 4-5 times as much modeling work to achieve. So I would rather create 1 detail normal map for each variant of the structure, and 3-4 damage normal maps that could work for all variants. Then combine each detail normal map with each of the damage normal maps at application load.

I know that the default Shader has two normal map inputs. However I am trying to use the Universal Render Pipeline, and the URP Shaders I have tried only have 1 normal map. I do not want to create a custom shader at this time. I would prefer to combine the normal maps when the assets are loaded, then use them with the built-in URP Shaders.

Question:

How do I take 2 Normal Maps, overlay 1 (possibly with some tiling) over the other, and then store a soft copy of the result for later use with a built-in URP Shader? I know there are functions for working with Normal Maps within the Shader system, but I need to perform this operation prior to the Shader. Are there functions in Unity I can leverage for this? Do I need to write a function to perform the merge? An example would be helpful.

Thank you.

Comment
Add comment · Show 1
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
avatar image TylanL · Mar 12, 2021 at 10:43 PM 0
Share

I know it has been a $$anonymous$$ute, but I have the same question. My application is different with 2D characters in 3D space, but I also am in need of a way to overlay normal maps to get a single composite to use before the shader is applied. Have you had any luck finding a way of doing this in Unity?

0 Replies

· Add your reply
  • Sort: 

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.

Follow this Question

Answers Answers and Comments

129 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to change Textures after build the game? 2 Answers

How to load multiple textures and sounds 0 Answers

Dynamic texture resizing or switching between texture sets of different sizes at runtime 2 Answers

Grab Image/texture from MTL file and apply to a game object 1 Answer

Run-time loaded Normal Map Lighting problem 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies 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.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges