Category Archives: linux

Dropping Google and limiting phone data harvesting.

I’ve been thinking a lot about the use of android VS apple for example, and the more I’ve thought about it the more worrying it gets. They track and hold data (Apple is probably the lesser evil here) about your every single move, it’s insane how much data google has about your daily life, and one way to fight back is to get a dumb phone, without any ‘smart’ functions.
Also I’m just tired of being so connected all the time, reddit, diaspora, twitter, mastodon, snapchat and so on, just tired of having it all in my pocket. So I looked around on ebay, wanted to buy one that’s cheap and does the job, and also I wanted a small phone. So in the end I bought this phone:
https://www.ebay.com/itm/iFcane-E1-Quad-Band-Mini-Card-Phone-Bluetooth-2-0-MP3-FM-Alarm-Clock-Black/253684497776

The reason why I bought this specific one was because of the price and features.
It has regular phone call feature, sms, fm radio, bluetooth, calendar, alarm, and is dirt cheap.
Also it charges very fast to full capacity, so if I’m out and about a power-bank will last a long time. I have to work around not being able to send\receive mms, I do that by using the online service from my provider on my computer. Same goes for email – no access to that, just from my computers at home. Also I take a lot of pictures ( https://mediagoblin.stigatle.no ) , but I do bring my digital SLR with me most times anyways, so that will not be a big issue.

It’s fun to see how it all works out, and I might have to bite the bullet down the road, but for now I’m going all in on not using a android device, if I’m ever going back to a smartphone then I will definitely save up some cash and get a Librem 5 phone next time.

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.


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.
You find the source code and samples scenes here:
https://github.com/stig-atle/io_scene_pbrt

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.

Testing CentOS 7 as desktop \ developer OS.

A couple of weeks ago I decided to give CentOS 7 a try as my main OS,
the reason why – is because it’s the closest you get to redhat without paying,
and I’ve been running everything from Debian to Arch, gentoo and others, but now I wanted a rock solid OS that feels predictable,
CentOS feels like the natural choice for that kind of system.

What worried me a bit was outdated software, that has been a issue before with other OS’es,
but after I checked aroud a bit I found out about elrepo,
which is a repository that you can add to CentOS so that you get better hardware support and drivers.

The ELRepo Project focuses on hardware related packages to enhance your experience with Enterprise Linux.
This includes file system drivers, graphics drivers, network drivers, sound drivers, web cam and video drivers.

The first big problem I ran into when I installed CentOS 7 was the kernel,
the netboot \ install DVD did not work as it should on my hardware, but the live-DVD did boot up and install.
The problem I had was that the hardware did not get detected properly,
and after I installed the OS trough live-DVD I decided to upgrade the kernel,
this again caused hardware issues, the usb froze and keyboard \ mouse stopped working,
so that I could not enter my full disk encryption pass phrase at start-up.

So I decided to install it again – fresh install with the live DVD, then I installed the kernel through this guide.
Getting the latest kernel fixed the issue I had with usb locking up, letting me log in and use it.

The next problem I had was to get the Nvidia drivers up and running, but after some trail and error I ended up using this guide.

When it comes to games I mostly run games via steam, that works as expected.
I also run Steam for windows through PlayOnLinux , so to get that to work on CentOS 7 I just grabbed the latest standalone package and run it there.
Then I chose to install ‘steam’ in the games list, accepting the defaults, then I go to it’s properties and make it run ‘wine staging’ instead of the default one.
Steam with wine on CentOS 7 runs like a charm.

I have a big list of games that I’ve tested here:
https://stigatle.no/index.php/2016/08/02/steam-games-for-windows-that-works-with-wine-on-linux/

I also buy games on Gog , since I like DRM free copies of games that I actually own.
They list each games dependencies – all tough they are listed with the names they have in Ubuntu, so some times you
have to jump through a couple of hoops to get the right ones installed in CentOS 7.

The trickiest problem I had with my games there was the ‘ libcurl-gnutls.so.4 ‘ dependency,
but in the end you could do the following to make it work:

cd /usr/lib
sudo ln -s libcurl.so.4 libcurl-gnutls.so.4

Also with QT Creator I had issues with libGL.so \ libGL.so.1 ,
the solution works the same way as the libcurl fix:

yum install mesa-libGL-devel mesa-libGLU-devel
cd /usr/lib
ln -s libGL.so.1 libGL.so

There are many repositories you can add that enhances your CentOS experience, you can look at them here:
https://wiki.centos.org/AdditionalResources/Repositories

Now I can say that everything I need works, nvidia, steam, all my games, all development tools, 3D tools –
everything I need, and it feels solid.

My render exporter \ integration project

The current renderer I’m writing a exporter for
(and later a proper integration) into blender is Pbrt.

The reason why I chose this renderer is because I have the book and I really like the renderer, and having a proper exporter \ integration of this renderer in blender is something a lot of people might find useful, especially if they have the book and want to really test the renderer.

And as you might know – many of the render engines on the market today started as Pbrt source code.

As you can see on my site I used to work with 3dsmax, but I’ve always had my eye on Blender,
and recent events with 3dsmax\Autodesk made me switch over full time to Blender.
I have been developing Luxmax (3dsmax integration of LuxRender for 3dsmax) for many years, but now I feel
that blender is where the future is, it is the best open source 3d application that exists today, and it will continue to be that,
so investing time into it is not something I’ll regret in any way.
And the best part of ditching 3dsmax is that you can get rid of windows at the same time, I now exclusively use Debian.

One other important reason why I do this is that I want to get more into the render engines as well, I want to be able to add to it, implement new things, learn new stuff, and that’s why I choose pbrt , the book really completes it.

Luxrender already has a great plugin for blender, and later I will most likely join the development on that,
but for now (since I’m busy with work and family life) I need a project I can do in my own tempo, and I need to learn all the nuts and bolts in blender.
Switching from 16 years of 3dsmax to Blender was surprisingly easy, and developing for it is not hard either, I’m used to maxscript\c++ so I feel
right at home with Python and c\c++ in Blender.

I have not decided yet if this will be a open source script, fully free, or if  you should be able to buy it instead (or maybe try the ‘patreon‘ thing).
I will decide on that in a bit once it’s more feature complete, currently it’s in its infancy.

For now I have a simple test render with a basic shader:

My new project

I’ve been thinking about it for a long while, and now I’ve decided to invest all my free time into it.
I will integrate a renderer with Blender, first as a exporter for the file formats that the renderer uses, then
do a better integration later on when that is feature complete.

I have ditched windows completely, and with that 3dsmax. I still use 3dsmax at work every day,
but now I do not use it for anything at home. I invest all my time into blender now, that makes perfect sense to me.
I really enjoy blender, and after 16 years of 3dsmax it feels great to have a fully open source work flow.

Here is a sample of what’s to come:

Steam games for windows that works with Wine on Linux

I frequently test and install games that are in my steam library through wine.
I run wine-staging on debian testing.

I have compiled a list of those who worked, and those that did not, I have included a steam link to each game
so that you easily can go buy\view them.
I update with new games frequently, I tag them with a date too so that you see when it was last updated easily.
I figured I might as well post it here as well, maybe someone finds it useful.

Games that work:
Underrail

Graviteam Tactics: Operation Star
Battle academy
Close Combat – gateway to caen
Devil Daggers
Divine divinity
Beyond divinity
endless space
Exanima
Frontline : road to moscow
legend of grimrock II
supreme ruler 1936
supreme ruler ultimate
qvadriga
Spintires
star ruler 2
Rise of prussia gold
1953 – KGB Unleashed
Arklash: Legacy
MX vs. ATV Reflex
SanctuaryRPG Black edition
Starseed pilgrim
VVVVVV
Avadon 2: The corruption
Avdon: The black fortress
Avernum 4
Avernum 5
Avernum 6
Avernum escape from the pit
ship simulator extremes – works with nvidia card, and not on ATI card.

–Updated 12.Nov.2016
The Forest
panzer corps
Stranded deep

–Updated 8.May 2017
Sid Meier’s Civilization III Complete

–Updated 10.May 2017
Dungeon of the Endless
E.Y.E Divine Cybermancy
endless legend
Rise of Prussia Gold
Fallout: New Vegas

–Updated 13.May 2017
Victoria 2 – see notes in comments on how to make it work.
Sid Meier’s Civilization IV: Colonization
Sid Meier’s Civilization IV
Perpetuum
Rogue System
fallout tactics
Fallout 2
Dead space (works, but choppy glitchy audio)

–Updated 03.June 2017
Sniper Elite V2
inquisitor – works in wine-staging.
Hearts of iron III – works in wine-staging
SuperPower 2 steam edition
Sins of a solar empire: rebellion
Spelunky

–Updated 11.Nov 2017
The Elder Scrolls III : Morrowind
Polaris sector
Oddworld: Abe’s Oddysee


Games that did not work:

Unclaimed world – crash on launch.
enemy front – crashed during intro, complained about video card.
Galactic Civilizations III – failed to start, missing executable error
Meridian: new world – crash on launch
Out there somewhere – crash on launch
Quake 1 – winsock error during start.
starpoint Gemini 2 – failes to launch crashes.
strategic war in europe – same error as above
stardrive 2 – crash on launch
Eador. Masters of the broken world – fails during initial setup.
off-road drive – does not launch because of .net install.
Operation flashpoint : dragon rising – did not launch

–Updated 12.Nov.2016
DayZ – dependency fails to install, causing game not to launch.

–Updated 8.May 2017
The witcher: enhanced edition – graphical glitches on characters.
Miasmata