Jump to content

[WIP] 1.12.x - Fengist's Font Factory - UPDATED!


Fengist

Recommended Posts

Fengist's Font Factory - A work in progress!!!

Download

 

What is this? - FFF is a collection of 'parts.'  Each part is a 3D model of a number or letter.  With these parts, you can surface attach them to anything that allows surface attachments and spell out whatever you like.  These letters are:

1. Resizable - No TweakScale needed.  Can be resize from 0.25 to 20x size.
2. Texturable - Includes 5 sample textures.  Create your own custom colors and textures by creating a 512x512 image (more on this in a later post).

These parts are intentionally very low poly count and there's only 5 textures to cover all the fonts.  With the plugins, the resources they take should be minimal. 

In this alpha release, consider them paint.  They have 0 mass and (hopefully) 0 drag.  Right click the letters to bring up resizing and texturing in the part GUI.

Enjoy!

Thanks to a user of one of my mods, @Chimichanga, who kindly posted a bug report that helped me track down an annoying flaw in my coding, I had a moment of inspiration.  This is the result:
 

UKVwX8F.png vBIhBRG.png
l0xvxIU.png c0z4jVS.png
KmvbUiE.png

ofzcbyV.png

rpM2E7B.png

 

Thanks to @Beale and his modding tutorial  He's responsible for this.
And thanks to all the fans of Maritime Pack! I hope you enjoy this one as well.

____________________________________________________________________________________________

License:  Modified CC Attribution-NonCommercial-NoDerivs.
Code Source - MPUtils - Fengist Anim - FSResizer - FFFonts

Edited by Fengist
Link to comment
Share on other sites

37 minutes ago, JH4C said:

I saw your reply to @Chimichanga, and was hopeful, but damn you turned that around fast! I think this is a brilliant idea, and a much more satisfying way to label space stations than custom flags.

Guess I'll go make a space station to try them out!

TLDR: Glad you like it.  It was actually a bit easier that I had once imagined but more tedious than I had hoped.

Some while back I created the code to display the fonts on KE's idiot lights.  I had ideas of making a stick-on panel where you could change the fonts and place it where you wanted.  Last I heard, because Squad uses the pro version of TextMesh, importing new fonts just wouldn't happen.  I just never got around to playing with it after that.  Yesterday when Chimi gave that bug report he had a link to an image of how he used the slime lights.  I thought it was a pretty clever. That pretty much told me, that there would at least be a few people who'd want to put fonts on things.  I have on rare occasions played another space game and one of the mods an admin introduced me to was a collection of 3D letters that you could stick on the sides of your ships.   So, I first looked at what 3D fonts already existed. I decided wasn't gonna pay to download a 3D font collection and none of the free ones looked that good.  I then dug into my 3D modeler a bit more and noticed something I hadn't really played with before.  It can take any font and convert it to 3D text.  Bingo!  That's the screenshot I posted last nite in the other thread when it all came together.  Today, it was just a matter of entering letters into the modeler one at a time, creating a pretty simple unwrap, exporting them to Unity and creating the parts (30+ of them).  The next task was creating all those .cfg. The code for the resizer is some that @allista (yes, I'm using your code again :D) has given me permission to use that I've been playing with in creating my airships. The texture swap is a modified version of the firespitter texture swap that I had already incorporated into Maritime Pack to get away from a dependency.  The only other code I'll need for this if I expand is some to place a category icon, and I already have that too.   So, there really was no code to write for the plugins. It was more or less tedious and repetitive modelling and .cfg making.  I definitely don't want to do a lot of these tough.  Lots and lots of repetitive mouse clicking.

Depending on how well this is received, I may do 2 more with upper and lower case.  Probably a serif like Times and a sanserif like Arial. 

But, we'll see how people like it first.

2lC88p2.png

 

 

Link to comment
Share on other sites

1 hour ago, Mecripp said:

@Fengist how goes the blimp plugin work  ?

Still progressing.  But, it's already a couple thousand lines of code so making sure it all works as intended is a slow progress.  Right now I'm beginning to test larger airships and finding they don't quite turn the way I want them to.  KSP has this thing where if you're going a specific direction, it expects you to KEEP going that direction.  But, I did have a friend let me watch while he played with it.  After blowing up a few envelopes, he got the hang of it and got a smaller, 3 balloon airship to the island runway.  He popped envelopes trying to stay on the ground, but he made it ;).

