3dsmax.exe command line switches - command-line

Is there an exhaustive list of commandline switched for the 3dsmax.exe. I'm particularly interested in the -server and -pipe switch as I want to reroute some 3dsmax argument calls.
Basicly I have a stand-in 3dsmax.exe, that reroutes all info to the 3dsmax.orig.exe including arguments, all goed well, but backburner/netrender doesn't accept the new exe, I'm thinking I'm not passing on the args well enough. But something else can be the problem too.
Any suggestions or solutions are most welcome!

Don't you have to use 3dsmaxcmd.exe for this?
To view a list of sample command lines with descriptions of what they do:
The 3dsmaxcmd.exe file also has an extensive list of sample text strings that describe many of the most common scenarios you'd use command-line rendering to accomplish.
1.
Open a command prompt window.
2.
Enter the following: “c:\program files\autodesk\3dsmaxXXX\3dsmaxcmd” -x and press Enter.
All control characters map to the Windows Regional settings standards.
Date format control chars:
d Day of month as digits with no leading zero for single-digit days.
dd Day of month as digits with leading zero for single-digit days.
ddd Day of week as a three-letter abbreviation. The function uses the
LOCALE_SABBREVDAYNAME value associated with the specified locale.
dddd Day of week as its full name. The function uses the LOCALE_SDAYNAME
value associated with the specified locale.
M Month as digits with no leading zero for single-digit months.
MM Month as digits with leading zero for single-digit months.
MMM Month as a three-letter abbreviation. The function uses the
LOCALE_SABBREVMONTHNAME value associated with the specified locale.
MMMM Month as its full name. The function uses the LOCALE_SMONTHNAME
value associated with the specified locale.
y Year as last two digits, but with no leading zero for years less
than 10.
yy Year as last two digits, but with leading zero for years less
than 10.
yyyy Year represented by full four digits.
Time format control chars:
h Hours with no leading zero for single-digit hours; 12-hour clock.
hh Hours with leading zero for single-digit hours; 12-hour clock.
H Hours with no leading zero for single-digit hours; 24-hour clock.
HH Hours with leading zero for single-digit hours; 24-hour clock.
m Minutes with no leading zero for single-digit minutes.
mm Minutes with leading zero for single-digit minutes.
s Seconds with no leading zero for single-digit seconds.
ss Seconds with leading zero for single-digit seconds.
t One character time-marker string, such as A or P.
tt Multicharacter time-marker string, such as AM or PM.
-BACKBURNER JOB SUBMISSION-
you want to submit a job to backburner, you can optionally give a manager
me, otherwise it will perform a default search for the manager. You can
tionally specify the manager's port number and, for searches, a netmask.
suming the manager's network name is mgr_machine:
3dsmaxcmd scene.max -submit
3dsmaxcmd scene.max -submit -netmask:255.255.0.0
3dsmaxcmd scene.max -submit:mgr_machine
3dsmaxcmd scene.max -submit:mgr_machine -port:1234
you want to change the job name and submit it to the network queue
initially suspended:
3dsmaxcmd scene.max -submit -jobName:"My Job" -suspended
default, a 32-bit 3dsmaxcmd.exe will submit jobs to 32-bit servers, and
64-bit 3dsmaxcmd.exe will submit jobs to 64-bit servers. You can optionally
bmit a job to a platform other than the default. To submit a job to 64-bit
rvers from a 32-bit 3dsmaxcmd.exe:
3dsmaxcmd scene.max -submit -platform:64
bmit a strip render job to the network. Job uses 4 strips, and an overlap
10 pixels between each strip:
3dsmaxcmd scene.max -submit -split:4,10
nder a single strip locally. Render strip number 2 of 4, using an overlap
10 pixels between each strip:
3dsmaxcmd scene.max -strip:4,10,2
itch together a set of strips rendered locally. Stitch a frame rendered
ing 4 strips and an overlap of 10 pixels between each strip:
3dsmaxcmd scene.max -stitch:4,10
default, timeout values for waiting for max to load, render, and unload
e the same as those found in the Advanced settings of the Network Job
signment dialog in max. To specify timeout values (minutes) when submitting
job:
3dsmaxcmd scene.max -submit -waitLoad:20 -waitRender:300 -waitUnload:10
you want to generate a job description xml file so you can edit it:
ny command line options specified will be included in the job file)
3dsmaxcmd scene.max -writeJobFile
ad a pre-existing job description file and render it:
3dsmaxcmd scene.max -readJobFile:scene.xml
A
smaxcmd [options] scene_file
-BASIC OPTIONS-
-? - This help
-x - Show examples
-v:<0-5> - Verbose level, 0-5
#<filename> - Command line options in a file
OR -cmdFile:<filename>
-preset:<filename> - Render preset file
OR -rps:<filename>
-sceneState:<scene-state-name> - Load a scene state before rendering
-batchRender - Render all enabled batch renders
-batchRender:<batch-render-name> - Render batch render named
batch-render-name
-preRenderScript:<filename> - Pre-render script file
OR -script:<filename>
-postRenderScript:<filename> - Post-render script file
-workPath:<pathname> - Work path
Root location for job data folders
-pathFile:<filename> - A path configuration file (.mxp)
-workingFolder:<filename> - A path to a directory to be used as th
Working Folder for the application
session
-split:<strips,overlap> - Split render;
strip count and overlap
-strip:<strips,overlap,strip> - Single strip, rendered locally;
strip count, overlap, and strip number
-stitch:<strips,overlap> - Stitch strips rendered locally;
strip count and overlap
-dateFormat:<dateformat> - Specify a date format to be used
in message timestamp
defaults to locale-dependent format
-timeFormat:<timeFormat> - Specify a time format to be used
in message timestamp
defaults to locale-dependent format
and 24-hour clock
-RENDER PARAMETERS-
-outputName:<filename> - Render output filename
OR -o:<filename>
-camera:<string> - Render camera
OR -cam:<string>
-width:<integer> - Output width
OR -w:<integer>
-height:<integer> - Output height
OR -h:<integer>
-pixelAspect:<number> - Pixel aspect ratio
-start:<integer> - Sequence start frame
-end:<integer> - Sequence end frame
-nthFrame:<integer> - Every nth frame value
-frames:<string> - Frames list (1,3,5-12), or "all"
-stillFrame - Indicates that this is a still frame
OR -sf render; no frame suffix will be added
to output filename
-imageSequenceFile:<0/1/2> - Image sequence file creation,
0=none, 1=.imsq, 2=.ifl
-gammaCorrection:<1/0> - Toggle gamma correction
-gammaValueIn:<number> - Input gamma value
-gammaValueOut:<number> - Output gamma value
-continueOnError - If an error is encountered, an attempt
to continue is made
-videopostJob:<1/0> - Apply Videopost to the scene
-RENDER FLAGS-
-showRFW:<0/1> - Show/hide Render Frame Window
OR -rfw:<0/1> during render
-skipRenderedFrames:<1/0> - Toggle skip existing images
-videoColorCheck:<1/0> - Toggle video Color Check
-force2Sided:<1/0> - Toggle force 2 sided
-renderHidden:<1/0> - Toggle render hidden
-atmospherics:<1/0> - Toggle atmospherics
-superBlack:<1/0> - Toggle super black
-renderFields:<1/0> - Toggle render to fields
-fieldOrder:<even/odd> - Field order
-displacements:<1/0> - Toggle displacement mapping
-effects:<1/0> - Toggle render effects
-useAreaLights:<1/0> - Toggle area lights/shadows
-useAdvLight:<1/0> - Toggle use advanced lighting
-computeAdvLight:<1/0> - Toggle compute advanced lighting
-ditherPaletted:<1/0> - Toggle output dithering (paletted)
-ditherTrueColor:<1/0> - Toggle output dithering (true color)
-renderElements:<1/0> - Toggle render elements
-BACKBURNER JOB SUBMISSION-
-submit[:manager_name] - Submit to Backburner
OR -s[:manager_name]
-port:<integer> - Manager port number
-netmask:<string> - Network mask other than 255.255.255.0
-jobName:<string> - Job name
-priority:<integer> - Job priority
-suspended - Toggle initially suspended
-writeJobFile - Write all job settings to xml file
-readJobFile:<filename> - Read all job settings from xml file
-waitLoad:<integer> - Timeout (minutes) for max to load
-waitUnload:<integer> - Timeout (minutes) for max to unload
-waitRender:<integer> - Timeout (minutes) for max to render
-platform:<32/64> - Override the job to 32-bit or 64-bit
-BITMAP PARAMETERS-
-BMP_TYPE:<2/8> - .BMP type, 2=paletted, 8=true 24
-JPEG_QUALITY:<1-100> - .JPG quality value
-JPEG_SMOOTHING:<1-100> - .JPG smoothing value
-TARGA_COLORDEPTH:<16/24/32> - .TGA color bitdepth
-TARGA_COMPRESSED:<1/0> - .TGA compression on/off
-TARGA_ALPHASPLIT:<1/0> - .TGA alpha split on/off
-TARGA_PREMULTALPHA:<1/0> - .TGA premultiplied alpha on/off
-TIF_TYPE:<0/1/2/3/4> - .TIF type,
mono/8-bit color/logl/logluv/
16-bit color
-TIF_ALPHA:<1/0> - .TIF alpha on/off
-TIF_COMPRESSION:<1/0> - .TIF compression on/off
-TIF_DPI:<number> - .TIF dots-per-inch value
For each of the following there is a corresponding -RPF_xxx option
-RLA_COLORDEPTH:<8/16/32> - .RLA color bitdepth
-RLA_ALPHA:<1/0> - .RLA alpha on/off
-RLA_PREMULTALPHA:<1/0> - .RLA premultiplied alpha on/off
-RLA_DESCRIPTION:<string> - .RLA description (in quotes)
-RLA_AUTHOR:<string> - .RLA author name (in quotes)
-RLA_ZDEPTHCHANNEL:<1/0> - .RLA z-depth channel on/off
-RLA_MTLIDCHANNEL:<1/0> - .RLA material ID channel on/off
-RLA_OBJECTIDCHANNEL:<1/0> - .RLA object ID channel on/off
-RLA_UVCHANNEL:<1/0> - .RLA UV coordinates channel on/off
-RLA_NORMALCHANNEL:<1/0> - .RLA surface normals channel on/off
-RLA_NONCLAMPEDCOLORCHANNEL:<1/0> - .RLA non-clamped color channel on/off
-RLA_COVERAGECHANNEL:<1/0> - .RLA coverage channel on/off
For each of the RLA options above, there is a corresponding -RPF_xxx option,
plus the following which are specific to RPF and unavailable for RLA
-RPF_NODERENDERIDCHANNEL - .RPF node render ID channel on/off
-RPF_COLORCHANNEL - .RPF color channel on/off
-RPF_TRANSPCHANNEL - .RPF transparency channel on/off
-RPF_VELOCCHANNEL - .RPF velocity channel on/off
-RPF_WEIGHTCHANNEL - .RPF sub-pixel weight channel on/off
-RPF_MASKCHANNEL - .RPF sub-pixel mask channel on/off
-EXR_BITDEPTH - .EXR main output layer bit depth
0 = float
1 = half float
2 = 8bits/channel integer
-EXR_COMPRESSIONTYPE - .EXR compression type
0 = no compression
1 = run length encoding
2 = zlib compression, one scan li
at a time
3 = zlib compression, in blocks o
6 scan lines
4 = piz-based wavelet compression
5 = lossy 24-bit float compressio
6 = lossy 4-by-4 pixel block comp
sion, fixed compression rate
7 = lossy 4-by-4 pixel block comp
sion, flat fields are compressed more
-EXR_STORAGETYPE - .EXR storage type
0 = Store Image as Scanlines
1 = Store Image as Tiles
-EXR_IMAGETYPE - .EXR main output layer image type
0 = rgba
1 = rgb
2 = mono
-OBSOLETE PARAMETERS-
The following flags are deprecated, but supported for backward compatibility
These flags are replaced by -pathFile:<filename> - see BASIC OPTIONS
-bitmapPath:<pathname> - Extra bitmap path for rendering
multiple path commands are allowed
-xrefPath:<pathname> - Extra xref path for rendering
multiple path commands are allowed
These flags are replaced by:
-RLA/RPF_ZCHANNEL:<1/0> - RLA/RPF_ZDEPTHCHANNEL:<1/0>+
-RLA/RPF_NODEIDCHANNEL:<1/0> - RLA/RPF_OBJECTIDCHANNEL:<1/0>+
-RLA/RPF_REALPIXCHANNEL:<1/0> - RLA/RPF_NONCLAMPEDCOLORCHANNEL:<1/0>+
The following flags are deprecated and no longer supported
-EXR_USEEXPONENT - .EXR Use exponent on/off
-EXR_EXPONENT - .EXR Exponent value (decimal)
-EXR_PREMULTALPHA - .EXR Pre-multiply alpha on/off
-EXR_ALPHA - .EXR Save alpha component on/off
-EXR_RED - .EXR Save red component on/off
-EXR_GREEN - .EXR Save green component on/off
-EXR_BLUE - .EXR Save blue component on/off
-EXR_USEFRAMENUMDIGITS - .EXR Use number of frame digits on/off
-EXR_FRAMENUMDIGITS - .EXR Number of frame digits (integer)
-EXR_USEREALPIX - .EXR Use RealPix RGB data on/off
Options are not case-sensitive
MAXScript names for rendering parameters and flags are accepted as alias,
where applicable.

