Previous topicNext topic

Adding Text to Visuals?

Questions, comments, feedback, etc.
Post Reply
jarridv
Posts: 2
Joined: Mon Jun 08, 2015 10:14 am

Adding Text to Visuals?

Post by jarridv »

Hi,

Apologies if this is a really NOOB question but are you able to add text to the visuals, Like DJ names or name of the event flashing up for a few seconds over the visuals?

many thanks
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Adding Text to Visuals?

Post by Magic »

Don't worry, several people have asked that question. My initial assumption was that people would rather use images with text in them (created in Photoshop, etc.). But it's become clear now that people want a quick-and-dirty option for adding text.

So, due to popular demand, we'll be adding a text module in one of the next releases.
jarridv
Posts: 2
Joined: Mon Jun 08, 2015 10:14 am

Re: Adding Text to Visuals?

Post by jarridv »

Thanks for the update, any idea when that release would be? Git a huge event coming up in a month and would really like to be able to incorporate text.

Anyways, thanks very much for providing an excellent program that is very user friendly and fun to use. The possibilities are endless of what you can achieve. Well done!

Thanks
Jarrid
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: Adding Text to Visuals?

Post by blackdot »

Wouldnt it be just a really small hassle to create ones texts in photoshop or gimp and save them as png ??
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Adding Text to Visuals?

Post by Magic »

Thanks for the update, any idea when that release would be? Git a huge event coming up in a month and would really like to be able to incorporate text.
Hopefully there will be at least a Beta release available by then, but I can't make any promises :? .
Anyways, thanks very much for providing an excellent program that is very user friendly and fun to use. The possibilities are endless of what you can achieve. Well done!
Thanks :)
Wouldnt it be just a really small hassle to create ones texts in photoshop or gimp and save them as png ??
Several people have told me that they often don't know what text to add until they are at their event, and at that point it's just harder to quickly enter text if it has to be done in a different program. You know?
Syd
Posts: 60
Joined: Thu Oct 16, 2014 10:32 am

Re: Adding Text to Visuals?

Post by Syd »

sometimes I don't even know what text to enter *during* the event :D
leadedge
Posts: 33
Joined: Fri Mar 06, 2015 6:47 am

Re: Adding Text to Visuals?

Post by leadedge »

Hey Eric,

what about a freeframe plugin. No guarantees but I could have a look at it. Easiest would be a simple one with a single line of text. It gets a bit more of a job with effects like outlining or 3D or if the text was on fire or anything like that.

Cheers,

Lynn
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: Adding Text to Visuals?

Post by blackdot »

Hmm, i see. :)
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Adding Text to Visuals?

Post by Magic »

leadedge wrote:what about a freeframe plugin. No guarantees but I could have a look at it. Easiest would be a simple one with a single line of text. It gets a bit more of a job with effects like outlining or 3D or if the text was on fire or anything like that.
Sure! It might be a lot of work for you though -- it would need to be 64-bit and 32-bit for both OS X (10.6+) and Windows (7+). Also, there is the issue of how to handle font selection -- it seems like a drop-down box would be the best way, but FFGL doesn't support drop-down boxes.

I already had an idea in mind about how to do a normal 2D text module, but 3D text would be a whole different story. If you want to tackle the latter it'd be great since I didn't have any plans to do 3D text (anytime soon, anyway).

Thoughts?
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: Adding Text to Visuals?

Post by blackdot »

3D texts could again done be externally. eg. in blender. there's an easy way to do text there :) and export it back to magic. i could write a short tutorial if there's the demand.
leadedge
Posts: 33
Joined: Fri Mar 06, 2015 6:47 am

Re: Adding Text to Visuals?

Post by leadedge »

OK Eric.

I had a look into the different options for text some time back. I can't remember why I was looking at it at the time but that's why I mention it here.

There have been some Freeframe 1 plugins done in the past but they have not been extended to FFGL.

I think I could do a simple one for Windows pretty quickly. But to support all possibilities gets to be work and time as you say.

The lack of a list box in Freeframe is a real pain and if you open a dialog within a Freeframe dll it can freeze the host app. I have been getting around it, but in a round about way. What I had in mind is simply a text entry of the font name as well as the line of text you want.

That opens up questions of just how it is to be used. Multi-line scrolling credits style for example would need a different approach with file load.

Anyway I will have a look a bit more and see what might come of it. If I end up with a simple one I will post it here. That might give you some feedback on what people want once they see the limitations of a simple one.

Blackdot, that idea of doing the text in Blender is a neat one. Does it produce a bitmap or some font method?
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: Adding Text to Visuals?

Post by blackdot »

What i meant was that a 3D text could be exported as an ordinary 3D model.
leadedge
Posts: 33
Joined: Fri Mar 06, 2015 6:47 am

Re: Adding Text to Visuals?

Post by leadedge »

OK I understand.

Here is a very basic text loader 32 bit Windows freeframe plugin.

https://drive.google.com/folderview?id= ... sp=sharing

This uses the FreeType library and a simple interface to it. You can do much more with text but you have to use a library that itself uses Freetype. I had a look at this but it gets complex rapidly and I won't go any further with it.

This is just the basics with limited function but it might give some ideas about what would be useful for Eric to include in his text module.