But, this mod is something I did want for the airships as well as MP. I mean, who want's to fly an airship without the name on the side of it???

Edited by Fengist
Link to comment
Share on other sites

So, this is an amusing one.  One thing I didn't test was what happens if you leave these fonts attached to something over time.  Here's some screenshots of what happens after, oh 30 minutes or so.

bTt3zf3.png

5gZsFxQ.png

hLOvxbO.png

 

So, as you can see it gets a bit ummm messy.  From what I'm learning this has to do with the fact that I tried to be slick and assign the parts 0 mass.  It would seem the KSP physics engine doesn't exactly appreciate trying to apply theoretical physics to a Kerbal environment.

What I'm apparently going to have to do is to assign some mass to these parts.  In the testing I'm working on the size 7 letters above will weigh in at around 15 kilos.  But I'm also experimenting with removing them from the physics engine (for you Unity coders I'm testing setting the rigidbody.isKinematic to true).  So far, the results look much better than the images above and I should have something out the door later today.  As for the parts you have now with letters on them... I make no promises.

Link to comment
Share on other sites

You're a hardworker sir. I took a little different approach for my decal placer. The only hard dependency is Firespitter, I use it for mesh switching and I use stock texture switcher in my model. Added freeform TweakScale as well.

https://gfycat.com/gifs/detail/PleasingFastCorydorascatfish

To remove the part from atmospheric physics calculations the DRAG_CUBE attribute is set to "none" and PhysicsSignificance to zero:

    PhysicsSignificance = 0

    DRAG_CUBE
    {
        none = True
    }

And I also removed the collider in flight with a help of one plugin, which the KIS/KAS maintainer has written for me.

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

A mass of 0.001 seems to work for other mods.

Yep, I got it less than that but the problem is, the scaling plugin expects a mass too and will increase the mass depending on how large you make it. Either way, they have some mass now but they're kinematic so hopefully won't interfere with normal flight.

Alpha 2 now available for download!
Check the download link in the OP

Change Notes for Alpha 2:

Fonts now have a tiny mass to keep them from wiggling.  But, this mass scales with the size.
Fonts are now kinematic. Hopefully meaning they won't be taken into account by the physics engine.  They can have colliders though and can still break off.  Don't use them for battering rams.

Enjoy.

Link to comment
Share on other sites

2 hours ago, Enceos said:

You're a hardworker sir. I took a little different approach for my decal placer. The only hard dependency is Firespitter, I use it for mesh switching and I use stock texture switcher in my model. Added freeform TweakScale as well.

https://gfycat.com/gifs/detail/PleasingFastCorydorascatfish

To remove the part from atmospheric physics calculations the DRAG_CUBE attribute is set to "none" and PhysicsSignificance to zero:

    PhysicsSignificance = 0

    DRAG_CUBE
    {
        none = True
    }

And I also removed the collider in flight with a help of one plugin, which the KIS/KAS maintainer has written for me.

Yea, I gotta add that drag cube next.  Thanks for the tip.  Again, a problem is that the scaling plugin I'm using expects to find a drag cube.  And I've already had to play with that to get my other parts working.  But I can figure out a way around it I suppose.   At least for now the letters should stay where they're placed.

