Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
2
Question by Mackuss · Jun 24, 2011 at 07:54 AM · text3dtext

3-D Text Visible Through my Level

Hey guys, new to Unity - but I've read up on the basics, etc.

I want to put up a sign to a business in my 3-d world (on a building out in front of it), but when I run the game I can see the 3-D text through walls and wherever I'm at in the world. How do I fix this? It's got be an easy fix.

Comment
Add comment · Show 4
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 Kacer · Jun 24, 2011 at 07:58 AM 0
Share

Define 3D text, is it a mesh or a GUI object?

avatar image Dreamblur · Jun 24, 2011 at 11:47 PM 0
Share

Use a text mesh or a texture with text on it. GUI displays text as 2d, not 3d.

avatar image Eric5h5 · Jun 25, 2011 at 01:23 AM 1
Share

http://www.unifycommunity.com/wiki/index.php?title=3DText

avatar image yunatee · Jul 10, 2015 at 08:38 AM 0
Share

The fact that people are expected to engage in a multi-step procedure implementing a community-made custom shader just to get around this behavior is, frankly, ridiculous. This is something that should be in Unity to begin with.

6 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by testure · Jun 25, 2011 at 12:24 AM

3DText ignores depth- you'll need to use a different shader that takes z-depth into consideration:

http://forum.unity3d.com/threads/9931-3D-text-that-takes-the-depth-buffer-into-account

Comment
Add comment · Show 10 · 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 Mackuss · Jun 26, 2011 at 12:41 AM 0
Share

I can see this is heading in the right direction as that person Eric says to "$$anonymous$$ake a new GUI/Text Shader that's a copy of the built-in one, but with "ZTest Always" removed, and use that." but how do I even find the file that contains the shader to make a copy of it?

avatar image Eric5h5 · Jun 26, 2011 at 12:58 AM 1
Share

@$$anonymous$$ackuss: shaders are part of materials.

avatar image testure · Jun 26, 2011 at 01:02 AM 0
Share

i don't understand what you don't understand.. you just pasted the instructions- they're clear as glass.

avatar image Mackuss · Jun 26, 2011 at 01:07 AM 0
Share

I guess what I'm asking is how do I do this : "Place this shader somewhere in your Assets folder hierarchy. Then, replace the font material on the mesh renderer of the 3D text with a different material that uses this shader (and the appropriate font texture of course—this won't work for the built-in font because the font texture for that is not available). Also make sure the 3DText object is using the same font that was used to generate the font texture. "

avatar image Mackuss · Jun 26, 2011 at 04:18 AM 0
Share

@ Testure

lol are you serious? It's not clear at all to someone who doesn't know how to attach a shader to a material - as well as duplicate a font material to do so.

I made a shader - I made a material - but I need the material to be the font material that allows the custom font to be visible.

Show more comments
avatar image
2

Answer by Waz · Jun 27, 2011 at 05:08 AM

This is answered here: http://answers.unity3d.com/questions/12576/3d-text-rendering-over-scene-objetcs.html

Comment
Add comment · 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
1

Answer by Pan_Migo · Dec 03, 2016 at 07:39 AM

Because you say you need a sign you could you a go to GameObject -> UI -> Text. Then if you switch the canvas to world space you will be able to see this 2d text in your 3d scene. The solution i provide does not use 3d text but i assume it solves the problem for you.

Comment
Add comment · 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
0

Answer by jrat · Oct 11, 2015 at 06:37 PM

Make sure the walls have materials with "Transparent/Diffuse" shaders.

I was having the same problem, with text showing through a Quad. I then changed the shader on the Quad, and the text stopped showing through. Hope this works!

Comment
Add comment · 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
0

Answer by lockay · Nov 20, 2015 at 08:13 AM

I made a script so that the Mesh Renderer is de-activated if the player is a certain distance away from the object. #pragma strict

 var player : Transform;
 var thing : GameObject;
 var viewDist : float;
 var comp : Component;
 
 function Update () {
     if(Vector3.Distance(player.position, thing.transform.position) > viewDist){
         thing.GetComponent(MeshRenderer).enabled = false;
     } else {
         thing.GetComponent(MeshRenderer).enabled = true;
     }
 }

Then attach the script to the text, and drag your player into the "Player" spot and the 3D Text into the "Thing" spot. Finally, set the viewDist variable to the distance you want the text to be visible from.

Comment
Add comment · 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
  • 1
  • 2
  • ›

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

13 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

Related Questions

Cannot get 3D Text/Text Mesh to wrap or a attached collider used as a button to scale based on word count. 2 Answers

Insert 3d text to the front face of a cube GameObject 0 Answers

3d text color 2 Answers

Unity3d Battery Life Change 3D text Java script 0 Answers

Why is setting the parent of a text transform alters its world coordinates? 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