Related

Decoding Keyence LJ-X8000 Bitmap-Height Image

I have a Keyence Line Laser System LJ-X 8000, that I use to scan the surface of different objects.
The Controller saves the height information as a bitmap, with each pixel representing one height value. After a lot of tinkering, I found out, that Keyence is not using the actual colors, rather than using the 24-Bit RGB-triplets as some form of binary storage. However, no combination of these bytes seems to work for me. Are there any common storage methods for 24-bit Integers?
To decode those values, I did a scan covering the whole measurement range of the scanner, including some out of range values in the beginning and the end. If you look at the distribution of the values of each color plane, you can see, that the first and third plane actually only use values up to 8/16 which means only 3/4 Bits. This is also visible in the image itself, as it mainly shows a green color.
I concluded that Keyence uses the full byte of the green color plane, 3 Bits of the first and 4 Bits of the last plane to store the height information. Keyence seems to have chosen some weird 15 Bit Integer Format to store their data.
With a little bit-shifting and knowing that the scanner has a valid range from [-2.2, 2.2], I was able to build the following simple little (Matlab-) script to calculate the height information for each pixel:
HeightValBin = bitshift(scanIm(:,:,2),7, 'uint16') ...
+ bitshift(scanIm(:,:,1),4, 'uint16')...
+ bitshift(scanIm(:,:,3),0, 'uint16');
scanBinValScaled = interp1([0,2^15], [-2.2, 2.2], double(scanBinVal));
Keyence offers a software to convert those .bmp into .csv-files, but without an API to automate the process. As I will have to deal with a lot of these files I needed to automate this process.
The calculated values from the rgb triplets are actually even more precise than the exported csv, as the csv only shows 4 digits after the decimal point.

