CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

offscreen rendering test

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 9, 2014, 11:11
Default Off-Screen Rendering Test
  #1
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Hi all,

I am trying to do a an offscreen rendering test, I am wondering if anyone could give it a try and see if it works on your system? Thanks. This is for offscreen rendering your velocity magnitude screenshot in the xy-plane.

(0). I trust you have installed your OpenFOAM already, also please also make sure openmpi installed, glibc should not be too small. If you are using ubuntu, then everything should be just fine.
(1). Download this executable
(2). Run a test case such as cavity flow from tutorial icoFoam. Extract and put this executable somewhere in your path, or put it under the cavity case folder for a test.
(3). Try run "offScreenRenderPro -h", see if it works, if it does, then you will see something like:
Code:
$ offScreenRenderPro -h

offScreenRenderPro (c) 2014 Daniel Wei
--------------------------------------
Get the latest velocity screenshot

Usage: offScreenRenderPro <option(s)>

Options:
        [-h],[--help]           Show help message
        [--PNG]                 Save screenshot as png format
        [--OSN]                 Turn off the offscreen rendering
        [-cx] CENTER.X()        Specify the x coor of the camera position and focal point
        [-cy] CENTER.Y()        Specify the y coor of the camera position and focal point
        [-cr] RADIUS            Specify the radius of the camera
        [-sx] IMAGESIZE.X()     Specify the x size of output image
        [-sy] IMAGESIZE.Y()     Specify the y size of output image
        [-o] OUTPUTFILENAME     Figure name without extension

Explanations:
        [+] VTK, boost needed if not statically built
        [+] Glibc version should be large enough
        [+] MUST run under the current case folder
        [+] Only PNG export is supported

        [+] Options are case insensitive
        [+] Options' leading dash could be one or more
        [+] Default cameral position is (0.0,0.0)
        [+] Default cameral focalPt is (0.0,0.0)
        [+] Default cameral view radius is 1.0
        [+] Default image size is 600x600. It should not larger than screensize (say, 900)
        [+] Radius means the square figure's half width
        [+] Default output figure format is png
        [+] Default output file name is screenshot.png
        [+] Single dashed options require an argument
        [+] Double dashed options do not require an argument

Examples:
        [+] offScreenRenderPro -cx 0.0 -cy 0.0 -cr 1
        [+] offScreenRenderPro -cx 0.0 -cy 0.0 -cr 1 -sx 900 -sy 900
(4). Then under the cavity case folder, run
Code:
./offScreenRenderPro -cx 0.5 -cy 0.5 -cr 0.5
There you go, you should be able to find the screenshot.png generated under your case folder now. It shows the latest time's velocity magnitude. 0.5 for cx and cy is because cavity dimension is [0~1], so we are putting our camera in the center of cavity. cr is 0.5, this means the screenshot size radius is 0.5. You can also change sx and sy if you want.

screenshot.png

Best,
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email

Last edited by lakeat; July 10, 2014 at 18:03.
lakeat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[General] Using offscreen rendering JPW ParaView 5 August 17, 2014 11:56
CFX-Pre problem, pls help!!! cth_yao CFX 0 February 17, 2012 00:52
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 13:43
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 07:21


All times are GMT -4. The time now is 06:41.