A different approach is to use another application like Processing and use Spout or Syphon to combine this with other things within Magic.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Update
Horizontal scrolling changed so that the end of the text starts at the LH edge next time.
If both horizontal and vertical scroll are selected, the text is centered horizontally.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Kvasnik
Posts: 67
Joined: Thu Feb 05, 2015 1:09 am

Re: Adding Text to Visuals?

Post by Kvasnik »

Also quite a punk solution but some pen and paper + a webcam is a good way to add text :-)
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Adding Text to Visuals?

Post by Magic »

leadedge wrote:This uses the FreeType library and a simple interface to it. You can do much more with text but you have to use a library that itself uses Freetype. I had a look at this but it gets complex rapidly and I won't go any further with it.
Nice! The screenshot looks cool :). And the shadow is a nice touch. But, I can't seem to get it to work in Magic... the plugin loads, but no text appears.

...and it just crashed :o.

Anyway don't worry too much about it, since I'll be taking a look in the next few weeks. Thanks for the mention of FTGL in the readme though... it wasn't on my radar, but it looks promising.
leadedge
Posts: 33
Joined: Fri Mar 06, 2015 6:47 am

Re: Adding Text to Visuals?

Post by leadedge »

OK Eric.

who knows why the crash. It is working fine here but that's always how it is. It could be there is no text when it starts. I am using a saved project with Magic. Usually null pointers are the culprit. I will have a quick look.

FTGL looks good and I could compile just fine, but I got nothing when I tried to draw the text. OpenGL not set up right probably. This will give you different font effects like outline etc.. Shadow is easy. Just offset a bit and draw black with half alpha and overlay the coloured text.

I won't go any further with it because it is more of a mouthful than I can chew at the moment. Anyway it was a good exercise and worth a try. I hope it is useful. One thing to think about would be to find and browse the Windows font folder for selecting fonts.

Saw this just now : http://tentonraygun.com/text-attack/

And yes there are other ways ! We did presentations on an overhead projector and marker pen once.
leadedge
Posts: 33
Joined: Fri Mar 06, 2015 6:47 am

Re: Adding Text to Visuals?

Post by leadedge »

Eric, I am fairly sure it is crashing because the initial font file is not being found.

I used "..\Program Files\Common Files\Freeframe" as a fixed path, so the initial font "test.ttf" has to be in there.

The other likely thing is that the logic for finding the Program Files folder isn't right, so you could try "Program Files (x86)".

Another possibility is permissions to read from the folder.

I have updated the dll with a console window so if the font is found or not it will show. It would be nice if you could get it to work. I also included the recompiled libraries but these will be 32bit and I did not get ftgl to work. Should be the same link.

https://drive.google.com/folderview?id= ... sp=sharing
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Adding Text to Visuals?

Post by Magic »

Ahh, you're right. I guess I didn't realize that the path was hard-coded. I assumed the plugin would look in the current path for the supplemental files.

Anyway, I did just try it again in Program Files (x86), and the console window said the file was found, but I still couldn't get it to work. I also got a crash and then a freeze :).
leadedge
Posts: 33
Joined: Fri Mar 06, 2015 6:47 am

Re: Adding Text to Visuals?

Post by leadedge »

OK I found it.

The code logic is extracted from another project and looks for the existence of "Program Files (x86)\Common Files\Freeframe" first and sets the path for the font if it exists. On 32bit machines this folder won't exist, so it then looks for "Program Files\Common Files\Freeframe" and sets that as the font path. So it misses entirely the "Program Files\Common Files\Freeframe" on 64bit machines.

The dll itself can be anywhere that Magic can find it, but the fonts have to be in "Program Files (x86)\Common Files\Freeframe" on a 64bit machine.

You should see in the console :

TextLoader
TextLoader
SHGetKnownFolderPath 1 OK [C:\Program Files (x86)\Common Files\Freeframe\]
font [C:\Program Files (x86)\Common Files\Freeframe\test.TTF] found OK
font.init OK

I have updated files with the same link :

https://drive.google.com/folderview?id= ... sp=sharing

~ ~ ~
leadedge
Posts: 33
Joined: Fri Mar 06, 2015 6:47 am

Re: Adding Text to Visuals?

Post by leadedge »

Hi Eric and all,

I have finalised this project as far as I can and will leave it at this stage.

Dependence on fixed folders for font and dll location is now removed. Selecting a font is now done with a Font selection dialog that looks at the Windows font folder.

You can also type in a font file name. The name has to be the exactly the same as the file in the Windows font folder.

Some fonts don't work with the FreeType library and not all styles, such as bold or italic are available for all the fonts. Also strikethough and underline are not supported. But there are still plenty to use.

It remains as a 32bit Windows plugin but converted to FFGL 1.6, so port to OSX is achievable but I will not be doing that. 64bit depends on the Freeframe SDK and I have found some bugs with text input so I can't do that either.

https://drive.google.com/folderview?id= ... sp=sharing

Cheers to all..
damstraversaz
Posts: 176
Joined: Tue Aug 26, 2014 11:22 am

Re: Adding Text to Visuals?

Post by damstraversaz »

that's realy great , thanks a lot for sharing this !
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Adding Text to Visuals?

Post by Magic »

Yes thanks very much! Unfortunately I am on the road with only my Mac but I will give it a try as soon as I get home.
Post Reply