GnuPlot - 2D chart doesn't mark double values [duplicate]

I want to plot some stockpile data.
The data is located in a csv-file and I already got an almost accurate plot, so reading from file isn't the problem.
set terminal pdf
set output "gnuplot/".MATNUM."-2012.pdf"
set datafile separator ";"
stats 'Stock-2012.csv' every ::4::18 using MATNUM nooutput
set border 3
set tics nomirror
set xzeroaxis
set xrange[0:14]
set xtics 1,1,13
set xtics rotate 90
set ylabel MATUNIT
maxplot = sprintf("Amount max:\n%.2f ".MATUNIT, STATS_max)
plot 'Stock-2012.csv' every ::4::18 using ($0+1):MATNUM:xticlabels(2) with linespoints title "Amount", STATS_max with lines lc rgb 'blue' title maxplot
Where MATNUM and MATUNIT are commandline arguments, representing materialnumber (which is the columntitle in the datafile) and the unit in which the material is measured.
The x-values in my datafile are decimals, but gnuplot seems to cut off the fractional digits. For example 12,98 (commata are used as decimal separator, because it's a german stockpile) results in a datapoint at y=12.
I'm not sure but I think this happens only at the maximum and minimum y-value, as STATS_max is an integer every time.
What can I do to get my points at the right y-value?
Unfortunately you did not show any data from you file, but I guess you are using commas as decimal separators. In that case you need to set the right decimal sign for reading the input. You can use e.g.
set decimalsign locale
or use an explicit locale (this must be installed)
set decimalsign locale "de_DE.UTF-8"
Note, that setting an explicit character with set decimalsign ',' does not work because it usually affects only the output format of e.g. tics, but not the input behaviour.

Dicom: Matlab versus ImageJ grey level

I am processing a group of DICOM images using both ImageJ and Matlab.
In order to do the processing, I need to find spots that have grey levels between 110 and 120 in an 8 bit-depth version of the image.
The thing is: The image that Matlab and ImageJ shows me are different, using the same source file.
I assume that one of them is performing some sort of conversion in the grey levels of it when reading or before displaying. But which one of them?
And in this case, how can I calibrate do so that they display the same image?
The following image shows a comparison of the image read.
In the case of the imageJ, I just opened the application and opened the DICOM image.
In the second case, I used the following MATLAB script:
[image] = dicomread('I1400001');
figure (1)
imshow(image,[]);
title('Original DICOM image');
So which one is changing the original image and if that's the case, how can I modify so that both version looks the same?
It appears that by default ImageJ uses the Window Center and Window Width tags in the DICOM header to perform window and level contrast adjustment on the raw pixel data before displaying it, whereas the MATLAB code is using the full range of data for the display. Taken from the ImageJ User's Guide:
16 Display Range of DICOM Images
With DICOM images, ImageJ sets the
initial display range based on the Window Center (0028, 1050) and
Window Width (0028, 1051) tags. Click Reset on the W&L or B&C window and the display range will be set to the minimum and maximum
pixel values.
So, setting ImageJ to use the full range of pixel values should give you an image to match the one displayed in MATLAB. Alternatively, you could use dicominfo in MATLAB to get those two tag values from the header, then apply window/leveling to the data before displaying it. Your code will probably look something like this (using the formula from the first link above):
img = dicomread('I1400001');
imgInfo = dicominfo('I1400001');
c = double(imgInfo.WindowCenter);
w = double(imgInfo.WindowWidth);
imgScaled = 255.*((double(img)-(c-0.5))/(w-1)+0.5); % Rescale the data
imgScaled = uint8(min(max(imgScaled, 0), 255)); % Clip the edges
Note that 1) double is used to convert to double precision to avoid integer arithmetic, 2) the data is assumed to be unsigned 8-bit integers (which is what the result is converted back to), and 3) I didn't use the variable name image because there is already a function with that name. ;)
A normalized CT image (e.g. after the modality LUT transformation) will have an intensity value ranging from -1024 to position 2000+ in the Hounsfield unit (HU). So, an image processing filter should work within this image data range. On the other hand, a RGB display driver can only display 256 shades of gray. To overcome this limitation, most typical medical viewers apply Window Leveling to create a view of the image where the anatomy of interest has the proper contrast to display in the RGB display driver (mapping the image data of interest to 256 or less shades of gray). One of the ways to define the Window Level settings is to use Window Center (0028,1050) and Window Width (0028,1051) tags. Also, a single CT image can have multiple Window Level values and each pair is basically a view of the anatomy of interest. So using view data for image processing, instead actual image data, may not produce consistent results.

