• 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
2
Question by Caius · Jan 04, 2010 at 11:59 AM · shadergrasshair

Fur, Hair, and Alternative Grass

Hey there,

I've spent hours trying to find a way of creating a sphere planet object with terrain on it, such as grass thats effected but local wind, I found thats it not really possible to use unity's terrain tools on anything other than a plane.

What I'm trying to do Is find some sort of Fur shader, like Cinema4Ds shader, and use it to create grass on a sphere, What would be the best way to go around doing this??

thanks

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

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Peter Bruun-Rasmussen · Jan 06, 2010 at 06:47 PM

We used the techniques found in GPU Gems Chapter 7 for rendering and animating grass in The SOL Game.

The basic idea is to do the actual grass animation on the GPU. In SOL the grass is distributed into clusters consisting of five transparent planes each. These clusters was manually positioned by the level designer. The planes was rendered using a custom shader that translates top vertices according to two sinusoids. The Cg code below shows how we did the animation in the vertex program.

v2f vert (appbase v) { float wind = _WaveAmplitude1 * sin(_WaveFrequency1 * 2 * 3.14 * _Time.y + v.vertex.x) + _WaveAmplitude2 * cos(_WaveFrequency2 * 2 * 3.14 * _Time.y + v.vertex.y);

 float split_v = 0.9; 
 v.vertex = v.vertex + wind * v.texcoord.y * _WaveDirection * (v.texcoord.y > split_v);          

 v2f o;
 PositionFog( v.vertex, o.pos, o.fog );
 o.uv = v.texcoord;
 o.lightDir = ObjSpaceLightDir( v.vertex );
 o.normal = v.normal;

 return o;

}

Notice that we use texture v-coordinates to tell top vertices from bottom vertices.

Comment
Add comment · Show 1 · 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
avatar image Ricardo · Jan 09, 2010 at 09:24 PM 1
Share

Unrelated to the question, I know, but... damn, that looked good. I hadn't seen SOL before, and I'm glad I found it through this question. I keep seeing interesting small games co$$anonymous$$g out of DADIU.

avatar image
1

Answer by AngryAnt · Jan 04, 2010 at 01:37 PM

There's a community created fur shader on the forums.

Comment
Add comment · Show 1 · 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
avatar image ic · Nov 25, 2010 at 11:58 AM 0
Share

that's over 3 years old - is it compatible with unity3?

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

The Best Way To Make Stylised Grass in Unity? 0 Answers

How can I edit the built in shaders? 1 Answer

Grass shading on terrain has weird AO 0 Answers

grass on objects 0 Answers

I need swaying, self-shadowing, ultra-realistic grass 0 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