Author Archives: Stig Atle steffensen

Gentoo

I’ve been wanting to set up Gentoo from scratch for a good while.
I have tried in the past, but failed. I decided to try again now since I have time to sit down properly with it.

Now, I will say I spent about 4 days in total on all this, multiple install attempts. I will now explain what went wrong, and what I ended up doing.

So, what I did first was to install regular Gentoo from scratch, without full-disk encryption, the initial install went fine, most things worked as they should, I then wanted to install a desktop, so I went on to installed Xfce4.

One thing during the install that wasted a lot of my time was figuring out that after you ’emerge’ a package – you then often have to do ‘etc-udpdate’ to merge the config file changes, I did not know this, so it was very confusing when I tried to install some thing over and over and it never started the install.

After doing all this I wanted to reinstall and see if I could get full-disk encryption to work. I tried the guides I found, but no matter how many times I tried it failed. And each install took a lot of time, so after trying 4 times I gave up on that.

I then looked into other distributions that are gentoo based. I have tried sabayon before, but I did not feel like that was what I wanted this time, I want something minimalistic, and ‘bare bones’ – not something bloated.

That’s when I found CloverOS https://gitgud.io/cloveros/cloveros/

This is a pure Gentoo with binaries as a alternative, but the beauty here is that it’s super easy to install, and you can choose between almost all desktops during install too, everything from tiling window mangers to gnome and KDE. And after install you can disable the binary repo with a simple command, so that it will pull everything from source after that, by running the ./cloveros_settings.sh script that is installed along with the OS.

The only downside with it is that it does not currently have full disk encryption in the install script. But If I can figure it out I would contribute to it.


Planck mechanical keyboard.

When I saw the ortholinear mechanical keyboard named planck I just knew I had to have one. Up until that point I did not really pay any attention to mechanical keyboards, and especially not custom ones. At first I was a bit skeptical to the whole idea of getting one, because it is  a DIY compact 40% ortholinear keyboard, and I had no idea if I would like it at all.

After a while the keyboard got sold on massdrop, I had some money in my savings account and decided to buy it. I placed the order for the sum of $141.97.

I ordered the version that has two separate keys where the spacebar is located.

The order details are :
CNC case color: Silver
Plate style: MX compatible (Cherry MX)
Keycaps: Beige XDA PBT blanks (MX Compatible)
49 switches: Gateron Clear (Linear) (+$9.99)
sleeve: Yes (+$7.99)

I did order blank keycaps, I did not want to shell out cash for keycaps with print on then, since I can write all day long without looking on a regular keyboard. The parts arrived, and I found my soldering iron, soldered everything, assembled it all, and here is the result:

This is where I have to admit the first mistake, and that was to order blank keycaps, it was really hard to learn how to type properly on it, I hated it at first. I struggled a lot learning how to use it efficiently.

So what I did then was to find ortholinear keycaps on amazon, I found some good ones there, ordered them and it was fantastic. Made it so much easier to use.

The keycaps I ordered was these:
DSA 40% Ortholinear dye-subbed keycap for mechanical keyboard.

Also I had to create my custom layout for it, since I’m Norwegian and need some extra letters like æøå, and also easy access to brackets and such that you use a lot when coding. That was very easy to do, I ended up using EasyAVR I stripped away to standard layout, removed all the default fancy key macros that came with the planck, and added what I needed.

I ended up only needing two layers, and they now look like this:

This was the key for getting the planck exactly the way I needed, and I have now gotten rid for my old keyboard and use the planck keyboard exclusively.

My planck now looks like this:

 

 

 

Blender PBRT exporter test scene.

I got contacted on twitter by @Cao_Jiayin on twitter today, and he asked about a scene that I had posted previously, specifically the ‘glass monkey’ scene.

I have now re-created that scene, and exported it, zipped it, uploaded it so that you can render it out if you want to test a bit. You have to adjust ‘”integer pixelsamples” [32]’ to something much higher if you want a clean render. I rendered it over night, I set it to low by default now
so that you can quickly get a look on how the render will look.

The ply mesh is pretty dense, that’s to prevent any artifacts in the smooth surface. You can download the zip from from here:

https://stigatle.no/owncloud/index.php/s/TFDVs2enSk4TF95

Install Centos 7 with libreboot.

I really wanted to have CentOS on a laptop with libreboot. I had some trouble getting things to run after install, later I found a post on the libreboot website that said what to do. The same solution can be used for redhat \ fedora installs.

So here is what I did:

Download latest CentOS, boot from usb stick or some other way, personally I use drivedroid all the time , very nice app to have installed on the phone, grab the iso, copy it to phone, emulate usb cdrom and boot from that.

I downloaded the ‘CentOS-7-x86_64-LiveGNOME-1804.iso’ from here:

http://isoredirect.centos.org/centos/7/isos/x86_64/

