Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 /
  • Help Room /
avatar image
0
Question by Ledifen · Feb 22, 2017 at 08:28 AM · shaderfontvisibility3d text

How to make 3d Text invisible through 3D Game object... for a complete beginner

Okay, I know that there are a lot of threads about that problem, but I've try them and either it does not work for me, either I don't understand what I have to do... Or the options I have to mess with is not available....

I have Unity 5.5. (the free version) and I'm a complete beginner. Like... The obvious is not obvious for me. Anyway, the problem is well known: 3D text is visible through other 3D object (walls, cubes, etc) when I try the game.

Here's what I think I understand I have to do :

1) Create a new shader and modify its code with what I want (what type of shader ? Unlit? Standard? Compute?)

2) Apply the font texture (of the font I want to use) to that shader. (That part, I can do)

3) Apply the shader to a new material created for this purpose (Errr. I can't. The shader I've created is not in the propositions anywhere in the inspector.)

4) Apply the new material on the mesh renderer. (Can't do it since I can't assign the shader to a new material).

I've seen something else, and I don't know if it's normal : the font texture is completely uneditable.

Can anybody give me a step by step description of what I have to do to solve the problem?

Thanks a lot (And I really am sorry to post another thread about this subject... I really am)

Comment
Add comment · Show 3
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 hexagonius · Feb 23, 2017 at 09:40 PM 0
Share

do you mean Text$$anonymous$$esh or something else?

avatar image Ledifen hexagonius · Feb 24, 2017 at 05:34 PM 0
Share

Yes, I do mean text mesh :)

avatar image Ledifen hexagonius · Feb 27, 2017 at 10:52 PM 0
Share

@hexagonius,

So, I really do not mean to push you, but do you know how to do this ? I just want to know if I keep looking on the Internet of if I wait an answer here :) Thank you, btw - for commenting, I mean - It's kind of nice knowing you're not completely unnoticed :)

1 Reply

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

Answer by Namey5 · Mar 09, 2017 at 09:41 AM

There are plenty of threads around this, and it's not exactly simple if you don't understand how shaders work. You need to download the built-in shaders from Unity's website;

https://unity3d.com/get-unity/download/archive

Then open the Font shader (under "DefaultResources"). Then find the line that says something like (ZTest Always). Set it to "ZTest LEqual". Then, change the first line of the shader to something like:

Shader "Custom/Text Shader"

So that you can distinguish between them in Unity. Take that shader into your Unity project assets, then use that as the shader for the material, and make sure to add the font texture. As long as you select a font in the Text Options, and use the font texture for that exact font it should work.

Comment
Add comment · Show 5 · 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 Ledifen · Mar 17, 2017 at 05:50 PM 0
Share

Thank you! :)

That's exactly the kind of answer I needed. It's clear and everything, and it works! This is amazing :D

avatar image urvashi412 Ledifen · May 14, 2017 at 12:24 PM 0
Share

Thanks a lot. Only your answer helped. Other threads redirect to some wiki page shader that doesn't work in Unity 5.

avatar image paulnaude · Apr 12, 2018 at 09:13 AM 0
Share

Thank you @Namey5 You made it so easy for me! I agree with urvashi412. I was able to set up a bunch of fonts in this way

avatar image somacruz10 · Jun 15, 2018 at 01:24 PM 0
Share

But where do I find font texture??

avatar image GHOSTO00 somacruz10 · Feb 20, 2019 at 02:03 AM 0
Share

I had a really hard time with this too. After spending several hours on this issue searching around, finding this page, not getting it to work, and then finally co$$anonymous$$g back to it and getting this to work, I decided I'd write this to help anyone else who got stuck. Here are some step by step instructions:

  1. Go to https://unity3d.com/get-unity/download/archive as mentioned in the accepted answer by @Namey5.

    1. Find the version of unit that you have, then on the Downloads dropdown click "Built in Shaders." It will automatically download a zip called builtin_shaders or something like that. Like so: Image

    2. In this zip, go to the folder DefaultResources and open Font.shader. This is the default font shader.

    3. Create a new font material (name it 3DText or something), create a new shader (it doesn't matter what type; standard, unlit, etc), and copy over everything from Font.shader into this file, replacing everything it originally had.

    4. Change the new shader file as in @Namey5's answer. Good luck!

EDIT:

Well co$$anonymous$$g back to this I still got confused, so here is a few steps afterwards. To use:

  1. Create a 3D text object.

  2. In the Text $$anonymous$$esh for that object, drag and drop your previous font material (for me, ARIAL).

    1. In the $$anonymous$$esh Renderer for that object, under materials, put in your new font material (i.e. 3DText).

I don't know why I had to do step #2, but after a bit of testing that is the only way I could get it to work :)

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

127 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 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 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 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 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 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

Custom split color font 0 Answers

Outline shader: should be seen through some object but not when other object is between first object and shaded. 0 Answers

3D Text, oh my... 1 Answer

How do you stop 3d Text from rendering through objects? 0 Answers

Reveal Nearby Objects Relative to Player 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