Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 kilian277 · Apr 11, 2014 at 04:33 PM · shadervertexdeformation

Stitching planes

Hi,

basically i have 2 river models that use a custom shader that gives the models sinus waves along the mesh.

Now the problem is when i have 2 models next to eachother they are not "synced" so the two ends don't go with eachother

Is there a way to fix this in the shader or via script ?

This is the vertex part of the shader for information purposes:

 half3 vertexOffsetObjectSpace(appdata_full v) {
         return v.normal.xyz * sin((length(v.vertex.zy) + _Time.w * _DisSpeed )*_DisplacementTiling) * _Displacement * 1.5;          
     }
  
     v2f_aniOnly vert_onlyAnimation(inout appdata_full v)
     {
         v2f_aniOnly o;
  
         v.vertex.xyz += vertexOffsetObjectSpace(v);       
         o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);          
  
         return o;
     }

Thanks in advance !

Comment
Add comment · Show 2
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 HalversonS · Apr 11, 2014 at 05:26 PM 0
Share

You could attach the two river models in your 3d software program, then make sure the UVW's line up so that a seamless texture can tile without any noticeable lines. Collapse it, detach the polys of one from the other then re-import them back to unity. As long as the edges are sitting tangent to one another they should appear seamless. It would depend on your exact set up and how your shader functions... just an idea though.

avatar image kilian277 · Apr 11, 2014 at 05:45 PM 0
Share

thanks , i edited the question with part of the shader code.

Basically it is terrain that is splitted into square tiles. Some tiles have a river running thorugh it , what i can do is make the river one model over the whole terrain but that could be very expensive so they will be splitted.

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

22 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

Related Questions

How do I update the collider mesh based on the shader vertex deformed mesh? 0 Answers

Simple mesh deformation : Mesh.vertices or vertex shader with displacement texture ? 1 Answer

Raycast on mesh deformed by shader 0 Answers

Cubemap Diffuse / Heightmap Shader Issues. 1 Answer

Fake PS1 "jittery movement" effect in Unity? 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