How to write tiff image without alpha channel using RMagick

I'm trying to write a TIFF image with RMagick that tesseract can process. Tesseract objects if bits per pixel is > 32 or samples per pixel is other than 1, 3 or 4.
With the defaults, Image.write generates 3 (RGB) samples plus 1 alpha channel at 16-bits per sample for a total of 64 bits per pixel, violating the first constraint.
If I set the colorspace to GRAYColorspace as follows, it still outputs the alpha channel, giving two samples per pixel, violating the second constraint.
Image.write('image.tif) {self.colorspace = GRAYColorspace}
Per the RMagick documentation, the alpha channel is ignored on method operations unless specified, but even if I do self.channel(GREYChannel), the alpha channel is still output.
I know I can run convert on the file afterwards, but I'd like to find a solution that avoids that.
Here is the tiffinfo output for the file currently generated:
TIFF Directory at offset 0x9c48 (40008)
Image Width: 100 Image Length: 100
Bits/Sample: 16
Compression Scheme: None
Photometric Interpretation: min-is-black
Extra Samples: 1<unassoc-alpha>
FillOrder: msb-to-lsb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 2
Rows/Strip: 20
Planar Configuration: single image plane
Page Number: 0-1
DocumentName: image-gray-colorspace.tif
White Point: 0.3127-0.329
PrimaryChromaticities: 0.640000,0.330000,0.300000,0.600000,0.150000,0.060000

iOS 256 Colors (VGA) to RGB

I'd like to convert a VGA color (256 colors; 8 bit) to a RGB color on iOS.
Is it possible to compute this or do I have to use color tables (using CGColorSpaceCreateIndexed).
UIColor does not support 256 Colors.
Thanks :)
Somewhere, the title you're porting should have set the palette. On the VGA, the 256 colours are mapped through a table that the programmer has previously set to convert them into 18 bit RGB colour (at a uniform 6 bits per channel). If you're running the original title through emulation then watch for writes to ports 0x3c6, 0x3c8 and 0x3c9 or calls to the BIOS via int 10h, with ax = 0x1010 (to set a single colour) or 0x1012 (to set a range). If you have the original code, obviously look for the source of the palette table.
In drawing terms, you can keep the palette yourself, for example as a C-style array of 256 CGColorRefs, or use CGColorSpaceCreateIndexed as you suggest (ignore Apple's slight documentation error; the colour table can contain up to 256 entries, not up to 255) probably with a bitmap context to just pass your buffer off to CoreGraphics and forget about it.
I expect the remapping will be performed on the CPU, so if that gets a bit too costly then consider using GL ES 2.x and writing a suitable pixel shader — you'd upload your actual image as, say, a luminance (ie, single channel) texture, plus a 256x1 texture where the colour at each spot is a palette entry, then write a shader that reads from the first texture for the current texture coordinates and uses that value to index the second.