Posted on Leave a comment

Using Fedora 33 with Microsoft’s WSL2

If you’re like me, you may find yourself running Windows for a variety of reasons from work to gaming. Sure you could run Fedora in a virtual machine or as a container, but those don’t blend into a common windows experience as easily as the Windows Subsystem for Linux (WSL). Using Fedora via WSL will let you blend the two environments together for a fantastic development environment.

Prerequisites

There are a few basics you’ll need in order to make this all work. You should be running Windows 10, and have WSL2 installed already. If not, check out the Microsoft documentation for instructions, and come back here when you’re finished. Microsoft recommends setting wsl2 as the distro default for simplicity. This guide assumes you’ve done that.

Next, you’re going to need some means of unpacking xz compressed files. You can do this with another WSL-based distribution, or use 7zip.

Download a Fedora 33 rootfs

Since Fedora doesn’t ship an actual rootfs archive, we’re going to abuse the one used to generate the container image for dockerhub. You will want to download the tar.xz file from the fedora-cloud GitHub repository. Once you have the tar.xz, uncompress it, but don’t unpack it. You want to end up with something like fedora-33-datestamp.tar. Once you have that, you’re ready to build the image.

Composing the WSL Fedora build

I prefer to use c:\distros, but you can choose nearly whatever location you want. Whatever you choose, make sure the top level path exists before you import the build. Now open a cmd or powershell prompt, because it’s time to import:

 
wsl.exe --import Fedora-33 c:\distros\Fedora-33 $HOME\Downloads\fedora-33.tar

You will see Fedora-33 show up in wsl’s list

 
PS C:\Users\jperrin> wsl.exe -l -v
  NAME                   STATE           VERSION
  Fedora-33                 Stopped         2

From here, you can start to play around with Fedora in wsl, but we have a few things we need to do to make it actually useful as a wsl distro.

 
wsl -d Fedora-33

This will launch Fedora’s wsl instance as the root user. From here, you’re going to install a few core packages and set a new default user. You’re also going to need to configure sudo, otherwise you won’t be able to easily elevate privileges if you need to install something else later.

 
dnf update
dnf install wget curl sudo ncurses dnf-plugins-core dnf-utils passwd findutils

wslutilites uses curl and wget for things like VS Code integration, so they’re useful to have around. Since you need to use a Copr repo for this, you want the added dnf functionality.

Add your user

Now it’s time to add your user, and set it as the default.

 
useradd -G wheel yourusername
passwd yourusername

Now that you’ve created your username and added a password, make sure they work. Exit the wsl instance, and launch it again, this time specifying the username. You’re also going to test sudo, and check your uid.

 
wsl -d Fedora-33 -u yourusername
$id -u
1000
$ sudo cat /etc/shadow

Assuming everything worked fine, you’re now ready to set the default user for your Fedora setup in Windows. To do this, exit the wsl instance and get back into Powershell. This Powershell one-liner configures your user properly:

 
Get-ItemProperty Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\*\ DistributionName | Where-Object -Property DistributionName -eq Fedora-33  | Set-ItemProperty -Name DefaultUid -Value 1000

Now you should be able to launch WSL again without specifying a user, and be yourself instead of root.

Customize!

From here, you’re done getting the basic Fedora 33 setup running in wsl, but it doesn’t have the Windows integration piece yet. If this is something you want, there’s a Copr repo to enable. If you choose to add this piece, you’ll be able to run Windows apps directly from inside your shell, as well as integrate your Linux environment easily with VS Code. Note that Copr is not officially supported by Fedora infrastructure. Use packages at your own risk

 
dnf copr enable trustywolf/wslu

Now you can go configure your terminal, setup a Python development environment, or however else you want to use Fedora 33. Enjoy!

Posted on Leave a comment

Creature 3D Animation Software Now In Alpha

Kestrel Moon software, creators of the Creature 2D animation software have just released the very first 0.1 alpha of Creature3D. Creature 3D is a stand-alone 3D animation application, currently available for Windows 64 machines for free, for rigging and animating characters using procedural animation.

Features of Creature 3D:

Procedural Animation at your fingertips

Walk Cycles, Tail Animation, Ropes, Skin Sliding and Dynamic Flesh/Breathing Motion are a breeze with Creature3D’s state of the art Procedural Motor System. Take full manual control by tweaking both keyframes and animation splines.

