|
|
(39 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| === crontab on MacOS === | | ==Redesign of VTK== |
| * Example
| | The next version of VTK will support OpenGL 2.0 and GPU Filters. |
| crontab -e
| | The illustration below shows the new Rendering Pipeline of VTK. |
| 00 20 * * * ctest -S myScript.cmake > myScript.log 2>&1
| |
|
| |
|
| * Problem:
| | [[Image:ShaderDeviceAdapter.png]] |
| When I create a cronjob with
| |
| crontab -e
| |
| I get the error message:
| |
| crontab: temp file must be edited in place
| |
|
| |
|
| * Solution:
| | ==Streamline Visualization on the GPU== |
| Use the 'nobackup' option in VI:
| | Lines are converted to Triangle Strips on the CPU. |
| :set nobackup
| | Then the Vertex Shader orients the triangle strips to face the camera. |
| :set nowritebackup
| | Finally the Fragment Shader colors the pixels based on the reflection equation on a cylinder. |
| crontab: installing new crontab
| | The resulting image can be textured with arrows, text, or numbers to convey additional information. |
|
| |
|
| === Install X11 on MacOS ===
| | [[Image:TubePainter.png]] |
| To install ParaView-2.4.4, you need to install X11.
| |
| * Insert 'Mac OS X Install Disc 1'
| |
| * Scroll down to 'Optional Installs'
| |
| * Click 'Continue', 'Continue', 'Accept'
| |
| * Select 'Applications', click on the arrow in front of Applications
| |
| * Select 'X11'
| |
| * Click 'Upgrade', enter your password, click 'Ok'
| |
|
| |
|
| === Setup CMake for ICC === | | ==Streamlines with a cylinder reflection model== |
| To configure a project to use the Intel compiler icc,
| | The Vertex Shader orients the triangle strips toward the camera. |
| set CC and CXX *before* you run cmake.
| | The FragmentShader applies a cylinder reflection model to give this tube appearance. |
| Type is the terminal:
| | [[Image:TestTubeActorStreamLines.png]] |
|
| |
|
| CFLAGS= CXXFLAGS=
| | ==Streamlines with arrows== |
| CC=/opt/intel_cc_81/bin/icc
| | The Fragment Shader creates a triangle and orients it based on the value of a vertex attribute. |
| CXX=/opt/intel_cc_81/bin/icpc
| |
|
| |
|
| Then run cmake or ccmake.
| | [[Image:TestArrowTubeActor.png]] |
|
| |
|
| === Headers for Cross-platform Projects === | | ==Streamlines with RGBA texture== |
| | The Fragment Shader applies a texture on the streamlines to visualize additional information. |
|
| |
|
| #include <stdio.h> // for sscanf
| | [[Image:TestTextureTubeActor.png]] |
|
| |
|
| === Install Qt OpenSource for VCExpress (VS2005) === | | ==Streamlines with numbers== |
| * Install VCExpress AND Platform SDK
| | Note that the numbers are oriented correctly on the Vertex Shader. The text always faces the camera even during rotations. |
| http://msdn.microsoft.com/vstudio/express/visualc/download/
| |
| * Using Windows Unzip, extract qt-win-opensource-src-4.2.2.zip and acs-4.2.2-patch1.zip to c:/qt/qt-win-opensource-src-4.2.2
| |
| http://www.paraview.org/Wiki/Obtaining_GPL'ed_Qt_for_Windows
| |
| * Edit C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat
| |
| * Add path to Platform SDK bin, include and lib:
| |
| C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin
| |
| C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
| |
| C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib
| |
| * Launch Cygwin.exe, and apply the following patch
| |
| patch -p1 -i qtwin_patch\msvc_bcc32_42.patch
| |
| * Launch Start > All Programs > Visual C++ Express Edition > Visual Studio Tools > Visual Studio 2005 Command Prompt
| |
| * cd ..; cd qt; cd qt-win-opensource-src-4.2.2
| |
| * Configure Qt and answer yes to all questions
| |
| qconfigure.bat msvc2005
| |
| * Configure ParaView3 using CMake; Compile using MSVC2005
| |
|
| |
|
| ===Install Qt OpenSource for Mac===
| | [[Image:TestCellIdAnimation.gif]] |
| * Build for Debug
| |
| cp -r qt-mac-opensource-4.2.2 ~/qt-4.2.2-debug
| |
| cd ~/qt-4.2.2-debug
| |
| ./configure -debug -prefix /usr/local/qt-4.2.2-debug
| |
| yes
| |
| make
| |
| sudo make install
| |
| * Build for Release
| |
| cp -r qt-mac-opensource-4.2.2 ~/qt-4.2.2-release
| |
| cd ~/qt-4.2.2-release
| |
| ./configure -prefix /usr/local/qt-4.2.2-release
| |
| yes
| |
| make
| |
| sudo make install
| |
|
| |
|
| ===Change shell in Debian===
| | Close up on the texture of the streamlines. |
| chsh
| |
| type your password
| |
| logout and login again.
| |
| set up the .zshrc file.
| |
| in your .zshrc, add:
| |
| CXX=/usr/bin/g++
| |
| CC=/usr/bin/gcc
| |
|
| |
|
| ===Associate hostname with IP address for SSH===
| | [[Image:TestCellIdTubeActor1.png]] |
| * Dynamic way:
| |
| Add in /etc/dhcp3/dhclient.conf
| |
| send host-name "<your_host_name>";
| |
| * Static way: (not as good)
| |
| Add IP address and hostname in /etc/hosts (Linux) or
| |
| C:/WINDOWS/system32/drivers/etc/hosts (Cygwin):
| |
| 102.54.94.97 rhino.acme.com # source server
| |
| 38.25.63.10 x.acme.com # x client host
| |
| * On Debian, install openssh-server
| |
|
| |
|
| ===SSH without password=== | | ==Streamlines with a varying radius== |
| Add to .ssh/config
| |
| Host <remote_host_name>
| |
| User <your_user_name_on_remote_host>
| |
| ===Debian Setup===
| |
| Check http://wiki.debian.org/
| |
| boot: expert
| |
| Primary network interface: eth0: ADMtek NC100 Network Everywhere Fast Ethernet 10/100
| |
| DHCP
| |
| single partition
| |
| Install the kernel linux-image-2.6-686
| |
| Debian mirror: France - fr.debian.org
| |
| Use non-free software
| |
| Choose software to install:
| |
| Desktop environment
| |
| Web server
| |
| SQL server (forgot to do that one!)
| |
| Standard system
| |
|
| |
|
| ===BuGLe setup on Debian===
| | [[Image:TestStreamLinesVaryingRadius.png]] |
| * Install NVIDIA drivers: http://wiki.debian.org/NvidiaGraphicsDrivers
| |
| * Install packages libgtkglext1-dev and nvidia-glx-dev
| |
| mkdir ~/.bugle
| |
| cp ~/bugle-0.0.20070217/doc/examples/filters ~/.bugle
| |
| | |
| Run bugle:
| |
| BUGLE_CHAIN=trace LD_PRELOAD=/usr/local/lib/libbugle.so glxgears
| |
| Look at /tmp/bugle.log
| |
| | |
| Debugger from command line and debugger with GUI:
| |
| gldb glxgears
| |
| gldb-gui glxgears
| |
| | |
| ===VI setup===
| |
| Install package vi-gtk
| |
| Edit your ~/.vimrc
| |
| colorscheme torte
| |
| Create a plugin directory if it does not exist:
| |
| mkdir ~/.vim
| |
| mkdir ~/.vim/plugin
| |
| Download the a.vim into the plugin directory
| |
| http://www.vim.org/scripts/script.php?script_id=31
| |
| Restart gvim.
| |
| | |
| ===VI Convert tabs to spaces (copied from http://www.gammon.com.au/smaug/vi.htm)===
| |
| Type a VI command using ':set'
| |
| Set tabs to every 2 characters :set ts=2
| |
| Convert tabs to spaces in future :set et
| |
| Do not expand tabs :set noet
| |
| Fix existing tabs (convert to spaces) :%retab
| |
| Show tabs visually, and end-of-lines :set list
| |
| Do not show tabs and end-of-lines :set nolist
| |
| Or add those commands to your ~/.vimrc
| |
| set textwidth=78 "wrap lines longer than this length
| |
| set tabstop=2 "tabs stops every 2 characters
| |
| set shiftwidth=2 "size of a tab
| |
| set expandtab "tabs to spaces
| |
| | |
| ===Building CMake on Debian===
| |
| Install curses
| |
| apt-get install curses5-dev
| |
| | |
| ===Debian package for dos2unix===
| |
| apt-get install tofrodos
| |
| | |
| ===Build VTK for Release===
| |
| To create an executable that contains all the libraries,
| |
| so you don't need to ship the dlls with it:
| |
| CMake options:
| |
| Build Static
| |
| Replace /MD with /MT
| |
| VC Express options:
| |
| Build Release
| |
| | |
| ===Mount on Linux using Samba===
| |
| 1. Create mount points .
| |
| mkdir /mnt/nas2 /mnt/ruwenda /mnt/nas3
| |
| | |
| 2.
| |
| add the following lines to your /etc/fstab file :
| |
| //kitwarenas2/Share /mnt/nas2 smbfs defaults,guest,rw 0 0
| |
| //ruwenda/E /mnt/ruwenda smbfs defaults,guest,rw 0 0
| |
| //kitwarenas3:/Share /mnt/nas3 nfs rw,user,exec,noauto 0 0
| |
| | |
| 3. Mount each of them as
| |
| mount /mnt/nas2
| |
| | |
| ===Restore Wiki page===
| |
| History > Compare versions > Undo > Save page
| |
| | |
| ===Build VTK with Offscreen Rendering on Linux===
| |
| OSMesa (Off Screen Mesa) is a library that does rendering and does not need a graphics context.
| |
| You can use it on a server that does not have a graphics card or any graphics capability.
| |
| To use VTK with OffScreen Rendering on Linux, you need to compile VTK with the OSMesa option on.
| |
| Configure VTK using CMake.
| |
| Hit 't' for Advanced Options
| |
| Turn VTK_OPENGL_HAS_OSMESA ON
| |
| Hit 'c' to configure again.
| |
| Set path to include dir and library:
| |
| OSMESA_INCLUDE_DIR
| |
| OSMESA_LIBRARY
| |
| Turn VTK_USE_OFFSCREEN ON if you want offscreen by default.
| |
| | |
| If you built Mesa from source and link to it, your dependencies should be ok.
| |
| If you installed the OSMesa packages for Debian and did not build VTK from scratch,
| |
| your dependencies might be messed up.
| |
| Then once you have configured your CMakeLists.txt,
| |
| check that this CMakeLists.txt variable is set to zero, and then type make:
| |
| VTK_USE_GLX_GET_PROC_ADDRESS_ARB:INTERNAL=0
| |
| | |
| On Debian, I installed:
| |
| libosmesa6
| |
| libosmesa6-dev
| |
| | |
| To check if Mesa was installed correctly, you can type in a terminal:
| |
| | |
| $ glxinfo | grep renderer
| |
| OpenGL renderer string: Mesa X11
| |
| | |
| It should return the line above.
| |
| In case you get the Nvidia drivers for example, then Mesa was not installed correctly.
| |
| To get info about OpenGL libraries used by a VTK 6.0 build, you can use the test LoadOpenGLExtensions.
| |
| | |
| When you run your VTK code with Mesa, you can turn offscreen rendering on in your application:
| |
| RenderWindow->OffScreenRenderingOn();
| |
| and no render window will pop up.
| |
| | |
| To generate screenshots, use:
| |
| vtkWindowToImageFilter.
| |
| | |
| ==Install Nvidia drivers for Debian Testing 2.6.21==
| |
| apt-get install gcc linux-libc-dev x-dev libxt-dev mesa-utils
| |
| | |
| The Linux Nvidia drivers from www.nvidia.com *fails* for Debian Testing 2.6.21: NVIDIA-Linux-x86-100.14.11-pkg1.run
| |
| I got ERROR: Unable to build the NVIDIA kernel module.
| |
| Then I follow this: http://grizach.sc18.info/nvpatch/
| |
| apt-get install libc-dev linux-headers-$(uname -r)
| |
| CTRL-ALT-F1
| |
| login: root
| |
| killall gdm
| |
| sh ./NVIDIA-Linux-x86-100.14.11-pkg1.run -k $(uname -r)
| |
| Please read the following LICENSE... Accept
| |
| No precompiled kernel...? Yes
| |
| No matching precompiled kernel...? Yes
| |
| | |
| ==glxinfo and glxgears packages==
| |
| apt-get install mesa-utils
| |
| | |
| ==Change runlevel on Debian==
| |
| My system has to start on runlevel 3.
| |
| vim /etc/inittab
| |
| # The default runlevel
| |
| id:3:initdefault:
| |