Author Topic: Windows Subsystem for Linux in Terragen  (Read 420 times)

Offline Mid-Knight Acchan

  • Member
  • *
  • Posts: 77
  • https://www65.atwiki.jp/terragen/
    • Terragen 4 japanese wiki
Windows Subsystem for Linux in Terragen
« on: December 29, 2018, 11:25:37 AM »
A tutorial on using "Windows Subsystem for Linux" to start linux version of Terragen on Windows and perform VDB export.

https://www65.atwiki.jp/terragen/pages/205.html

Please be aware that it is a Japanese page :P

« Last Edit: December 29, 2018, 11:54:12 AM by Mid-Knight Acchan »

Offline D.A. Bentley

  • Member
  • *
  • Posts: 337
    • D.A. Bentley
Re: Windows Subsystem for Linux in Terragen
« Reply #1 on: December 29, 2018, 03:06:08 PM »
I went through the entire process of setting up WSL (Windows Subsystem for Linux) under Windows 10 Pro and it was a little different that the above referenced tutorial which may have been because it was made using the Japanese version of Windows 10, or perhaps a different version of Windows 10?


Here are the official instructions from Microsoft to set up WSL:  https://docs.microsoft.com/en-us/windows/wsl/install-win10

After WSL is installed you need to go to the Microsoft Store App and find Ubuntu.  I installed the non-LTS option, which I think is the one that gets updated frequently.  You can also instal 16.04 LTS, or 18.04 LTS.

87051-2

Once Ubuntu is installed you can run it and get a shell (bash) prompt.  You will need to figure out how to access your Windows directories, and drives from within the linux shell.  You don't ever want to shove files from Windows 10 into the Ubuntu Linux filesystem which is within the AppData folder here (on my PC):  C:\Users\Derek\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs


FYI in Ubuntu Linux you can find your Windows 10 Downloads under /mht/c/Users/<USER>/Downloads so for me it looks like this:  /mht/c/Users/Derek/Downloads
/mht/c gets you to your C:


After you download Terragen Linux you need to copy it to your user root directory and extract it.
This will take you to your user root directory:
cd ~

Once your there you can copy the Terragen Archive to there but you need to know where it is in your Windows file system.  I would put it somewhere easy to find like directly under your C:, or your Windows 10 user Download folder.
For me my User Download folder under Windows is:
/mnt/c/Users/Derek/Downloads

So you could do this to copy your Terragen download to the user root directory under linux:
cp /mnt/c/Users/Derek/Downloads/Terragen_4_Linux_43210.tar.gz .
The period character tells the copy command you want to copy the file to the current directory you are in (~).
If your Terragen_4_Linux_43210.tar.gz archive was directly under C: under Windows 10 you could do this instead:
cp /mnt/c/Terragen_4_Linux_43210.tar.gz .

Then extract it like this:
gunzip Terragen_4_Linux_43210.tar.gz
tar xvf Terragen_4_Linux_43210.tar



I would rename the directory Terragen is in to something simple like "Terragen" and then you need to find your license file and copy that on over to the Terragen directory as well.


Before you can run Terragen you need to make sure your license is working.  It must be the Terragen Professional license.


The Terragen install was a little rocky, meaning you have to install some dependency packages, and sometimes there are some errors/missing components.  I did "sudo apt-get update" a couple times and had to retry getting some of the packages that failed to get everything on the first try.


Here are the packages:
sudo apt-get install libgl1-mesa-dev
sudo apt-get install libglu-dev
sudo apt-get install freeglut3-dev
sudo apt-get install libjpeg62

I also had to get this with wget:
wget http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb
and then:
dpkg -i /libpng12-0_1.2.54-1ubuntu1_amd64.deb




The command for using vdbexport is like this:
./terragen -p project.tgd -exportvdb "Name of cloud layer" filename.vdb
87067-10
87069-11

I name my files like this to keep track of my source scenes and export scenes:
./terragen -p clouds001_cl3_r100km_vox400.tgd -exportvdb "Cloud layer v3 01" cloud_layer_v3_100km_400m_voxels.vdb
./terragen -p clouds002_cl3_r256km_vox200.tgd -exportvdb "Cloud layer v2 01" cloud_layer_v2_256km_200m_voxels.vdb
./terragen -p clouds003_cl3_r256km_vox100.tgd -exportvdb "Cloud layer v3 01" cloud_layer_v3_256km_100m_voxels.vdb
./terragen -p clouds003_cl2_r256km_vox400.tgd -exportvdb "Cloud layer v2 01" cloud_layer_v2_256km_400m_voxels.vdb

Brought this small test into Modo to look at it:
87071-12

If your trying this and need help let me know.  The hardest part is installing Terragen.  ;)

Derek
« Last Edit: December 31, 2018, 08:50:41 PM by D.A. Bentley »

Offline Mid-Knight Acchan

  • Member
  • *
  • Posts: 77
  • https://www65.atwiki.jp/terragen/
    • Terragen 4 japanese wiki
Re: Windows Subsystem for Linux in Terragen
« Reply #2 on: December 30, 2018, 03:39:30 PM »
Thank you、D.A. Bentley

I was not confident of correctly rewriting this tutorial in English.
Thank you for making an explanation in polite English.
I want many people to experience the function of VDB export.

Offline gao_jian11

  • Member
  • *
  • Posts: 105
Re: Windows Subsystem for Linux in Terragen
« Reply #3 on: December 31, 2018, 12:08:07 AM »
Thank you two, very helpful. I want to ask where is the "linux version of Terragen"? In addition, I think terragen's cloud rendering is unparalleled. Importing vdb makes more sense. In other software, the animation of the cloud is set and imported into terragen rendering. When can I import vdb?

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 12943
  • Holy snagging ducks!
Re: Windows Subsystem for Linux in Terragen
« Reply #4 on: December 31, 2018, 01:57:29 AM »
The Linux version is an available download for anyone who owns the Professional version of Terragen.

VDB import will be developed, but we have no time frame for it.

- Oshyan

Offline D.A. Bentley

  • Member
  • *
  • Posts: 337
    • D.A. Bentley
Re: Windows Subsystem for Linux in Terragen
« Reply #5 on: December 31, 2018, 08:56:39 PM »
Thank you、D.A. Bentley

I was not confident of correctly rewriting this tutorial in English.
Thank you for making an explanation in polite English.
I want many people to experience the function of VDB export.

Your very welcome!  It was a fun learning experience, and I am actually amazed the Linux version of Terragen can actually run under Windows using this new WSL!  :)

Derek

Offline aokcub

  • Member
  • *
  • Posts: 35
Re: Windows Subsystem for Linux in Terragen
« Reply #6 on: December 31, 2018, 11:27:52 PM »
The WSL feature can be enabled by either CUI or GUI. Microsoft (MS Japan too) instructs to enable it from the PowerShell but the control panel also has a switch as written in above tutorial.

Offline D.A. Bentley

  • Member
  • *
  • Posts: 337
    • D.A. Bentley
Re: Windows Subsystem for Linux in Terragen
« Reply #7 on: January 01, 2019, 04:54:06 PM »
The WSL feature can be enabled by either CUI or GUI. Microsoft (MS Japan too) instructs to enable it from the PowerShell but the control panel also has a switch as written in above tutorial.

Here is an English tutorial on installing the WSL through the GUI/Control Panel.
https://www.wikihow.com/Enable-the-Windows-Subsystem-for-Linux

Enjoy!

Derek