As for Firespitter, yea I was majorly dependent upon it like a lot of other mods.   And, having a close friend who knows snjo and games with him, I'm well aware that he has no intent of coming back to modding. While the devs are doing a good job of keeping it up, it's kinda in maintenance mode.  I seriously doubt they'll have the time to do any upgrades.  Fortunately, snjo's license is very permissible and I didn't need the entire plugin.  So I snipped out what few parts I needed (fuel and texture switch) and wrote my own for the prop spinner and engine sounds which I now use for a bunch of things.  The scaling is from allista's (I won't bother him with another @) anisotropic part resizer.  It's not as robust as TweakScale and I'm finding I'm having to add in bits (like changing the ctrlSurfaceArea when a rudder gets scaled).  But it has 2 redeeming qualities. 1 - an MIT license which means I can use and change it as I need. Plus allista is a great guy who I've spoken to and gladly gave permission to use it freely and 2. All of my mods now have ZERO dependencies. I hated when my mods didn't work because another modder had a RL intervention and wasn't able to update theirs.  The downside, if my mods screw up, I have no one else to blame :{.

*edit*

Oooh, removing the collider!  Since I'm getting the rigidbody to make them kinematic, that's a 2 liner!   if (HighLogic.LoadedSceneisFlight) rb.detectCollisions = false;

Thanks!!!

Edited by Fengist
Link to comment
Share on other sites

I love Allista's anisotropic resizer. It was a hardcoded part of his Hangar mod at first, I was really glad when agreed to separate it into a standalone plugin for modders. What I like the most is the ability to scale a part in different directions independently. Here's one of the parts I made with it:

https://gfycat.com/gifs/detail/IncompatibleCompleteConey

Link to comment
Share on other sites

6 minutes ago, Enceos said:

I love Allista's anisotropic resizer. It was a hardcoded part of his Hangar mod at first, I was really glad when agreed to separate it into a standalone plugin for modders. What I like the most is the ability to scale a part in different directions independently. Here's one of the parts I made with it:

https://gfycat.com/gifs/detail/IncompatibleCompleteConey

Looks great.  But here's a problem I stumbled into with it.  If you have a mirrored part with APR on it and try to attach another mirrored part with APR on it, it makes that part hop around and difficult to attach.  It keeps trying to create the mirrored part, then change the drag cube. When it changes the drag cube, it kills the mirrored part, which then, recreates itself because your'e trying to attach it.  He's aware of this minor bug so he's probably working on or has already fixed it.

Link to comment
Share on other sites

On 9/23/2018 at 6:00 PM, HansonKerman said:

Yahoo! I love this!

:D

Glad you like it. Since this is a pretty simple mod that's easy to create, one of the things I was thinking of doing is creating a tutorial on how to make your own letters from any .ttf font built into Windows.  Any interest in such?

Link to comment
Share on other sites

6 hours ago, JH4C said:

Flood of incoming interest in 3, 2, 1...

Actually, not so much.  While it's still amusing to have Kottabos review your mod, I think there's been one download since.  While I like Kott's stage personality and his reviews can be entertaining, he has a tendency to find something wrong with a mod when it's usually a result of something else entirely.  Like he claimed the fonts get buried inside parts when they're scaled down. Well... yea, they do.  If you use a Squad part that has a collision mesh that doesn't match the size of the actual part , small flat fonts and anything else that barely sticks above the surface is going to get buried because they stick to the collision mesh.  The connection node for the fonts are in the dead center so that half should be inside the collision mesh and half outside.  In his example, they definitely weren't.  Ah well.  You'd think he'd have recognized that after reviewing so many mods.  Then again, he reviewed a mod for lights once and blamed the mod for being faulty. In reality, he didn't even consider the fact that the lights used electric charge.  He kept running his rover out of battery and the lights would shut off.  Again, amusing guy but a bit of a head-scratcher at times.

Thanks for letting me know about the review.  I'll be interested to see if the downloads increase over the weekend.

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

Updated for 1.12.x

Sorry there's only one font for these but this was more or less and experiment to see if it could be done.  Gonna keep focusing on my larger mods. May get back around to this one one day.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...