Fast, Easy setup of Characters

Easily rig your Characters via Auto or Manual Rigging Modes. Add bones, then pick between Auto Weight or Manual brush painting for your Skin Weights.

Export your Animations to the World

Export your animation as industry supported mainstream FBX or GLTF assets which can then be imported into Game Engines like UE4 or Unity.

You can learn more about and download Creature here. If you want to get started with Creature 3D there are a few sample projects now available here. You can learn more about Creature 3D and see it in action in the video below.

[youtube https://www.youtube.com/watch?v=tqO37ZlDqiw?feature=oembed&w=1500&h=844]
Posted on Leave a comment

NVIDIA Release RTX Branch of Unreal Engine 4.25.4

The NVIDIA game development team just announced the release of the RTX GPU optimized branch of Unreal Engine. The 4.25.4 branch of Unreal Engine is the most current as of time of writing. The NVIDIA RTX branch is all about bringing RTX hardware optimized raytracing performance to UE4.

Details of the release:

  • Stability improvements
  • Hitching improvements due to async shader management
  • Transmissivity of light through foliage
  • Several generic SW overhead reductions for RT setup
  • Better culling default for instanced static meshes (foliage)
  • Minor fixes for light culling in reflections
  • Substantial improvements in GI and path tracing performance with high light counts
  • Unreal Engine 4.25.4 Update

There is also a experimental caustics branch with the following features:

  • The new hybrid translucency mode
  • Multi-bounce refraction optimization
  • Based on the latest NVIDIA RTX Branch
  • Mesh and Water caustics feature

More details of NVIDIA Unreal Engine support are available here. In order to access the RTX branches available on GitHub you have to first link your GitHub account to your Unreal Engine account with details available here.

Posted on Leave a comment

Getting started with Stratis encryption

Stratis is described on its official website as an “easy to use local storage management for Linux.” See this short video for a quick demonstration of the basics. The video was recorded on a Red Hat Enterprise Linux 8 system. The concepts shown in the video also apply to Stratis in Fedora.

Stratis version 2.1 introduces support for encryption. Continue reading to learn how to get started with encryption in Stratis.

Prerequisites

Encryption requires Stratis version 2.1 or greater. The examples in this post use a pre-release of Fedora 33. Stratis 2.1 will be available in the final release of Fedora 33.

You’ll also need at least one available block device to create an encrypted pool. The examples shown below were done on a KVM virtual machine with a 5 GB virtual disk drive (/dev/vdb).

Create a key in the kernel keyring

The Linux kernel keyring is used to store the encryption key. For more information on the kernel keyring, refer to the keyrings manual page (man keyrings).  

Use the stratis key set command to set up the key within the kernel keyring.  You must specify where the key should be read from. To read the key from standard input, use the –capture-key option. To retrieve the key from a file, use the –keyfile-path <file> option. The last parameter is a key description. It will be used later when you create the encrypted Stratis pool.

For example, to create a key with the description pool1key, and to read the key from standard input, you would enter:

# stratis key set --capture-key pool1key
Enter desired key data followed by the return key:

The command prompts us to type the key data / passphrase, and the key is then created within the kernel keyring.  

To verify that the key was created, run stratis key list:

# stratis key list
Key Description
pool1key

This verifies that the pool1key was created. Note that these keys are not persistent. If the host is rebooted, the key will need to be provided again before the encrypted Stratis pool can be accessed (this process is covered later).

If you have multiple encrypted pools, they can have a separate keys, or they can share the same key.

The keys can also be viewed using the following keyctl commands:

# keyctl get_persistent @s
318044983
# keyctl show
Session Keyring
 701701270 --alswrv      0     0  keyring: _ses
 649111286 --alswrv      0 65534   \_ keyring: _uid.0
 318044983 ---lswrv      0 65534   \_ keyring: _persistent.0
1051260141 --alswrv      0     0       \_ user: stratis-1-key-pool1key

Create the encrypted Stratis pool

Now that a key has been created for Stratis, the next step is to create the encrypted Stratis pool. Encrypting a pool can only be done at pool creation. It isn’t currently possible to encrypt an existing pool.

Use the stratis pool create command to create a pool. Add –key-desc and the key description that you provided in the previous step (pool1key). This will signal to Stratis that the pool should be encrypted using the provided key. The below example creates the Stratis pool on /dev/vdb, and names it pool1. Be sure to specify an empty/available device on your system.

# stratis pool create --key-desc pool1key pool1 /dev/vdb

You can verify that the pool has been created with the stratis pool list command:

# stratis pool list 
Name                     Total Physical   Properties
pool1   4.98 GiB / 37.63 MiB / 4.95 GiB      ~Ca, Cr

In the sample output shown above, ~Ca indicates that caching is disabled (the tilde negates the property). Cr indicates that encryption is enabled.  Note that caching and encryption are mutually exclusive. Both features cannot be simultaneously enabled.

Next, create a filesystem. The below example, demonstrates creating a filesystem named filesystem1, mounting it at the /filesystem1 mountpoint, and creating a test file in the new filesystem:

# stratis filesystem create pool1 filesystem1
# mkdir /filesystem1
# mount /stratis/pool1/filesystem1 /filesystem1
# cd /filesystem1
# echo "this is a test file" > testfile

Access the encrypted pool after a reboot

When you reboot you’ll notice that Stratis no longer shows your encrypted pool or its block device:

# stratis pool list
Name   Total Physical   Properties
# stratis blockdev list
Pool Name   Device Node   Physical Size   Tier

To access the encrypted pool, first re-create the key with the same key description and key data / passphrase that you used previously:

# stratis key set --capture-key pool1key
Enter desired key data followed by the return key:

Next, run the stratis pool unlock command, and verify that you can now see the pool and its block device:

# stratis pool unlock
# stratis pool list
Name                      Total Physical   Properties
pool1   4.98 GiB / 583.65 MiB / 4.41 GiB      ~Ca, Cr
# stratis blockdev list
Pool Name   Device Node   Physical Size   Tier
pool1       /dev/dm-2          4.98 GiB   Data

Next, mount the filesystem and verify that you can access the test file you created previously:

# mount /stratis/pool1/filesystem1 /filesystem1/
# cat /filesystem1/testfile 
this is a test file

Use a systemd unit file to automatically unlock a Stratis pool at boot

It is possible to automatically unlock your Stratis pool at boot without manual intervention. However, a file containing the key must be available. Storing the key in a file might be a security concern in some environments.

The systemd unit file shown below provides a simple method to unlock a Stratis pool at boot and mount the filesystem. Feedback on a better/alternative methods is welcome. You can provide suggestions in the comment section at the end of this article.

Start by creating your key file with the following command. Be sure to substitute passphrase with the same key data / passphrase you entered previously.

# echo -n passphrase > /root/pool1key

Make sure that the file is only readable by root:

# chmod 400 /root/pool1key
# chown root:root /root/pool1key

Create a systemd unit file at /etc/systemd/system/stratis-filesystem1.service with the following content:

[Unit]
Description = stratis mount pool1 filesystem1 file system
After = stratisd.service [Service]
ExecStartPre=sleep 2
ExecStartPre=stratis key set --keyfile-path /root/pool1key pool1key
ExecStartPre=stratis pool unlock
ExecStartPre=sleep 3
ExecStart=mount /stratis/pool1/filesystem1 /filesystem1
RemainAfterExit=yes [Install]
WantedBy = multi-user.target

Next, enable the service so that it will run at boot:

# systemctl enable stratis-filesystem1.service

Now reboot and verify that the Stratis pool has been automatically unlocked and that its filesystem is mounted.

Summary and conclusion

In today’s environment, encryption is a must for many people and organizations. This post demonstrated how to enable encryption in Stratis 2.1.

Posted on Leave a comment

Unity MegaBundle X Racing Game Assets

There are only a few days left in Unity’s 10th Anniversary MegaBundle X that we previously discussed here. Taking a quick look through the assets in the bundle it becomes clear that there are a number of assets that would be perfect for people looking to create a racing game. Today we are going to look at the following assets from the bundle:

Edy’s Vehicle Physics

This asset contains the logic you need to control your cars, from fast drifting sports cars to city buses.

EasyRoads3D Pro

Quickly and easily create and populate road networks using a simple spline based approach, both in the editor and dynamically at run-time, with a terrain aware system.

Toon Racing

A collection of toon shader styled racing cars, rally cars and monster trucks. It also contains several props, track pieces and more for creating a full racing game with a consistent art style.

UniStorm

Add dynamic weather systems, day/night cycles, pouring rain and more to your racing game with UniStorm.

Oak Trees Pack

They’re trees. Oak trees. There are 5 of them, enough said.

The above links contain affiliate codes that pay GFS a small commission if you purchase anything (thanks so much if you do!). Of course be sure to use the Bundle Link and not individual asset links to get the savings, at least until November 12th. You can learn more and see all the above assets in action in the video below.

[youtube https://www.youtube.com/watch?v=Bw0UUdXHO0E?feature=oembed&w=1500&h=844]
Posted on Leave a comment

GIMP 2.99.2 Released

GIMP, or GNU Image Manipulation Program, just released version 2.99.2 beta, a giant step toward the upcoming 3.0 release. The heart of this update is the move to the GTK 3 UI toolkit from the existing GTK2 version. This has many advantages, especially when it comes to increasingly common HiDPI devices.

Highlights of the 2.99.2 release include:

  • GTK3 based user interface, with native support for Wayland and HiDPI displays.
  • Major refactoring and cleanup
  • New plug-in API
  • Plugins now possible with Python 3, JavaScript, Lua, and Vala
  • More (color) space invasion
  • Render caching available for better performance

Be sure to check the complete release notes for further details on this release. You can also learn more about the 2.99.2 release and see GIMP in action in the video below.

[youtube https://www.youtube.com/watch?v=IdNo-k9TtDo?feature=oembed&w=1500&h=844]
Posted on Leave a comment

LDtk The Level Designer Toolkit

LDtk, or Level Designer Toolkit, is an open source MIT licensed Haxe based 2D level editor from the creator of Dead Cells. If it looks familiar that is because we recently covered it when it was known as LEd. In just a few short months though, LDtk has come a long way, including community ports to Linux and MacOS. With the 0.5 release (the re-brand version number), tons of new features were added to LDtk including:

  • Tiles flipping: in Tile Layers, you can mirror tiles before painting them by pressing X or Y (or Z). This also works from group of tiles.
  • Tiles stacking: you can now optionaly stack multiple tiles in a single cell of a Tile layer, reducing the need for multiple layers. For example, you could paint a brick wall, then enable stack mode (T), and add details like cracks or vines over the same wall. Be careful though: erasing of stacked elements can be tricky, so you should use a mix of multiple layers and stacking to get the best results.
  • New editing options barGrid lockingSingle layer mode and Empty space selection moved to a new more streamlined button bar.
  • File association: project files now use the extension *.ldtk instead of *.json. Therefore, on Windows, double-clicking such files will open the app accordingly. If you prefer the .json extension, you can force it in each project settings (but will lose benefit of the file association).
  • Auto-layer rule preview: when you move your mouse over a rule, you will now see which cells in the current layer are affected, making their testing MUCH easier.
  • Tiled (TMX) export: this optional export now generates proper standard tile layers. However, to support LDtk stacked tiles feature (see above), multiple Tiled layers might be generated per single LDtk layer. Also, IntGrid layers are now properly exported to Tiled (as standard tile layers, with an auto-generated tileset image).
  • New color picker: it supports copy/paste, manual hex value editing and a much better UI (thanks to simple-color-picker).
  • Flood-fill fixes: if you hold SHIFT while clicking in a Tile layer, it will flood-fill the area using currently selected tiles (randomly, or by stamping group of tiles, depending on the current mode).
  • Flood-fill erasing: just use SHIFT+Right click to erase a whole contiguous area.
  • The layer Rule editor now overlaps left panel and allows level editing while being open (makes rule testing much easier). Press Escape to close it.
  • In Tile layers, you can press L to load a saved tileset selection (using S key)
  • Renamed the Level panel to World (for the 0.6.x future update).
  • It’s now possible to change the tileset or even the source layer of an Auto-Layer without loosing your rules.
  • Auto-layer baking: turn a complex Auto-Layer into a standard Tile layer (think of it as the flatten feature in Photoshop). Be careful, it’s a one-way operation.
  • Unified “Show/hide grid” and “Grid locking” options. You can now just press G to toggle grid (which also implies “grid locking” in supported layer types).
  • All options (such as “Grid on/off”, or “Compact panel mode”) are now saved to a JSON file in your app folder, in userSettings/.
  • Help window is now a side panel.
  • Opaque tiles are detected in tilesets for use in various optimizations (mostly related to the new tile stacking feature).
  • Fixed a crash when deleting IntGrid layer while an AutoLayer uses it as source.
  • Added some colors to UI buttons
  • New exit button icon.

You can learn more about LDtk releases here, including an even newer 0.5.1 beta release. As mentioned earlier the project is open source with the code released under the MIT license and available on GitHub. You can learn more about LDtk here with downloads available on Itch.io. You can learn more about LDtk and see it in action in the video below.

[youtube https://www.youtube.com/watch?v=O1pmIImzEts?feature=oembed&w=1500&h=844]
Posted on Leave a comment

Reclaim hard-drive space with LVM

LVM is a tool for logical volume management which includes allocating disks, striping, mirroring and resizing logical volumes. It is commonly used on Fedora installations (prior to BTRFS as default it was LVM+Ext4). But have you ever started up your system to find a message like the image above, after you logged in? Uh oh, Gnome just said the home volume is almost out of space! Luckily, there is likely some space sitting around in another volume, unused and ready to re-alocate. Here’s how to reclaim hard-drive space with LVM.

The key to easily re-alocate space between volumes is the Logical Volume Manager (LVM). Fedora 32 and before use LVM to divide disk space by default. This technology is similar to standard hard-drive partitions, but LVM is a lot more flexible. LVM enables not only flexible volume size management, but also advanced capabilities such as read-write snapshots, striping or mirroring data across multiple drives, using a high-speed drive as a cache for a slower drive, and much more. All of these advanced options can get a bit overwhelming, but resizing a volume is straight-forward.

LVM basics

The volume group serves as the main container in the LVM system. By default Fedora only defines a single volume group, but there can be as many as needed. Actual hard-drive and hard-drive partitions are added to the volume group as physical volumes. Physical volumes add available free space to the volume group. A typical Fedora install has one formatted boot partition, and the rest of the drive is a partition configured as an LVM physical volume.

Out of this pool of available space, the volume group allocates one or more logical volumes. These volumes are similar to hard-drive partitions, but without the limitation of contiguous space on the disk. LVM logical volumes can even span multiple devices! Just like hard-drive partitions, logical volumes have a defined size and can contain any filesystem which can then be mounted to specific directories.

What’s needed

Confirm the system uses LVM with the gnome-disks application, and make sure there is free space available in some other volume. Without space to reclaim from another volume, this guide isn’t useful. A Fedora live CD/USB is also needed. Any file system that needs to shrink must be unmounted. Running from a live image allows all the volumes on the hard-disk to remain unmounted, even important directories like / and /home.

Use gnome-disks to verify free space.
Use gnome-disks to verify free space

A word of warning

No data should be lost by following this guide, but it does muck around with some very low-level and powerful commands. One mistake could destroy all data on the hard-drive. So backup all the data on the disk first!

Resizing LVM volumes

To begin, boot the Fedora live image and select Try Fedora at the dialog. Next, use the Run Command to launch the blivet-gui application (accessible by pressing Alt-F2, typing blivet-gui, then pressing enter). Select the volume group on the left under LVM. The logical volumes are on the right.

Explore logical volumes in blivet gui.
Explore logical volumes in blivet-gui

The logical volume labels consist of both the volume group name and the logical volume name. In the example, the volume group is “fedora_localhost-live” and there are “home”, “root”, and “swap” logical volumes allocated. To find the full volume, select each one, click on the gear icon, and choose resize. The slider in the resize dialog indicates the allowable sizes for the volume. The minimum value on the left is the space already in use within the file system, so this is the minimum possible volume size (without deleting data). The maximum value on the right is the greatest size the volume can have based on available free space in the volume group.

Use the resize dialog in blivet-gui to set the new volume sizes.
Resize dialog in blivet-gui

A grayed out resize option means the volume is full and there is no free space in the volume group. It’s time to change that! Look through all of the volumes to find one with plenty of extra space, like in the screenshot above. Move the slider to the left to set the new size. Free up enough space to be useful for the full volume, but still leave plenty of space for future data growth. Otherwise, this volume will be the next to fill up.

Click resize and note that a new item appears in the volume listing: free space. Now select the full volume that started this whole endeavor, and move the slider all the way to the right. Press resize and marvel at the new improved volume layout. However, nothing has changed on the hard drive yet. Click on the check-mark to commit the changes to disk.

Review the changes in blivet-gui and then accept to reclaim hard-drive space.
Review changes in blivet-gui

Review the summary of the changes, and if everything looks right, click Ok to proceed. Wait for blivet-gui to finish. Now reboot back into the main Fedora install and enjoy all the new space in the previously full volume.

Planning for the future

It is challenging to know how much space any particular volume will need in the future. Instead of immediately allocating all available free space, consider leaving it free in the volume group. In fact, Fedora Server reserves space in the volume group by default. Extending a volume is possible while it is online and in use. No live image or reboot needed. When a volume is almost full, easily extend the volume using part of the available free space and keep working. Unfortunately the default disk manager, gnome-disks, does not support LVM volume resizing, so install blivet-gui for a graphical management tool. Alternately, there is a simple terminal command to extend a volume:

lvresize -r -L +1G /dev/fedora_localhost-live/root 

Wrap-up

Reclaiming hard-drive space with LVM just scratches the surface of LVM capabilities. Most people, especially on the desktop, probably don’t need the more advanced features. However, LVM is there when the need arises, though it can get a bit complex to implement. BTRFS is the default filesystem, without LVM, starting with Fedora 33. BTRFS can be easier to manage while still flexible enough for most common usages. Check out the recent Fedora Magazine articles on BTRFS to learn more.

Posted on Leave a comment

Six Great Game Development YouTube Channels

YouTube is an incredible resource for game developers, but sorting the gems out can be a challenge. Today we are going to highlight 6 excellent game development channels, especially if you are a Godot developer, as well as general game development guides, Blender, GameMaker and more.

AskGameDev

AskGameDev is a collection of game developers that set out to answer your questions about game development. They cover many of aspects of gamedev that are often not covered, such as how to run a Kickstarter, how to get or deal with a publisher, as well as several game development themed compilations. AskGameDev also have a website available here.

GDQuest

GDQuest are home to dozens of Godot tutorials, in fact Nathan from GDQuest is a member of the Godot documentation team. In addition to Godot coverage, GDQuest has tutorials on all kinds of FOSS software such a Blender and Krita. The GDQuest website is available here.

HeartBeast

HeartBeast started out as a GameMaker tutorial channel, of which there are dozens of high quality long form tutorial series. In more recent years, Heartbeast has been instead creating high quality multipart and stand-alone tutorials on Godot. HeartBeast also has a website available here.

BornCG

BornCG has been making high quality Blender YouTube tutorials on his channel created in 2008! In more recent years BornCG has been increasingly covering the Godot game engine, as well as creating modern Blender tutorials as well.

DevDuck

DevDuck is the newest channel on this list, less than two year old and already over 100K subscribers, an impressive feat! DevDuck is a professional developer that is documenting his indie game development experience on the side. He started off with Unity but switched to Godot and of course did videos explaining why and how.

KidsCanCode

KidsCanCode have the project mission to get kids started in coding as young as possible, often through the process of creating games. Early on they did mostly Python and PyGame tutorials but then switched to Godot in recent years. They also run the Godot Recipes on their site, a collection of snippets on how to accomplish specific tasks in Godot and GDScript.

You can learn more about all the above channels in the video below.

[youtube https://www.youtube.com/watch?v=iyBqcfRbt9s?feature=oembed&w=1500&h=844]
Posted on Leave a comment

Unreal Engine Free Content for November 2020

Every month for the last couple years Epic Games have given away several assets for Unreal Engine with today being no exception. While the assets are completely free, they are only free until the first Tuesday of December. Once “purchased” the assets are yours forever.

This months free assets include:

Permanently Free Additions:

Unfortunately there is no video yet as YouTube Studio for creators is currently down and nobody can upload or edit videos right now. Once YouTube errors are fixed we will upload a video.