Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 jessy-girard · Jan 05, 2017 at 06:09 PM · shadersnormal map

Making Secondary Map Texture Animation

Hi All,

I can't find the way to display the Secondary Normal Map offset changes the way I do it on Main Texture or Bump Maps.

This line in the update changes the value in the Inspector but nothing is shown in PlayMode

         m_offsetSecondary += _deltaTime * m_stepSecondary;
         m_offsetSecondary.x = Mathf.Repeat( m_offsetSecondary.x, 1 );
         m_offsetSecondary.y = Mathf.Repeat( m_offsetSecondary.y, 1 );

         m_material.SetTextureOffset( "_DetailNormalMap", m_offsetSecondary);

I can see the values changing during playtime in material inspector but the secondary normal map is not moving.

I've also tried EnableKeywork instruction in the Start() method.

The Keyword is the good one and it should be working fine... but it's not.

Any idea ?

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 jessy-girard · Jan 05, 2017 at 11:21 AM 0
Share

O$$anonymous$$ In fact there is an error in the Debug $$anonymous$$ode for secondary maps :

I've added the texture on the Secondary $$anonymous$$ap and changed tiling to 0.2

Then from editor I've activated Debug $$anonymous$$ode and searched for the line where my texture is, it is shown to be null in _DetailAlbedo$$anonymous$$ap and my texture in _DetailNormal$$anonymous$$ap.

So, the Texture Reference are inverted between this two arrays (and modifying Albedo$$anonymous$$ap works now).

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Calvacante · May 12, 2017 at 07:27 AM

The _DetailNormalMap is not the secondary map.

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.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Why does my bumped diffuse material get lit in a weird way? 1 Answer

Surface Shader apply normal map to object normal without pluggin it into o.Normal 1 Answer

Shader has uv seams 0 Answers

Problem with Normal Maps 1 Answer

Specular and normal map artefacts problem 3 Answers


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