A guide to the MOTM/SOTM and how to use the LDrawMOTM Module.
(This is a work in progress)
The MOTM/SOTM contest is easy to run and with the development of the LDrawMOTM Module for our PostNuke system, is a little easier to integrate into the site.
How to set up a new contest:
1. Gather up all the new submitted entries. Ensure these entries conform to the rules as posted [4]. A couple of notes on this:
- MOTM entries must be a DAT or MPD file
- Check the file(s) provided for non-LEGO parts. This doesn't have to be a thorough scouring of the file, just a quick glance. Remember, unofficial LDraw LEGO parts/mockup are authorized, non-LEGO part are not.
- There is no size limit for SOTM images but resize rediculus huge picture down to something more reasonable
It is also adviseable to rename the filenames (LDraw files as well as images)accordingly to the entry's title, so that they are in sync. In addition you should add "SOTM_" (without quotes) to the scene pictures. This will ease compiling the MOTM database and avoid confusion.
2. Render the MOTM entries. LDGLite has been the renderer of choice for while now. I have created a batch file to automate much of this process. In addition to LDGLite, it requires Imagemagick to be installed. All that needs to be done is to adjust the program paths in the script:
for %%a in ("MOTM_*.dat","MOTM_*.ldr","MOTM_*.mpd" ) do "D:\Lego\LDRAW Viewers\LDGLite\ldglite" %%a -fh -v10240,7680 -s2 -z-6000 -Z6000 -i1 -q -cg25,45,0 -mF%%~na1.png
for %%a in ("MOTM_*.dat","MOTM_*.ldr","MOTM_*.mpd" ) do "D:\Lego\LDRAW Viewers\LDGLite\ldglite" %%a -fh -v10240,7680 -s2 -z-6000 -Z6000 -i1 -q -cg-25,225,0 -mF%%~na2.png
for %%a in ("MOTM_*.png") do "C:\Program Files\ImageMagick\mogrify" -geometry 800x %%a
Note that the script only renders LDraw file that begin with "MOTM_". This allows unofficial file to reside in the same directory and the script will skip them.
The following is an explanation of the above script:
"for %%a in ("MOTM_*.dat","MOTM_*.ldr","MOTM_*.mpd" )", this tells windows to find all the DAT, LDR, and MPD file that start with "MOTM_" and run through them sequentially assigning the file name to the varible %%a
"do "D:\Lego\LDRAW Viewers\LDGLite\ldglite" %%a", this calls LDGLite and gives it the filename in %%a
"-fh", turn on shading in LDGLite
"-s2", scales the model up by a factor of 2
"-v10240,7680 -z-6000 -Z6000", since we scaled the model up by 2 we need to adjust the render window that LDGLite uses in order to prevent clipping of larger models
"-i1", sets the LDGLite output to PNG
"-q", enables anti-aliased lines
"-cg25,45,0", sets the camera position
"-mF%%~na1.png", set the output image file name and tells LDGLite to do an offsceen render of the entire model (as opposed to the default behavior of LDGLite which is to render each model step)
"for %%a in ("MOTM_*.png") do "C:\Program Files\ImageMagick\mogrify" -geometry 800x %%a", tell windows to find all the images we just created with LDGLite and feed them sequentiall to the Imagemagick program mogrify. Mogrify then scales proportionally scales down the image ("-geometry 800x") so the width is 800 pixels.
Alternatively you might use a batch file for LDView:
set LDVIEW_EXE="C:\Programme\MLCad\LDView\LDView.exe"
for %%a in ("MOTM_*.dat","MOTM_*.ldr","MOTM_*.mpd" ) do %LDVIEW_EXE% "%%a" "-SaveSnapshot=%%~na1.png" -PreferenceSet=MOTM -SaveActualSize=0 -SaveImageType=1 -SaveZoomToFit=1 -SaveWidth=1600 -SaveHeight=6000 -AutoCrop=1 -DefaultLatLong=25,45
for %%a in ("MOTM_*.dat","MOTM_*.ldr","MOTM_*.mpd" ) do %LDVIEW_EXE% "%%a" "-SaveSnapshot=%%~na2.png" -PreferenceSet=MOTM -SaveActualSize=0 -SaveImageType=1 -SaveZoomToFit=1 -SaveWidth=1600 -SaveHeight=6000 -AutoCrop=1 -DefaultLatLong=-25,225
You might structure your file by adding blanks between the single commands but do NOT interrupt the rows manually. A detailed instruction can be found at: http://www.holly-wood.it/ldview/batch-en.html [5]. Note that the tutorial differs in the preference set settings. the following settings has been used for:
Antialiased lines=On
Background color=White
Default color=Light Gray
Process ldconfig.ldr=Off
Show frame rate=Off
Show errors after loading=Off
Fullscreen refresh override=Off
Field of view=20
Memory usage=Low
Seam Width=Off
Wirefame=Off
BFC=Off
Edge Lines=On
Show edges only=Off
Conditional lines=Off
High Quality=On
Always black=Off
Thickness=1
Lightning=On
High quality=On
Subdued=On
Specular highlight=Off
Alternative setup=Off
Wireframe cutaway=Off
Stereo=Off
Sort=On
Stipple=Off
Flat shading=Off
Smooth curves=Off
Primitive substitution=On
Texture studes=Off
Curve quality=2
Low quality studs=Off
Use hi-res primitives when available=On
The following is an explanation of the above script:
"set LDVIEW_EXE=", sets a variable for LDView's full path
"-PreferenceSet=MOTM", you will have to create a preference set in LDView called MOTM with the settings above
"-SaveImageType=1", sets the image type to PNG
"-SaveZoomToFit=1", the resulting image will be zoomed to fit
"-SaveWidth=1600", the saved image will be 1600 pixel wide
"-SaveHeight=6000", the saved image will be 6000 pixel high
"-AutoCrop=1", auto-crop snapshot so that the image is only as big as it needs to be to display the model
"-DefaultLatLong=", equivalent to -cg in L3P
Use a picture program to scales down the image portionally so that the final width is 800 pixels.
3. Add the images to the appropriate Gallery folder. Currently the contest gallery is loacated here:
http://www.ldraw.org/modules/gallery/album29
4. Add the entries to the MOTM database. The submission form is pretty straight forward. Use the picture gallery deeplink for the large picture and add ".sized" and ".thumb" to the filename for the medium and small pictures. Example:
Large: /gallery/MOTM1999/m1999_11_kingsley_large.jpg
Medium: /gallery/MOTM1999/m1999_11_kingsley_large.sized.jpg
Small: /gallery/MOTM1999/m1999_11_kingsley_large.thumb.jpg
Sometimes a picture is small enough that a medium image is not created. In this case simply use the large picture for both the medium and large images.
5. Create the ballot. Again the form for this is pretty straight forward.
6. Activate the ballot and when the contest is done, update the winning entries and the rest of the pages should auto update.
See the following for a list of meta-statements for the MOTM module:
http://www.ldraw.org/article/379
7. Upload the pictures to:
Flickr - account name: ldraw.webmasters
Brickshelf [6] - account name: ldraw
Create a new folder and name it: LDraw-MOTM-<mmm>-<yyyy>
where:
<mmmm> is the name of the month: Oct, Nov, Jan
<yyyy> is the year: 2007
Youbrick - account name: ldraw.webmasters
Create Create a new folder and name it: LDraw Model/Scene/Part Of The Month Contest - <mmmm> - <yyyy>
where:
<mmmm> is the name of the month: October
<yyyy> is the year: 2007</yyyy></mmmm></yyyy></mmmm></yyyy></mmmm></yyyy></mmm>