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
1
Question by Oninji · Jan 04, 2012 at 12:03 AM · bugrender3d text

3D Text Shade do not work properly (Characters occluding other characters)

Greetings,

I have a 3D Text Shader, which make 3D text to not be rendered through walls and object.

Here is the Shader

 Shader "GUI/3D Text Shader" { 
 
 Properties { 
    _MainTex ("Font Texture", 2D) = "white" {} 
    _Color ("Text Color", Color) = (1,1,1,1) 
 } 
 
 SubShader { 
    Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } 
    Lighting Off Cull Off ZWrite On Fog { Mode Off } 
    Blend SrcAlpha OneMinusSrcAlpha 
    Pass { 
       Color [_Color] 
       SetTexture [_MainTex] { 
          combine primary, texture * primary 
       } 
    } 
 } 
 }

When I rotate my text, it does not render correctly. Parts disappear, sometime whole letters. As seen here : http://img832.imageshack.us/img832/707/bug3dtext.png

Any ideas what might happen? I used this shader in an old version of unity 3D (3.0) and it worked perfectly. Even now, If I open that old project. It still works perfectly.

Edit: I've found the bug, some fonts are non-standard and characters overlaps. This cause and occluding/rendering error.

So to rectify this, I'd need some way that characters does not occlude letter parts of the same mesh.

Comment
Add comment · Show 5
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 aldonaletto · Jan 04, 2012 at 12:35 AM 0
Share

This is the @Eric5h5 text shader posted in the wiki. Have you followed the other steps to set the font material as well? Failing in doing this may produce weird errors. Take a look at the original article to check all the steps: http://www.unifycommunity.com/wiki/index.php?title=3DText

avatar image Oninji · Jan 04, 2012 at 01:09 AM 0
Share

It is that one, I had forgot where I've gotten it.

Still, it does not work. It seems that my font may be not entirely compatible with it, as I've used my old font and it worked quite well. ($$anonymous$$inus the Texture disappearing error, which is another matter.)

avatar image Oninji · Jan 04, 2012 at 01:40 AM 0
Share

I found the bug, see the Edit in the main post.

avatar image luizgpa · Jan 04, 2012 at 01:52 AM 0
Share

Is the screenshot from a single Text$$anonymous$$esh or there are multiple?

avatar image Oninji · Jan 04, 2012 at 02:01 AM 0
Share

Single text mesh. As said in the Edit, the source of the bug has been identified. I need a solution now, I'm trying to come up with one, if someone already know how, it would be helpful.

1 Reply

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

Answer by luizgpa · Jan 04, 2012 at 02:14 AM

Change

ZWrite On

to

ZWrite Off

The drawback is that one TextMesh behind another one may be rendered after and appear in the front.

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 Oninji · Jan 04, 2012 at 02:18 AM 0
Share

Works perfectly! Thank you!

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Render problems in web build (wrong colors) 1 Answer

My new computer can't render Unity GameObjects 0 Answers

plane rendering problem 4 Answers

3D Text Looks Like It's Behind A Plane, When It's Not? 1 Answer

Green lines are gone? 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