x


How to load *.txt files and display the text on the surface of a book model ?

Hi there !

I'm a beginner and I'm workin on a project using Unity3D to create a 3D-book.

(I know Unity3D is designed for games but it looks powerful enough to do this ..)

I come up with this question about how to load *.txt files and display the text on the surface of a book model (My thought is to use 3DText but I'm not sure about it)

Could someone help me ?

Thanks a million !

==================

in fact I'm not a native English speaker . I mean I'm a foreigner college student. please forgive me of my poor way of expressing. I need help asap. I'm messed up with the rules here at this site.. forgive me again.

more ▼

asked May 17 '10 at 08:17 AM

ck47_s gravatar image

ck47_s
31 7 7 10

Everything is possible, but you have to be more specific and you are asking a lot of different things in one question. Please go through the FAQ to see how this website exactly works (http://answers.unity3d.com/faq) because it's not a forum. From the guidelines: Don't post multiple unrelated questions in one post. And I think loading a *.txt, displaying, animating, showing dialogs, etc.. could be separate questions. regards

May 17 '10 at 10:21 AM Lipis

thank u all the same I've changed my question to a single way

May 17 '10 at 10:37 AM ck47_s

I think it's still two different questions.. how to load a .txt file and how to display a text on 3d surface..! About the first check this answer for example: http://answers.unity3d.com/questions/5185/help-me-about-reading-txt-file/5201#5201 to get an idea how to read from .txt files.. if you want more info you can always comment under any answer... but in order to get an awesome answer to your questions.. you have to be very specific and ONE question at a time...!! good luck and have fun..

May 17 '10 at 10:43 AM Lipis

Im sry bout this.

May 17 '10 at 12:02 PM ck47_s
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

First - if your pages aren't dynamic, and the application is thought for offline use (can be bigger size), you should think about using textures only. Create your text in any application and export the page as standard texture, this is by far the easiest way.

But in every other case ---

You require UnityPro for my way to achieve this. I have used it myself for an interactive typewriter, where the text was written by the user and directly assigned to the paper.


Set up a new camera. Set up a GUIText object.

Put this GUIText object in a new layer (select a custom layer for it).

Tell your camera to only render that layer; set the camera's background color to white and your text color to black, select the right font etc.

Create a new RenderTexture and assign it to the camera.

Import your *.txt file (look at the comments and other answers) and assign it to the GUIText objects text variable.

You can now use this RenderTexture like every other texture - for example, assign it as MainTexture to your book pages.

more ▼

answered Jul 26 '10 at 10:16 PM

felix. gravatar image

felix.
2.8k 19 26 50

(comments are locked)
10|3000 characters needed characters left
more ▼

answered May 17 '10 at 05:34 PM

Chris Masterton gravatar image

Chris Masterton
534 6 10 22

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x765
x579
x139
x42

asked: May 17 '10 at 08:17 AM

Seen: 8624 times

Last Updated: May 17 '10 at 11:58 AM