Categories
Computer Games Graphics Minecraft

Shaders in MultiMC Minecraft

Gathering all of the resources of the Internet, I finally pinned down the technique to install an Optifine shader in an instance of Minecraft from the MultiMC launcher. Specifically since I started playing again in a major way from v1.14.4, installing mods is not as simple as it used to be, and Optifine is no exception, especially when it comes to a third-party launcher like MultiMC.

Requirements:

Process:

In the vanilla launcher create an “installation” of the Minecraft version for which you are running the shader. In my case this is 1.14.4.

Run the new installation to download that version of Minecraft from minecraft.net, then exit.

If it hasn’t already downloaded minecraft.jar for this version, it will do so, and then launch the game.

Quit this instance of Minecraft.

Having the Optifine jar downloaded (in this case, it would be named OptiFine_1.14.4_HD_U_F5.jar), run it directly by either double clicking it or invoking it from a command line.

If you were to continue using the vanilla launcher, you could click the Install button. However we’re using MultiMC, so we want to Extract, which will give us the actual drop-in mod jar that we can load into MultiMC.

At this point, we now have two files for Optifine: the original installer and the new “OptiFine_1.14.4_HD_U_F5_MOD.jar”.

Open MultiMC and create a new instance, picking the same Minecraft version as before.

Once created click the “Edit Instance” button and move to the Version tab from the left.


Click the “Install Fabric” button on the right and choose the latest version it will allow. Fabric Loader will be added to the list of versions for this instance.

At this point, move to the Loader Mods tab in the instance window. Click the Add button and locate your Optifabric jar as well as the OptiFine_*_MOD.jar extracted from the previous step. These two mods should now be visible in the Loader Mods list.

Click the Launch button at the bottom. At this point if you had your file explorer open to this MultiMC instance, you would notice as Optifine is being loaded for the first time a few folders are being created and the console giving you a nice, verbose output.

After a point, Minecraft will launch as expected, though it will now include Fabric with the version and display the OptiFine mod to indicate that it was loaded successfully.

At this point, all of the Optifine options are available in Options/Video Settings both from the start screen and from in-game.

Assuming you are running a version of Optifine that supports shaders (in preview versions this may be grayed out to indicate that support for Shaders has not yet been implemented and tested to a level that sp614x has re-enabled it), click the Shaders button.

Initially only two selections are available: OFF and (internal).

The internal shader does offer a few more options by ungreying all of the buttons on the right-hand side of the shader selection window, but leaving all of those options on default displays a fairly typical Minecraft render.

To load the new shader (in this case Sonic Ether), you do not need to exit Minecraft!! Download the shader pack from the website, saving the entire ZIP file into some location.

Restore the MultiMC launcher window. If the Instance editor is also open, switch to the Version tab and click the “Open .minecraft” button at the bottom right.

Navigate into the “shaderpacks” folder from .minecraft and copy-paste SEUS-Renewed-v1.0.1.zip in.

Switch back to Minecraft. SEUS-Renewed-v1.0.1.zip should have appeared in the Shaders selection window. Again, Minecraft does not need to be restarted manually. The entry in this window will simply appear as soon as Optifine has detected the presence of the file in the shaderpacks directory.

Click on it the new entry and watch as Minecraft performs a soft reload of the window. The Shader Options button will now be ungreyed, and a few different settings can be tweaked from here, but at this point, SEUS should be running from your MultiMC instance when the world is loaded!

For example, the Lighting & Shadows/Shadow Resolution=4096 improve the overall sharpness of the shadows cast.

Shadow Resolution = 1024
Shadow Resolution = 2048
Shadow Resolution = 4096

Left clicking these options will increase their value, while right clicking will decrease them. Additionally, the hover tooltips display what they are, though many are advanced and should probably be researched and experimented with before tweaking dramatically in one direction or the other.

Anyway, this is my first time using this, and I’m definitely looking forward to playing around with it!!

Resources

Categories
Computer Games Minecraft

Minecraft

History

It’s interesting that I purchased my old Alienware M14x R2 just to play Minecraft.

