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 gregroberts · Nov 18, 2014 at 08:54 PM · shaderrenderingmaterialvector

How do I shade something for edge-rendering?

My application requires a very simple renderer, akin to BattleZone, vector graphics, or similar. Basically, semi-transparent faces, and thick lines for all edges. Bonus points for extra-thick lines at the outline of the object. In SketchUp, this style is easily available... see attached render.

I have explored 90% of the material shader menu, and can't find much close, aside from "Unlit / Transparent" with a edged texture that needs manually re-scaled for each and every asset.

PLEASE HELP, becuase this is a cool title for Oculus Rift!

alt text

yoga-cube-edge-renders.png (132.8 kB)
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
0

Answer by Jeff-Kesselman · Nov 18, 2014 at 08:55 PM

What it seems to me you are looking for is a vector or edge renderer. This is actually a non-trivial problem as a GPU program, but there are quite a few solutions out there if you google for them.

To my knowledge though it will have to be a custom renderer, Unity does not come with one.

Comment
Add comment · Show 6 · 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 gregroberts · Nov 18, 2014 at 09:11 PM 0
Share

Jeff, this is a trivial problem from a compute perspective... it takes a lot less render calcs than many more complex shaders. There is no concept of "lighting" or "shadows" here, simply edges and faces. The question is, if this shader style is not natively supported in Unity, is it perhaps available via the asset store?

avatar image Jeff-Kesselman · Nov 18, 2014 at 09:45 PM 1
Share

Its nontrivial to do on the GPU. If you want to understand why, read some of the articles I linked below.

avatar image screenname_taken · Nov 18, 2014 at 10:02 PM 0
Share

Not a trivial matter. Don't just see the ready made results as you'd want a shader that culls the backfaces, doesn't overlap, and does edge detection. Each of these on their own is easy. Have you checked the asset store? i think there are packs available.

avatar image gregroberts · Nov 18, 2014 at 11:09 PM 0
Share

screenname_taken: I have checked the asset store extensively. perhaps i'm typing the wrong keywords. any suggestions? exploring Vectrosity now as per second response.

avatar image gregroberts · Nov 18, 2014 at 11:16 PM 0
Share

Jeff : the only reason I say "trivial" is that a proper implementation is far more straightforward to calculate than lighting / shadows / reflection or more "common" pseudo-raytrace solutions. We've intentionally engineered the entire scene to be extremely low poly count; the final target is mobile VR, so we're running on mobile GPUs with limited battery / heat... low poly elegance is key.

Show more comments
avatar image
0

Answer by tanoshimi · Nov 18, 2014 at 09:38 PM

http://www.starscenesoftware.com/vectrosity.html

?

Comment
Add comment · Show 4 · 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 Jeff-Kesselman · Nov 18, 2014 at 09:44 PM 1
Share

Vectosity is really a vector drawing package. You could use it to do a battle zone sort of thing, maybe, but that wasn't really what I understood he a asking for.

he wanted a shader that made it look wireframe. such things do exist.

http://strattonbrazil.blogspot.com/2011/09/single-pass-wireframe-rendering_10.html

http://codeflow.org/entries/2012/aug/02/easy-wireframe-display-with-barycentric-coordinates/

http://sibgrapi.sid.inpe.br/col/sid.inpe.br/sibgrapi/2010/09.15.18.18/doc/texture-based_wireframe_rendering.pdf

avatar image tanoshimi · Nov 18, 2014 at 09:53 PM 0
Share

You may be right, but I interpreted the question as "I want to achieve this end result - what method should I be using?" - the OP doesn't actually explicitly mention that they want a shader - they state they want "a very simple renderer, akin to BattleZone, vector graphics, or similar.", and I think vectrosity pretty much meets that description ;)

avatar image Jeff-Kesselman · Nov 18, 2014 at 10:34 PM 0
Share

I guess it depends on what your scale of your scene is.

I'd be hesitant to try to draw an entire typical scene in wireframe with vectrosity.

I agree you could probably literally do battlezone with it-- thats very few lines.

avatar image gregroberts · Nov 18, 2014 at 11:12 PM 0
Share

Jeff, as a researcher, I genuinely appreciate those technical links. $$anonymous$$y current research focuses on Rift and other VR hardware. You may enjoy it: http://dsky9.com/rift/

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Using Color.Lerp with Lightweight Render Pipeline 1 Answer

How can i get my quad to only render my texture without stretching it? 1 Answer

Standard Terrain Shader Upgrade to URP 1 Answer

URP material set texture scale 0 Answers

How does Material's "SetShaderPassEnabled" work? 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