Boot it up:

Start CentOS live:

After starting CentOS – run the installer as usual, I choose to have full disk encryption.
When installation is done, reboot the machine.

Choose this menu entry:

Hit ‘E’ to edit the command for booting, this is the important step in getting it to run.
In the text editor – change ‘linux16’ to ‘linux’

Like so:

Same goes for the line that says ‘initrd16’ – change it to ‘initrd’:

When the modification is done – hit F10 to boot up your system.

On mine I then unlock the encrypted disk:

Then accept the license and such for first boot of CentOS:

When that’s done you have a fully working CentOS with Libreboot.

Learning vulkan.

I’ve been thinking about it for a long time, what should I focus on next.. I like to choose something then go for it, spend a lot of time with it until I know how it works and can use it for the things I want to do. I’ve been working with Ogre3D for the last 7 years, and now I feel the need to dive a bit deeper into real-time graphics, I never really spent time learning Direct-x or OpenGL, so after giving it some thought I decided to spend time with vulkan instead.

It feels natural to do that, because it’s new but already used by major companies.
Feel more like the future. The best part about it is that it’s fully open source and cross-platform.

I have now gone through the tutorial at https://vulkan-tutorial.com/ , awesome resource if you want to get started.

The result from going through that is loading this model from .obj file and show it on the screen. You get a great introduction to all the basic things that has to do with vulkan development.

 

Status and info on my PBRT exporter for blender.

I want to write a bit about my first blender development project, if you follow me on twitter then you probaly already know its a renderer exporter for PBRT render engine.

The reason why I wrote it as an exporter is because it was the easiest way to get started. The project started when I decided to stop using 3dsmax and go to blender full-time, so I needed to learn everything I needed about blenders C/Python API while making this.
It has not been as hard as I feared, 16 years of 3dsmax daily + many years of maxscript and 3dsmax c++ SDK experience helped a lot.

I’ve spent a lot of years on the luxrender project working on the 3dsmax plugin, but after I stopped using 3dsmax it did not make sense to me to continue working on that, also the integration of luxrender in blender had already been done, so I took a look at my PBRT book and decided that I wanted to spend time with that, also later on I want to dive deeper into render engine development, so it makes perfect sense to me to use pbrt as boilerplate. But first it deserves a proper exporter, which is what I’m developing right now.

The way the exporter works right now is that it exports the scene to the format that pbrt can read, and you render the resulting scene with pbrts command-line client.

Currently the shader GUI are written in C, the reason is simply that I was not able to make it work the way I wanted in python. The downside of this is that I cannot release it in its current state as an add-on, I need to fork blender instead. So right now I’m at a crossroad, rewrite the c parts in python to make it an add-on, or do full c implementation and have it as a fork, then later do a full implementation like any other internal renderer in c, like cycles for example, that would also mean render properly from inside blender and not externally like I do now.

I’m leaning towards doing a full c implementation, but I also see the benefit of making it with python as an add-on, so Ill think a bit more about it before I make my final decision.

So, here’s a list of what I have already implemented:

*Custom shader guis with all their settings.
* Mesh export
* Camera export, with DOF setting.
* Texture map export.

Currently I have no light support except a hard-coded hdri light source, the plan is to add all lights including environment map support next.

I will openly admit that I wanted to sell the add-on, but I decided against it, the reason why I decided not to was because the market for such a thing is very small, so there’s no reason to earn maybe 100 dollars and go trough all the hassle of selling it, id rather make it open source and free for anyone to enjoy, and maybe inspire others the same way I did when I worked on the luxrender plugin.

I also earn enough at my regular job, so I have no reason to do this for money, its my passion and I love to code and help others in my free time, so it makes perfect sense to me to do this.

So, now you might wonder when the source will be released – I will do that shortly, just some more features to add (lights, render settings panel), and Ill decide if Ill rewrite the C code in python first.

Time to show some test renders, you might have seen these before on twitter, but I figured it would be nice to collect them here in this blog post.
And as you will see – some of these are grainy, I simply did not render them long enough
PBRT is CPU only, so rendering takes a lot of time.

Switching to blender on all personal projects.

So, in December (2017) I decided to leave 3dsmax and switch to blender full time for all personal work. I’ve been using 3dsmax for half my life, and still use it at work (our whole workflow there is based around autodesk software), byt at home it enabled me to completely ditch window – which has been a goal of mine for a long time, it was only 3dsmax holding me back.

Blender has been on my radar for a long time, but I never found the proper motivation to learn it – since I was quicker in 3dsmax anyways. But now I have taken the time to really learn it, and the more I use it the more I like it. I’ve spent a lot of time learning the hotkeys, I use the default blender hotkeys, and that was the key for me to really learn it. Now after just a few personal projects I’m as fast as that as 3dsmax.