Years ago, a friend I knew on Achaea said that they really enjoyed Minecraft, and that I should try it out. Well, I totally did, and totally regretted it. That’s because at that time, all I had was my Dell B120 from college, and for no strange reason, the game would not run at all, or if it did, the lag was so severe that I waited for 20 minutes for the FPS to progress for one frame. So instead of the minimum desired FPS of something like 60 FPS, I was getting something more like 1200 SPF — great sunblock, terrible game experience.

A few years later, in 2013, another friend from another MUD recommended I try it out. He’d been playing for a long time before I started, and knew quite a bit, and I gave him a rundown of my experience. I also told him I was still super interested in this, and that we’d just bought my mom a new laptop, and that it would maybe be able to handle it. I gave the demo a shot on her machine, which required quite a big Java update, and pretty soon was running successfully (albeit with still-pretty-severe lag) Minecraft 1.4.7!

It got me hooked immediately. I played a good, solid week in the evenings, installing a few optimization plugins installed (namely Optifine) and managing to get it running semi-decently on my B120. However, the lag was such that after a while, I found no progress being made due to resets and deaths and all sorts of other things. Not the ideal learning environment to say the least.

So after a few months of saving up, I bought the Alienware, and did not regret the decision. After that we had a single player shared out to a port and were going multiplayer. Hooray!

Today, NoDumbQuestions!

Fast-forward to now. A podcast of which I’m a huge fan, called NoDumbQuestions, has a moderator on Reddit who goes by mvoviri. Quite a while ago he started a Discord server for some of the fans, and I jumped in on the ground floor which, in typical Discord fashion, means that I haven’t felt like the newcomer, and have stuck around. A couple months in, he asked, “Hey, would anybody be interested in playing Minecraft?” and I was quick to respond, having set Minecraft aside every since about 1.7.4.

A few weeks later, there was the announcement, and he and another guy were quick to set up a spawn area, and I jumped in, and immediately remembered why I shouldn’t have stopped playing when I started galavanting about and died immediately, lost the starter equipment, tried again from scratch, lost everything again, and couldn’t even stay alive long enough to get a chest made.

It was a couple of weeks after that that I gave it one more go, and stuck with it. And in the past few months, I’ve done way more progress here than I have in any other server or single-player world! Well, besides my own server that I run from work, and play almost exclusively in Creative Mode on.

NDQ Minecraft Base

I’ve picked a cliff-top Taiga Mountain (half snow) area on which to build my main area. This was chosen specifically due to the dark overhand just from appearance alone. At the base of this cliff is a fairly wide Sunflower Plain with a few rises where I decided to place the livestock, since a mountain-top doesn’t offer many flat areas unless I were spending the time to get good tools, which I don’t usually.

Started with a small-ish house right on the cliff edge, and dug in to create the mine. Found a few natural caverns, and popped out on the back side of the mountain into a deep canyon where I built a small run of weird wooden letters “ATWHA” at semi-regular intervals. All with iron tools, because I haven’t played Survival in 5 years and even then never learned a THING about enchanting.

Hermitcraft

At this point, I started watching MumboJumbo in Hermitcraft Season 6. And oh my gosh, if you make it your profession to play this game, can you do some really cool stuff! I had no idea that half of the things these people were doing were even possible. Elytra? What in the world is THAT? I mean, I’d heard of it, but never even tried it in Creative.

Also watched Grian in the same series, and was super impressed. My goodness, two points of view make quite an interesting source of inspiration. Needless to say, I’ve got to expand this clifftop house into more than just a building underneath which lies a boring strip mine.

In this time, watching both of those Youtuber players through the entire season to date (11/2019), I’ve started a real strip mine with two block spacing, a series of nether portals that lead to an underwater stronghold (you can’t just build an end portal? I thought you could…) and an island not far away from it where I’ve made a remote base with good ocean proximity, and found one other player on the server selling fully enchanted elytra for 1 gold block.

After watching numerous Hermitcraft episodes, I now have so many ideas rattling around in my head.

Current Activities

