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 Wibbs 1 · Apr 07, 2011 at 12:43 PM · meshclipping3dtexttextarea

Implementing a scrollable textarea without using UnityGUI

Hey all,

I'm partway through the process of implementing my GUI using Meshes and 3dText, but have hit a major block. I'm completely stumped with how to do a scrollable text area, as I can't see a way of clipping text depending on where the view is looking without using RenderToTexture, which is not an option as I'm using the free version.

This is what I want to be able to acheive:

alt text

Thanks in advance,

Wibbs

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

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Bunny83 · Apr 07, 2011 at 01:24 PM

Well, just write a clipping shader ;) I guess I would clip after the projection in homogeneous clip space.

You can of course use a second camera (yes, it works in free). You can alter the normalized viewport rect to set the desired area on screen. Let the second camera just draw your text meshes (culling mask) and you're done ;)

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 Wibbs 1 · Apr 07, 2011 at 01:34 PM 0
Share

Thanks for the quick answer. I'd thought of using different cameras already, but wondered if there was a less 'hacky' way of doing it.

Shaders sound kind of complicated, but that's probably because I've never been near one before. Looks like I have some reading to do :D

avatar image Bunny83 · Apr 07, 2011 at 02:17 PM 0
Share

Well, a second camera isn't really "hacky" :D. A camera is just another view and projection matrix, nothing more. Putting things on different layers that you can selectively render your stuff is also a common and intended function. But it's up to you ;) Good luck.

avatar image alonsoGarrote · Sep 22, 2013 at 03:55 PM 0
Share

Bunny83, Wibbs 1, Can you guys give me a hand on this?, How Can I use a second camera to render to a texture(im using Unity indie). Or do you have any example on how to use a clipping shader on this matter?, Please..im running out of time,

avatar image Bunny83 · Sep 22, 2013 at 08:00 PM 0
Share

You can not (efficiently) render to a texture in the indy version. What i have suggested is to use a second camera to directly render the textmesh onto the screen.

Just add a new camera and define a seperate layer for your GUI. Put the GUIText or Text$$anonymous$$esh object on the GUI layer, exclude your GUI layer from your main camera's layermask and set the layermask of your second camera to only render your GUI layer. Now you can simply change the normalized viewport of your second camera to specify the rect on the screen. When you move the text or the camera the text is scrolling but clipped by the cameras border.

avatar image alonsoGarrote · Sep 25, 2013 at 03:24 AM 0
Share

I see, thank you for your comment, :D. Im using Vuforia SD$$anonymous$$ for a project. So I need to clip a Text$$anonymous$$Esh which is on a 3D surface...so I can scroll text and it can be seen only inside.., I believe I need a clipping shader, but I dont know yet how to do one, or where to get one.

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

2 People are following this question.

avatar image avatar image

Related Questions

Mesh: faces clipped and/or not being rendered? 3 Answers

Procedurally generated mesh disappears from certain camera angles 1 Answer

How to get the mesh of each character in 3DText? 1 Answer

TextMesh doesn't work on Android 0 Answers

Animated mesh is clipping in viewport and in game camera 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