My next step is to focus a lot on plugin \ addon development for blender, this is where I struggle the most right now, I’m very good with the 3dsmax SDK, but not with blender’s API yet. I do however develop a exporter in python for a external render engine, and by doing that I learn what I need.

There are many advantages for using blender, but for me the biggest reasons are the following:

  • Fast development.
  • Open source \ free.
  • Cross platform.
  • Very easy to compile from source.
  • PBR workflow in viewport (EEVEE).
  • Great documentation \ online resources.
  • Great community – all about sharing.
  • Open roadmap and planning.

There are many reasons to leave 3dsmax behind, and for me it’s these things:

  • No more free home license when we have 3dsmax at work.
  • Subscription only (200 usd a month).
  • Removed Mentalray , and nvidia stops development of mentalray.
  • Added Arnold, which cannot even do texture baking.
  • Iray cannot do texture baking either.
  • Slow development and a focus that’s not clear.
  • Not cross-platform (the only one that’s windows only..).
  • Closed source.
  • Do not care about the ‘small’ users.

There is one downside as well, and that was stopping the development of LuxMax, that was the hardest project to put away and stop working on. It’s been my pet project for many years, and I’m very proud of it, but I decided to stop working on it since I do not use 3dsmax anymore and want to focus on blender.

LuxMax 3DsMax 2018 OpenCL

A big milestone has been reached in the LuxMax render plugin tonight, the OpenCL version now works, and uses the GPU. This means a huge speed improvement. Here is the first test render I did during the implementation. As you see the GPU sits at 46% in this example, I have tested other scenes too with 98% utilization. Also all OpenCL related settings can be tweaked in the render panel soon, this is what I’m going to fix next.

Expect a new release with OpenCL soon.

Maratis scene exporter for 3dsmax status update 2

A lot has happened since my last post, I’ve been working on the new exporter every day. I have come a long way, and soon it’ll be ready for beta release.

As I wrote in my previous post here I’m rewriting everything in c++, and now I have these things mostly ready.

You can download a zipped sample project that you can load into maratis (the scene these screenshots are taken from). If you then select some of the shapes, go to their ‘properties’ you can apply different animations that are defined.

Download the project files here testproject

Animation modifier
you can now add as many animation modifiers as you want, each of the has a ‘start, end’ range and a name for the animation. So if you have a character with walk\run\jump cycle you just add 3 modifiers, with their respective settings and it will export to maratis.

Physics modifier
You can add physics to any mesh, and specify the settings, maratis will then load the shape withe the selected settings applied.

Shader
With the shader you set maps for the different slots, each slots means something (I will describe this better then in the screenshot). Texunit1 means diffuse map and so on. I’m going to add the missing GUI items as well (specular color and such things).

Max scene:

Result (with some animation applied):

(The reason why this seems a bit more dim then in 3dsmax is because the specular parameter is not done yet)

 

 

Maratis scene exporter for 3dsmax status update

Around 5 years ago I found the game engine ‘Maratis’, I really liked it.
It’s easy to use, nice clean editor, nice LUA language support (which I’m used to from maxscript).
Very good for prototyping and creating games fast.

Back then I then created a exporter for 3dsmax for it, and posted a video of it here:

I then moved on to other projects.

But recent comments on the video about the exporter got me back to developing on it again, and I have now spent around two days upgrading the exporter to 3dsmax 2018, I have also rewritten most of it from maxscript to c++, so now the exporter GUI, animation modifier and physics modifier is rewritten as c++ plugins.
The last missing piece now is the shader (which will be done next).

The reason why I rewrite it in c++ is because I want to sell this plugin for a fair price, and I want the speed of c++, I spend a considerable amount of time developing tools like this, so getting something in return would be fair I think, the plugin will not be expensive, but fair.

Currently supported features:

  • All mesh types.
  • Camera (also target camera).
  •  Skin\bone animation. (can be animated with IK and anything else)
  • Spot \ omni light.
  • Physics parameters.
  • Animation parameters (animation name, length, start\stop time etc).
  • Full scene export.
  • Single\multiple mesh object export.

I’m now fixing the missing parts and getting it ready for release.

And worth a mention – if you edit a object in the maratis scene, then this is not updated back in 3dsmax. But that is how it is in most exporter scenarios, you set up the game level as want it, export, then continue in your game editor. You can however export single (or multiple) mesh only objects, then you can add these in your maratis scene as you go.
I might later look into a ‘import’ feature, that reads your maratis scene file and then updates the objects in max based on what you have done in maratis,
this will make a two-way connection, but that has to be determined later.

I hope to have the plugin ready for release in about a week, I need to fix the remaining shader stuff first.
Then I will also create a new video tutorial, and proper documentation (pdf).

Screenshot of maratis with a loaded scene exported with the new c++ exporter.