I’ve made a huge amount of progress in the NDQ server, touching on pretty much everything that I can think of that I never saw before (enchantments, potions, elytra, mapping, ocean monument near the stronghold, economy with other players, automated redstone farming, and the nuances of mob spawning and contemplating why the creeper “farm” I built won’t spawn creepers at all!

Yesterday I tried mapping out the map blocks in and around my area. Then learned that ClearItems for Spigot is the most annoying, most brute-force method of saving server memory that could exist. I hit the ground too hard while flying around, and died. Okay, if I run back really quick I might be able to find all that expensive armor and weapons and tools. Not behind this rock. Maybe behind thi…. <[ClearItems] Deleted 29 items to reduce lag.>

Needless, this weekend did not see much progress in terms of big, fun projects, due to having to mine up new diamonds and paper for villager trades and enchantments.

Then late last night, I made a small, but fully automated sugar cane and bamboo farm. I had another one set up on the mountain near the house, but the weirdnesses surrounding minecarts and solid blocks were faulty, plus the room I had to work was very small, so I started a new one and put it down on the flat ground in the valley. It’s not too compact, but at least it works!

This morning, while watching Iskall85 doing his thing, I remembered ConCorp‘s “logo” map item that they’d made in-game and got the idea to do the same, only with NDQ’s logo. Quick made an empty, Zoom-level 1 map, hit the “teleport me to a random place,” and found a nice, relatively flat area and marked out the corners, then pasted the map along with screenshots up in my house. Thank goodness for /home and /spawn. They’ve made life much, much easier!

Categories
Computer Electronics

Discoveries in 3D Printing Services

At work, we’ve been playing around with 3D printing services, namely the international chain or distributor known as 3DHubs. A coworker described it very accurately as “the uber of 3d printing services” where people that have access to printers apply for certification, and people who don’t place an order on 3DHubs which then distributes the workload among the certified people with the equipment. Kinda cool, but there are weirdnesses.

Specifically, of the five separate designs I’ve placed in the past two years, about half of those have been good, solid parts, and the other half have cracked and broken with varying degrees of damage and recovery methods.

I figure this can be my own reference on “what I consider a functional print method and functional material for something more than a mechanical prototype.

The three print methods we’ve used so far are probably the three most common: FDM, SLA and SLS.

FDM – Hot Glue Gun

Melt a plastic filament in layers over a baseplate and build the model up layer by layer.

SLA – Liquid and Lasers

Built from the top down, from what I understand a UV laser …basically cauterizes a liquid resin at certain points on the liquid surface. The vat sinks and the solid model emerges layer by layer, stuck to the underside of the baseplate.

SLS – Laser-Blasting Powdered Plastic

From what I’ve read, a UV laser fires into a bed of powderized plastic, melts and resolidifies its surface in very small places and the solid emerges layer by layer


I’ve created orders with 3DHubs for 4 different combinations of methods and materials:

  • Duraform PA – SLS
  • HP 3D High Reusability PA 12 – SLS
  • ABS-Like Tough Resin – SLA/DLP
  • ABS – FDM

The Duraform PA nylon part that I had made was VERY thin-walled. It built up nicely but due to a <0.7mm wall, it cracked with very little strain. A second part that formed around this was super solid, though. So as long as my wall thickness was > 1.0 mm, I had no problems with it.

Duraform PA Nylon
Duraform PA Nylon with SLS Process

That and a few design changes required that I reprint a revision of the first part with PA 12 nylon with a minimum of 1mm wall thickness. This was VERY good quality in comparison with the first revision. Like the Duraform, it was structurally sound, and as I maintained a minimum wall thickness, I had no problem with it. The only oddity that I didn’t like about it was its grainy texture and unrefined feel. But it does mill nicely afterwards.

PA12 Nylon with SLS Process

A year has elapsed, and in the past two weeks I’ve been ordering new parts for a new project. Not remembering what we used before, I started the choice from scratch. That and 3DHubs overhauled their entire interface, anonymizing the vendor experience, and making it a LOT easier to pick and choose materials along with automatic costing and such. As such, the first material we ordered was “ABS-Like Tough Resin”. I didn’t know what SLA meant at the time (with its liquid factor and all), but now it makes sense and really acts nicely, save for the springy feel and tendency to peel and wrinkle with any lateral pressure such as scraping it with a penknife.

ABS-Like Tough Resin with SLA Process

The final method we’ve been using (and having the least amount of success with) is straight ABS using the FDM process. The layers here are clearly evident, and even their structural stability is super easy to balk at, as any little pressure in a weak spot “delaminates” the part. Plus the finish is messy and not ideal to work with. But we figure we can still make the parts we have work without needing to re-order them in a different process and material

ABS with FDM Process

Now I HAVE been toying around with the idea of getting a printer for the shop (or more for myself with a loan policy).

From what I see, though, FDM printers run anywhere from $200 to ..reasonably expensive, and are dependent mostly on cubic volume you have to make a part. Filament is about $20 a kg. Between price, volume and ratings, I have my eye on the Creality Ender 3 Pro (approximately 8 cubic inch volume) for $260.

SLS printers are the MOST expensive of these three. A number of factory-direct models are well over $10k. Based on price and technology, I’m GUESSING this is the laserjet of 3d printers. And Amazon’s selection of jars of “Sinterit Powder” is quite pricey too. I’m not even considering this as a viable purchase for personal use.

SLA printers seem to be in the middle, price-wise, with the smallest at $150 (4.75″ x 2.5″ x 5.5″), a good median of $500 or so, and bigger models no less than $1000. Like FDM, SLA resin is around $40-$50 a kg bottle. From what I see on Amazon, my best bet, knowing that the above dimensions is going to be an ANYCUBIC Photon or ELEGOO Mars (each giving me the above working volume) for $400-$429.

All this to say: I have no idea what I’m doing here. I’m really displeased with the FDM process. Seeing how these parts turned out has really discouraged me from buying even a cheap Monoprice, despite the reviews on Amazon. However, the prospect of making something like this work is very attractive, and if I can save up for something that would give me a better quality part, whether it’s a toy or a D&D figurine model bought on HeroForge, or whatever, I would totally do it. But it’ll DEFINITELY be one of those things I research the heck out of before I hit “buy now.”

Categories
Computer Programming Web

Manual letsEncrypt for CPanel

Jump to Renewal Instructions

At work I recently collaborated with our hosting provider to move our company website to a version of cPanel. Up until this time, there has been no way of running our site on SSL/TLS, and it’s been quite frustrating, having discovered LetsEncrypt and its ease of use. Basically, with this certificate signer, I have no reason to actually figure out the handshaking and signing process as was required in old command-line versions of SSL.

Well, our hosting provider’s version of cPanel has not really been expanded to allow for LetsEncrypt, even though multiple people on the cPanel forums say there’s a plugin available. Seems they don’t mind forcing me to pay another fee on top of everything to get an annual signature from the two default signers they had enabled in the system.

This made me wonder, and think, well CertBot, which generates the certificates and private keys and runs the signing requests automatically, always talked about this “cert only” option, and here on their website, I see instructions for a “manual” option as well. I thought this may have been exactly what I was looking for, since my scenario is – I have a website on a host who does not have LetsEncrypt enabled, but does allow me to upload certificates and keys from an offline source.

Here is my process of installing a LetsEncrypt SSL/TLS DV certificate on a cPanel site not equipped to generate one automatically.

Create a new certificate with any subdomains we’d need using certbot certonly -d c-pwr.com,www.c-pwr.com –manual

Certbot warns you that the computer’s IP you’re generating the certificate on will be shared with them, even though it’s not the server on which the cert will be installed on in the end. Type Y.

Without any “challenges” option in the original command, certbot assumes you’re using the acme challenge which involves uploading a text file to your site. Using cPanel’s file manager I simply do this.

Once the first file in acme-challenges is created, certbot asks us to create another file in the same place with a different string as its contents.

Once both files are created and saved to this location, we probably should verify that the URLs certbot is pointing to are actually visible from the public web.

Knowing that I can access the challenge files from my browser, I assume certbot will also be able to access them, presumably from a curl command or something, so I let it continue.

If we get the standard certbot success message, we now see that it’s created our certificate, chain and private key files in certbot’s standard location (I’m using the PPA repository through aptitude, so certbot automatically installs the latest versions of my certificates to /etc/letsencrypt/live/c-pwr.com/ , which are actually symbolic links to /etc/letsencrypt/archive/c-pwr.com/ , as every time we renew, it will archive the old files and create new ones.

I now can copy the contents of both /etc/letsencrypt/live/c-pwr.com/cert.pem  and /etc/letsencrypt/live/c-pwr.com/privkey.pem up to cPanel in their SSL interface.

After this, I head over to the Manage SSL Sites tool and install this certificate as-is. It automatically detects the domains I specified in the original certbot command and applies the certificate to them.

Renewal

At this point, I have no idea how the renew will work. Since LetsEncrypt issues certificate signatures for only 3 months, this will become an issue sometime in August. I HOPE the acme-challenges will remain the same, but if they don’t, it should be a simple task to recreate the files as above, then copy the files in manually, assuming certificates and private keys can be edited once created in cPanel.

Renewing is super simple, but with this method must be run differently from an automated certbot renew.

  1. Run certbot certonly -d c-pwr.com,www.c-pwr.com --manual again.
  2. I am asked to create new acme challenges on the webserver which I did.
  3. Since the cert already existed in the /etc/letsencrypt/live, it detected this as a renew, and did not prompt me to upload certificates a second time!!
  4. I logged into cPanel and created two text docs in the File Manager as instructed, hit enter in my local server command line and it did everything from there.
  5. 2018-08-01: I forgot that I also need to update and re-copy cert.pem and privkey.pem to CPanel SSL/TLS Status in order for it to actually update, as cPanel just emailed and said my cert was expiring in ten days.
    • cPanel > SSL/TLS > Install and Manage (Manage SSL Sites)
    • Scroll down and select the old domain in the dropdown.
    • sudo cat /etc/letsencrypt/live/c-pwr.com/cert.pem
    • sudo cat /etc/letsencrypt/live/c-pwr.com/privkey.pem
    • Copy the certificate and private key text to the crt and key fields in cPanel.
    • Click Install Certificate.

Additionally, I needed to manually set up my .htaccess file to redirect any http requests to the https version. This is usually done automatically by certbot during an automatic installation, and is embedded in the /etc/apache2/sites-available/000-default.conf file, but since I don’t have access to this, .htaccess will have to do.

Categories
Church Computer Video

DMX for actual Electrical Engineers

So it’s been coming up recently that our church media department has been buying “OpenDMX USB Dongles” for upwards of $80. I was mortified, especially after seeing this USB device, opening up the sheet metal project box and finding it to be a simple 2-stage USB to RS-485 protocol bridge with no programmable intelligence whatsoever.

Categories
Computer Programming Web

A Fun Adventure in PGP

So I got curious about PGP keys and signing and encrypting using them. I managed to figure out how to use the semi-popular gpg4win (the standard windows port of GnuPG) with its built in Kleopatra GUI, Outlook add-ins and all the other fun stuff.

Categories
Computer

USB Fast Chargers

I’ve been a bit confused lately at what constitutes fast charging versus normal charging, and why newer Android devices complain repeatedly if you use the wrong cable, or the wrong charger, or the wrong cable AND charger. How does it know?

Then I found an article on LifeHacker that partially explains it, but this comment thread clarified in an excellent manner: http://lifehacker.com/theres-a-bunch-of-misunderstanding-around-charging-via-1532885435

Categories
Computer Programming

LetsEncrypt List of Useful Commands

Here are a few letsencrypt commands that I’ve found useful in the past few months of trying it out.

Categories
Computer Programming

Typecasting struct to char* for Idiots Like Me

Want to cast from a struct to a character string? Seen all those posts out there suggesting that reinterpret_cast will work, but is unsafe? Yeah, I tried it. Yeah, it’s unsafe.

Categories
Computer Programming

Embarcadero TThread Works Just Fine

I’ve been annoyed for a large amount of time (years in fact) over some of our software we use and sell. In essence, what we have is a TCP GUI that communicates on a 250ms timer with a microcontroller that’s serving up a two-way communications protocol over ModBus FC23 – we send commands either to write data to or read data from the unit.