Jump to content

C3POwen

Eurobricks Citizen
  • Posts

    426
  • Joined

  • Last visited

Everything posted by C3POwen

  1. 30059 MTT [star Wars, 2012] LDR file According to Brickset, the set does not yet appear to have an official name, so I've used the official in-universe Star Wars name for the vehicle. Absolutely! LDD and LDraw both cater to different audiences, I guess. I used to use LDraw, went on to LDD for quite a while, and then back to LDraw. I prefer the plethora of "old" parts in LDraw (for which LDD is starting to catch up), the ability to produce relatively decent renders, and I'm not inhibited by LDD's collision detection (which can be a pain sometimes). I would say, however, that the only thing you'd really need to learn is something like MLCad, as it's used as a front-end to LDraw, and LDView is literally just a program designed to be able to view your virtual models in higher quality. There are also alternatives to MLCad, which suit people who don't like the way MLCad works. The POV-Ray stuff is just something you can do, and is not required at all. Incidentally, a question for legolijntje: I've created some LDraw models of the minikit models from the LEGO Star Wars/LEGO Batman games which, although not all released as real sets, could be considered semi-official. Would you recommend posting them here, a different thread in the "LEGO Digital Designer and other digital tools" forum, or posting them within their own respective areas (such as the Eurobricks Star Wars forum for the LEGO Star Wars models)?
  2. I'll put some things together for you in the guide regarding how long it takes me to produce the images currently shown. As for radiosity and HDR, I've not tried these out so wouldn't be able to give you an idea of how long it might take for a little while, until I have some time to actually play around with these settings. I've just added a REG file to the guide to accomplish this at your suggestion.
  3. It's actually done using LDView, as this has better support for transparency than MLCad's native view. I like the effect that LDD has on elements behind the transparent part, but LDView allows me to define custom LDraw colours for use in the output image so can get them a little more accurate. It's also a lot quicker than using POV-Ray!
  4. 6894 Invader [blacktron, 1987] MPD file (I'm working on a render, but the high amount of transparent elements is really slowing it down.) Edit: Updated with rendered model. Previous image can be found here.
  5. Well, I've given it a go and it does indeed seem to work, although there's a slight "halo" around the actual model itself if you use anti-aliasing, so it's worth rendering without anti-aliasing and then resizing the image in a graphics program afterwards. It also adds true alpha transparency to see-through elements, which is good to see. For those not sure where to add the +UA, it goes in the text box to the right of the resolution presets. Also, if you're using POV-Ray 3.6, which defaults to the BMP file format, enter +FN +UA to force a PNG file with transparency. I'll be adding this to the main guide soon. Thanks, @hrontos! NOTE: The guide has been updated with the above, as well as a bit more about lighting.
  6. Yes, as far as I'm aware. MegaPOV is just a branch of POV-Ray 3.6, so it should all work fine as long as the LGEO paths are set up correctly. From what I've read, MegaPOV also has some nifty effects that don't appear in POV-Ray, such as blurred reflections (which can be achieved in POV-Ray, but not so easily) which would be brilliant for things like the visor in 3365 Space Moon Buggy.
  7. I've not tried using that set of colours, but I know it requires a bit of customisation on the side of the user first. I'll be posting my set of colours soon, once I've completely updated it, and this should work with LDView-generated files without issue. Either one should be fine. They both require some manual setup (with 3.7 needing a little more), but are essentially the same program, except 3.7 can utilise more than one CPU.
  8. I've found that POV-Ray 3.7 has some gamma issues when rendering from the default LGEO library. I've got around this by adding a line to the "lg_color.inc" file, which can be located at "C:\Program Files\LDraw\LGEO\lg" (use "C:\Program Files (x86)\LDraw\LGEO\lg" for 64-bit Windows). You can open this using any text editor and, near the top of the file, insert the following: global_settings { assumed_gamma 2.2 } Save the file, close POV-Ray 3.7 and then restart it. You should find that the render in 3.7 is now almost identical. This is something that I need to add to the guide, as I'd completely forgotten I'd set that up after installing POV-Ray 3.7. Incidentally, you may need to add some new custom resolutions to your "quickres.ini" file, as your POV-Ray file looks like it's trying to create a 16:9 image. A few questions: Which version of POV-Ray are you using? If it's 3.7, then it may be the problem that @markg mentioned above. Do the other colours also look too bright or washed out? Are you using the fog function? If all of the colours look fine apart from the black, then it may be an issue with the colour definitions that are being used. Do you have an example *.pov file that I could look at? And perhaps an example image that you've created, so I can run a render and compare? If you're using fog, then you may need to increase the distance that it starts affecting the render.
  9. My LGEO directory is set as shown in the guide, which is the default for the LDraw All-In-One installer. As @Calabar says: I tried rendering the file you posted and it went through without issue, so I imagine that the POV-Ray INI file is not pointing to the correct location for the LGEO files. Perhaps run a search for "LGEO" on your C: drive and see what location it throws up, and then put this into the INI file, ensuring that you tell it to also look in the "ar" and "lg" folders.
  10. Unfortunately I've not tried L3P, so wouldn't be able to tell you what was going wrong. I've found that some POV-Ray files that are exported from LDView do bring up some errors. This is sometimes due to the colour of parts that it is trying to render having to be created for the POV-Ray file rather than being pulled from the LGEO library. I got around this by creating a custom colour file, which I will be posting soon. It also seems to misspell certain items, but I have not found a way around this without manually editing the file. If you want to give me a link to the file (via PM if you like), I can have a look at the POV-Ray file that LDView produced and see what was causing the issue.
  11. I shall certainly look into this, as getting proper PNG transparency with semi-transparent LEGO elements would be useful for adding custom backgrounds in a Photoshop-style program. I have to admit that I've yet to give radiosity and HDR lighting a go, but I shall certainly try at some point, and then update the guide. Does it increase rendering times by much? As @Calabar said, and I mentioned at the beginning, this is still a WIP, so some links don't currently work. I'm still working on the files for this section, to make sure they're all accurate and up-to-date. I've tried this, and it does produce very nice results (I've tried 5760x3240 resized to 1920x1080), as the default anti-alias option is not great. Of course, you can change this in the “quickres.ini” file to read Antialias_Threshold=0.0, but I believe this will really slow your renders down. It's a matter of what you want – speed or quality. @zinfinion's suggestion is a very good one, though. Also, any points that need annotations for Mac users, then please specify and I'll add notes.
  12. 8. Downloads 8.1. Fixed/new LGEO parts Firstly, the "lg_color.inc" and "LGEO.xml" files referenced in this guide are included in the below zip file. As I have created some new LGEO parts, rather than keep two separate versions of these files (one with new parts and one without) it makes sense to include everything in one download, which currently stands at just under 900 KB. Secondly, there are a few LGEO parts that either do not match the LDraw orientation properly or have other issues, and you'll be able to find those fixed files here. There are also a few other parts that are missing from the LGEO library that I have managed to adapt from other parts myself, which are included as well. "LGEO-Update.zip" (2014-01-16) - currently includes 162 new parts, 24 updated parts and 62 fixed parts, as well as a user guide. Most of the FIXED, UPDATED and NEW LGEO parts as of 2014-01-16 8.2. MLCad Parts Tree group file This file needs to be installed to the "C:\Program Files\LDraw\MLCad" folder, and is used to populate the parts tree shown on the left of MLCad. To make it work properly, first rename the old version of the file to something like "MLCad_old.grp" so that you have a backup. You then need to remove the appropriate key from the registry. I have created a file that will do this automatically, so just download the below file REG file to somewhere like the desktop and run it, confirming that you wish to merge the file. Once you have done this, copy the "MLCad.grp" file to the stated location, reopen MLCad and it should contain a new parts tree. I've arranged it so that the main elements you need are at the top in alphabetical order, then other elements following that, again in alphabetical order. I've removed printed bricks from the main bricks list, and these can be found in Other Parts > B. The Technic section contains all Technic parts, but I have created a couple of extra groups to make things easier to find. I've also separated out Minifig body parts and accessories. There is also an LSynth folder at the bottom, if you have that installed. "MLCad.grp" file "Delete MLCad Groups.reg" registry fix 9. More information There is an absolute wealth of information on rendering in POV-Ray, only some of which has been touched here. For some extra help in using POV-Ray, please see below: Official POV-Ray documentation Oracle ThinkQuest online tutorial Friedrich A. Lohmueller's POV-Ray guide Rendering transparent icons with POV-Ray: A guide on working with transparency. 10. Version history 2012-02-06: Initial post 2012-02-08: Added custom MLCad group file to Downloads section 2012-02-10: Added table of contents 2012-02-12: Added custom lighting, reflection and transparency to Rendering... section 2012-02-14: Added registry file for automatically removing MLCad groups to Downloads 2012-02-22: Added more information/link regarding transparency 2012-03-06: Divided into three posts for ease of editing 2012-04-16: Added "LGEO.xml" and "lg_color.inc" files to Downloads 2012-05-27: The "lg_color.inc" file in the Downloads section has been updated, so that transparent neon colours are not overly bright. 2012-06-03: Added section on Radiosity; started adding images of new example model; added some fixed/new LGEO parts to Downloads 2012-06-06: Updated downloadable LGEO parts in Downloads to zip file. 2012-06-20: Minor clarifications in the Radiosity section.
  13. I have posted the guide, although a little late, and it can be found here. It's not quite complete, and any suggestions are welcome. They're very nice looking renders, and very nice MOCs too! @whitew0lf: I like the lighting you've used on your renders, it reminds me of the guide that was posted on Brickshelf. What light setup did you use? Feel free to PM me if you wish, to avoid cluttering up this topic with rendering-related stuff as per Calabar's request on page 12.
  14. 7. Rendering your model in POV-Ray Assuming that POV-Ray is registered to automatically open .pov files when you double-click on them, navigate to the location of the .pov file that you created and open it. Alternatively, open POV-Ray from your Start menu or desktop, and locate the file by using the File > Open File... command. This will load the file and you will see that it mainly consists of text-based commands. To begin with, we’ll generate a render using the basic settings, so that we can get an idea of what our image will look like when it's done. Select your desired image resolution from the drop-down box just under the New and Open buttons. If you set 16:9 as the original exported aspect ratio from LDView, and if you set up some new image resolutions as shown under “Image resolution presets”, then ensure that you select the correct one. If you’d rather run a quick test of the render, then the lower the resolution the better. If you’re all ready to run, then press the green Run button. This will start rendering your image in a new window, and will show you the progress of the file. If you’re using POV-Ray 3.7 and you have a multi-CPU system, then you’ll find that it renders fairly quickly. Of course, rendering is a slow and intensive process anyway, so don’t expect it to happen too quickly. Once this has finished, you should have a render of your model, with three off-camera lights casting shadows on the floor. These are set to the LDView default locations, but they can be edited, and you can even create your own extra lights. More detailed information can be found at: http://library.thinkquest.org/3285/language/light.html?tql-iframe#light_source You may notice that these lights look quite harsh and the shadows may look unrealistic. This is where you would use an area light to improve things. The model rendered with default settings in POV-Ray, using my custom "lg_color.inc" file: Render time at 2880x1620: 0m 32s Note: Before going on to improve the lighting, rename the output file to something slightly different so that you can compare it with the next render. 7.1. Area lights The purpose of an area light is to soften any shadows that are cast across an image, as if being viewed under more natural conditions. These are actually fairly straightforward to set up, and only require a minimal amount of editing. In the tab that contains the code for your POV-Ray image, look for the section marked //Lights. If you’ve exported the file directly from LDView, it should look something like this: // Lights #ifndef (LDXSkipLight1) light_source { // Latitude,Longitude: 45,0,LDXRadius*2 <0*LDXRadius,-1.414214*LDXRadius,-1.414214*LDXRadius> + LDXCenter color rgb <1,1,1> } #end #ifndef (LDXSkipLight2) light_source { // Latitude,Longitude: 30,120,LDXRadius*2 <1.5*LDXRadius,-1*LDXRadius,0.866026*LDXRadius> + LDXCenter color rgb <1,1,1> } #end #ifndef (LDXSkipLight3) light_source { // Latitude,Longitude: 60,-120,LDXRadius*2 <-0.866025*LDXRadius,-1.732051*LDXRadius,0.5*LDXRadius> + LDXCenter color rgb <1,1,1> } #end A brief explanation of the above is this: light_source defines that you are creating a light. The line directly below that defines the location of your light source, and LDView uses the radius of the model to ensure the light is set at a suitable distance. After that, the color option simply defines the colour of the light, and is defined as a “float” value (which means that any value between 0 and 1 can be used to define the colour level, so pure red would be <1,0,0>). Everything that is marked with a # can essentially be ignored here. To turn these into area lights, you only need to add a few variables, for example: // Lights #ifndef (LDXSkipLight1) light_source { // Latitude,Longitude: 45,0,LDXRadius*2 <0*LDXRadius,-1.414214*LDXRadius,-1.414214*LDXRadius> + LDXCenter color rgb <1,1,1> area_light 200, 200, 10, 10 jitter } #end This simply changes the normal light into an area light that is 200 units in both width and length, and contains 10 light points along each axis, creating a grid. In this instance, as there are 10 light points along the width and length, this combines to create a total of 100 light points, which creates some nice smooth, realistic shadows. The jitter function stops "banding" in the shadowed areas, which clearly makes the final render look it was created virtually. jitter simply applies some randomisation to the shadow to make it look more realistic. Add the extra lines above to each light_source (as shown in the example), click Save and then click Run. This time you’ll find that the render takes a lot longer, especially if you have any large transparent elements in the model, such as windscreens which have complex shapes in them. This is because the area_light function is tracing many more rays across the model, which is more computationally intensive. Again, this will render in a separate window, and you’ll notice that any parts of the model that are visible already have more realistic lighting. Now, if you compare both final images, a difference will clearly be noticeable. The model rendered using default lighting, but with area lighting applied: Render time at 2880x1620: 36m 10s If you want to see what effect the jitter command has on area light shadows, try leaving it out of the light_source command and see how it looks when you render the image. 7.2. "The Fog" If you’ve exported your model from LDView at a fairly shallow angle, such as directly side on, then when you render the model you’ll see a dark horizon line in the distance. If your background colour is set to display as white, then this will be particularly noticeable. What you can do to improve things is use a fog effect in the distance. This is quite simple to set up, and I tend to use the following: // Fog fog { distance LDXRadius*25 color rgb 1 } The color is set to pure white as a float value, but can also be set in other ways: color rgb <1,1,1> and color rgb <255/255, 255/255, 255/255> will both produce the same results. The distance variable tells POV-Ray how far away in the distance at which 36.8% of the background is still visible. As the POV-Ray file contains a value for the radius of the model, I use this (LDXRadius) and multiply it by 25. This can vary, depending on the size of the model you use, so you may have to change this value to get the desired result. 7.3. Custom lighting Although area lighting adds some nice effects, I find that it can make some elements give off a lot of glare from certain angles. To get around this, you can create your own custom lighting. I use something based off the default light setup, but move one of the lights to be directly overhead and then add a new light to the side, so that the model doesn’t look too dark after it’s rendered. Like the fog function, this is more down to experimentation. This is the setup that I tend to use: // Lights light_source { <0*LDXRadius,-1.5*LDXRadius,-1.5*LDXRadius> + LDXCenter color rgb 0.75 area_light 200, 200, 10, 10 jitter } light_source { <1.5*LDXRadius,-1*LDXRadius,0.866026*LDXRadius> + LDXCenter color rgb 0.75 area_light 200, 200, 10, 10 jitter } light_source { // Custom light 1: Above <0,-2*LDXRadius,0> + LDXCenter color rgb 0.5 area_light 200, 200, 10, 10 jitter } light_source { // Custom light 2: Side <2*LDXRadius,-0*LDXRadius,-2*LDXRadius> + LDXCenter color rgb 0.5 area_light 200, 200, 10, 10 jitter } You may now find that the floor looks too dark, but I cover that in the next section. The model rendered using the above custom lighting setup: Render time at 2880x1620: 43m 04s Incidentally, the *.pov file that LDView creates uses -Y as up, which is the opposite of how POV-Ray normally works, so keep that in mind when creating custom lights. 7.4. Reflection To add a little more interest to a scene, I tend to add some reflection to the floor. If you’re rendering a model against a plain background and on a plain floor, the final result can look a little flat. LDView adds a floor to each render, which can be turned on or off, and the description for the floor is found at the end of the POV-Ray file and looks like this: // Floor #if (LDXFloor != 0) object { plane { LDXFloorAxis, LDXFloorLoc hollow } texture { pigment { color rgb <LDXFloorR,LDXFloorG,LDXFloorB> } finish { ambient LDXFloorAmb diffuse LDXFloorDif } } } #end To add some reflection, and change the ambient and diffuse settings, I replace the pigment and finish lines with this: pigment { color rgb 0.9 } finish { ambient 0.2 diffuse 0.5 reflection 0.05 } This tells POV-Ray that I’m using a light grey floor, as the RGB is set just below pure white (which would be a value of “1”), and that I’m using a tiny bit of reflection, with some custom ambient and diffuse settings. The values listed in the finish statement can be played around with, although I’d recommend doing this with low resolution images, so that you can re-render until you’re happy with it. By using the above, you should find that the floor now looks less dark and also shows a slight reflection of the rendered model. The model rendered with a reflective floor: Render time at 2880x1620: 47m 00s 7.5 Transparency It is possible to output an image with a transparent background, in case you wished to be able to add a custom background later using something like Photoshop. This can be applied with a simple switch, which is entered into the text box to the right of the dropdown of image resolutions. To enable it, you need to enter +UA, which turns this function on. To ensure that the output format is PNG, which supports transparency, enter +FN +UA which will also switch PNG output on. As POV-Ray 3.7 defaults to PNG output, you should only need the +UA switch when using this version. It is also important that you run the render with the floor turned off, as this will still render if it is enabled. You can switch this off by setting the LDXFloor value to 0 at the top of the file. The model rendered with a transparent background: Render time at 2880x1620: 29m 51s There is a lot that can be done with transparency, and I only cover the basics here. For more complex usage, please see More Information. Note: If you use anti-aliasing on an image with background transparency, you’ll get a “halo” of pixels around the final image the same colour as the original background, so it makes sense to render the image at a higher resolution without anti-aliasing and then use something like Photoshop to resize it afterwards. The background colour will also have an effect on your bricks, even though the background shows as transparent, so if you plan on overlaying an image with transparency on a dark background, it makes sense to use a dark background colour. 7.6 Radiosity Although area lighting makes a scene look more realistic over the default light setup produced by LDView, radiosity helps take that even further, giving more realistic shadows than area light does, as the light bounces around between parts. As of POV-Ray 3.5, a radiosity macro has been included by default, and this can be switched on with the addition of only a few lines. IMPORTANT: For using radiosity, I recommend using a fresh POV-Ray file, as you will not want the file to be populated with any of the previous settings shown in this guide. Firstly, you need to navigate to the beginning of your file, just under the initial portion that lists the LDView details (this is in green by default within POV-Ray). All you need to do then is paste in the following text: #version 3.7; #include "rad_def.inc" global_settings { max_trace_level 10 radiosity { Rad_Settings(Radiosity_Fast, on, off) } } light_source { // X, Y, Z <-1000, -1500, -1000> color rgb 0.5 area_light 200, 200, 10, 10 jitter } #declare LDXSkipLight1 = 1; #declare LDXSkipLight2 = 1; #declare LDXSkipLight3 = 1; Once pasted in, the version declaration should be changed to the version of POV-Ray that you're using (in this case POV-Ray 3.7). The #include line includes the file that lists POV-Ray's available radiosity macros. Following that is the global_settings field, which contains the radiosity declaration itself. There are a number of different macros that can be used, but by default I always use the Radiosity_Fast macro first, as this allows me to run a quick render to see how the scene will look. When rendering LEGO models, it is advisable to leave the "on, off" switches as they are. The next portion of the above code is an area light. In this instance I’m only using one light, which is located off to the left of the model. You can tinker with the coordinates to adjust the light’s position, or even add extra lights if you wish. For this tutorial, I’m using the above setting with only one light. I then usually change the floor settings to the following: // Floor #if (LDXFloor != 0) object { plane { LDXFloorAxis, LDXFloorLoc hollow } texture { pigment { color rgb 0.9 } finish { ambient 0 diffuse 0.9 reflection 0 } } } #end If you wish, you can change the reflection value to something like 0.05 to create a reflective floor. I recommend using a low resolution first as, like area lighting, radiosity can be fairly slow when rendering models with transparency. If you now run the render using the above settings, you should get the following result: Render time at 2880x1620: 12m 03s You may notice some visual artifacts (the floor around the tyres is a good example). This "blotching" is due to the radiosity process, and is reduced with higher-quality settings. If you’re happy with the result, you can then render it with a different radiosity setting at a higher resolution. Again, POV-Ray’s anti-aliasing isn’t great, so it makes sense to run a render that is much larger than you plan to use and then resize it in an image manipulation program afterwards. If I’m happy with my test render, I’ll tend to use the Radiosity_Final macro, as this can give very good results. This is the result of the same scene using the Radiosity_Final macro: Render time at 2880x1620: 33m 12s Again, you'll notice that the artifacts are less obvious now, although still there. If you're feeling adventurous, you could tinker with these settings directly within the rad_def.inc file to something you're happy with, but testing can take a long time, as can the render itself if you ramp your settings right up. You can also try out the other macros if Radiosity_Final is not quite to your liking. As they all have varying quality settings, render times can vary wildly. The complete list of available macros is as follows: Radiosity_Default Radiosity_Debug Radiosity_Fast Radiosity_Normal Radiosity_2Bounce Radiosity_Final Radiosity_OutdoorLQ Radiosity_OutdoorHQ Radiosity_OutdoorLight Radiosity_IndoorLQ Radiosity_IndoorHQ For more guidance on implementing radiosity, the POV-Ray wiki guide should prove useful, with a detailed breakdown of the individual radiosity settings that rad_def.inc utilizes.
  15. I was asked to put together a tutorial on rendering LDraw-produced models in POV-Ray in as clear and simple a way as possible. Although the following might seem a bit lengthy, I have tried to keep it clear, which is what caused it require a lot of explanation. I plan on updating things and changing things as time goes on and as people give me their input, so as to create a useful guide for everyone here on Eurobricks. NOTE: To give an idea of how long these images can take to render, I will be adding the render time of each image to the tutorial. As I don't rely on POV-Ray's anti-aliasing, I have rendered each image at 2880x1620 with AA set to off, and then crop and resize the image afterwards. For computer spec comparisons, I use an Intel Core i5 running at 2.67 GHz, with 4GB of RAM running at 1333 MHz and an NVIDIA GeForce GTX 460 with 1GB of RAM. I'm also using POV-Ray 3.7, which can take advantage of more than one CPU core. Contents Introduction Requirements MLCad (including LSynth and SR 3D Builder) Special files LDView Setting up POV-Ray Rendering your model in POV-Ray (including lighting and effects) Downloads More information Version history 1. Introduction Unlike LEGO’s own Digital Designer (LDD), which can currently only output an image of exactly what you can see within the LDD window, LEGO models created using LDraw can be turned into high-quality and, in some cases, photo-realistic images. This brief tutorial covers some of the basics of converting files created in LDraw and other compatible programs into something that looks almost real. As an example throughout this guide, I will be using a model I made in MLCad of the tipper from 4201 Loader and Tipper, which can be found here. 2. Requirements Regarding operating system, I currently use Windows 7, so this tutorial will be written to mainly accommodate Windows users, and I shall assume you are using a 32-bit version of Windows with the default installation path for LDraw. For anyone using a 64-bit version, when referencing folder paths please use “C:\Program Files (x86)” instead of “C:\Program Files”. Firstly, if you do not have it installed already, you need to install the LDraw All-In-One Installer, which contains the following programs required for this tutorial: The LDraw parts library MLCad, used for building the models LSynth [optional], a system for building flexible parts within MLCad LDView, used for converting models into a POV-Ray file LGEO, a parts library built specifically for POV-Ray POV-Ray, a ray-tracer that can render 3D models in high-quality You can find the installer here: http://www.ldraw.org/ This will install everything within the "C:\Program Files\LDRAW" folder, although POV-Ray will get its own installation folder. More information on this installer can be found at http://www.holly-woo...w/aioi1-en.html At the moment, the installer seems to install POV-Ray 3.6, but if you're using a computer with multiple CPUs then it would be worth downloading and installing beta version 3.7, as this can make use of more than one CPU. This can be downloaded from http://www.povray.org/beta/ and is installed in the Program Files folder, but installs the "ini" and "include" files in your My Documents folder. Although it's still in beta, I've had no issues when using this to render images. 3. MLCad MLCad is a user-interface for the LDraw system, and makes it easier to create virtual LEGO models than hand-coding the location of each piece. It’s not as straight-forward to use as LEGO Digital Designer, but the parts list contains a greater number of “older” pieces, you ultimately have complete control over brick placement as LDD-style collision is ignored, and (if you’re feeling adventurous) you can even recreate LEGO elements yourself, if they have not been created already, and submit them to the LDraw parts lists. It is missing a number of more recent parts, but new elements are always being submitted and can be downloaded and installed fairly easily. There are many excellent tutorials on how to use MLCad, so I won’t cover that here. However, there are a few settings within MLCad that I use that you may find useful. Firstly, under Settings → General → Change... and then on the Step, Grid, Snap tab, I set the values as below: The coarse settings are left at MLCad’s default setting. The medium settings are changed to 1 unit per step, and the rotation angle is set to mimic the rotation of the new-style locking hinge pieces, which can be set at angles of 22.5 degrees. 11.25 degrees gives you slightly more freedom when using the old-style hinge pieces, but the correct angle is easily set for the locking hinges, which can be reproduced in sets of two rotations. Finally, the fine settings are set very low, so that I can accurately place items that have been rotated. Of course, if you find MLCad’s default settings enough, then they can be left as they are. I then set up the parts tree to something more useable, under Settings → Parts Tree → Tree Configuration…, although this can be quite time-consuming and if you accidentally reset the tree you cannot easily get the settings back, as the information is stored in your computer's registry. For ease of use, I have created a group file that automatically adds the values for you, an explanation of which is available in the “Downloads” section. 3.1. LSynth If this is installed alongside MLCad, it will allow you to render flexible elements, such as hoses, and store these within your LDR and MPD files. It has a bit of a learning curve (pun not intended), but once you’ve got the hang of it, it can really improve models that contain flexible parts. A modest example of what it can do can be found here in a Technic model that I’ve rendered. A good guide can also be found at http://www.holly-woo...utorial-en.html 3.2. SR 3D Builder A lot of people use SR 3D Builder as an alternative to MLCad, as it uses a system that is a little more like LDD. It uses a file format called L3B, which is essentially the LDraw format but with a bit more functionality. These files can also be opened within LDView, but certain special elements created within SR 3D Builder (such as rubber hoses) cannot be displayed using LDView, and therefore cannot be exported to POV-Ray for rendering. As far as I’m aware, SR 3D Builder does not recognise the LSynth library of parts. 4. Special files There are a few special files that are installed with the All-In-One installer which need some adjusting before rendering your model in POV-Ray. LGEO.xml This file contains all of the colour and element definitions for when LDView is exporting a model to the POV-Ray format. The default version is missing some colours, so I have created a more complete version, which can be found in 8. Downloads. Simply replace the default version with this one, and you will have more of LDraw’s colours available to render with. This needs to be saved to “C:\Program Files\LDRAW\LDView” lg_color.inc This file is installed into LGEO's program folder, in the "lg" sub-folder. It contains definitions to all of the colours of the bricks that POV-Ray uses, as well as information on element finish (transparency, reflection, etc.). The default one does not render accurate LEGO colours, so a replacement for this one can be found in 8. Downloads. This needs to be saved to "C:\Program Files\LDRAW\LGEO\lg" 5. LDView Once you have completed your model in MLCad, open LDView and locate the model file (either an LDR or MPD file, or L3B is you have used SR 3D Builder). Depending on how good your graphics card is, you should see a representation of your model that looks better than the one shown in MLCad. As LDView also displays the LEGO logo on element studs, you can use this to check to see if they are set to your desired rotation, as this will carry through to the POV-Ray render. Settings-wise, there is little that needs tweaking here, as it is mainly just for visual effect. However, you can set a better default angle, as LDView’s default is more top-down than the default one in MLCad, and when you export the model to POV-Ray, it will use the angle you currently have your model rotated to. Select View → Viewing Angles → Specify latitude/longitude, and enter your desired values. As I said, I like the default MLCad 3D angle, so I use latitude 23 and longitude 45, although latitude 30 works well with some long, low models, such as cars. Click OK and then go back to View → Viewing Angles and then click Save Current as Default. Now, when you open any model within LDView, it will always be initially displayed at this angle. The model I will be using as it appears within LDView: Render time: N/A 5.1. Exporting to a .pov file Now that you have your file open in LDView, click File → Export. This will bring up a dialog box which allows you to specify where you wish to save the exported file. It also has a button called Options..., which allows you to define various parameters. This is where you can set the aspect ratio for your render, and gives you some specific options: 5:4, 4:3, 3:2, 5:3, 16:9 and 2.35:1. I tend to go with 16:9, as that’s the ratio that modern widescreen TVs and monitors tend to use. It’s important that you remember which one you use, as you will need to set up another file in POV-Ray to account for this. There are a few other options to choose from here, and I use the ones shown below: Once you’ve chosen your settings, click OK and then from the Export window click Save. This will create a .pov file at your chosen location, using your chosen file name (by default this is the filename of the model you were looking at in LDView). 6. Setting up POV-Ray 6.1. Image resolution presets The first thing to set up is the file that contains the default resolution presets. If you are using POV-Ray 3.6, this will be located within the “C:\Program Files (x86)\POV-Ray for Windows v3.6\renderer” folder and will be called “quickres.ini”, and this cannot be edited from here, so you may need to copy the file to your desktop first and then open it from there. If you’re using POV-Ray 3.7, this can be edited within the program itself, as it stores it in you user area, so you can just open POV-Ray and select Tools → Edit resolution INI file. Open this file with a text editor and you should be able to see a list of screen resolutions, listed in this format: [1280x1024, AA 0.3] Width=1280 Height=1024 Antialias=On Antialias_Threshold=0.3 The first line is the name of the preset, and this is displayed in a drop-down box within POV-Ray. The following lines are the actual settings themselves. Copy and paste one of these settings to another location in this file, so we can create a new preset. You can leave both Antialias and Antialias_Threshold alone, as these are best left at default. If you wish to create an image that matches the aspect ratio set within LDView, this is where you set it. As I prefer to render in 16:9, then I need to make a width and height that matches this. So, for example, an image that is 1280 pixels in width must be 720 pixels in height, so you need to change this for your new preset, resulting in something like this: [1280x720 16:9, AA 0.3] Width=1280 Height=720 Antialias=On Antialias_Threshold=0.3 I add the 16:9 comment to the preset’s title, just to make it easier to see the ratio. If you’ve had to edit this from your desktop, then just copy it back to the original location. 6.2. POV-Ray INI file (3.7 only) This file is the one that contains the paths to the LGEO pieces that POV-Ray utilizes in rendering. If you’re using POV-Ray 3.6 it should already have the right paths in it. However, if you’ve manually installed the POV-Ray 3.7 beta, then it needs to be set up. Open POV-Ray and go to Tools → Edit master POVRAY.INI, and this should open the file within a text editor. At the bottom of the file, you need to insert three lines to ensure that POV-Ray can locate the right files. These are: Library_Path="C:\Program Files\LDraw\LGEO" Library_Path="C:\Program Files\LDraw\LGEO\ar" Library_Path="C:\Program Files\LDraw\LGEO\lg" Don’t forget that if you’re using a 64-bit operating system to make sure that the path uses "C:\Program Files (x86)".
  16. An oldie, but a goodie: 6641 4-Wheelin' Truck [Town, 1987] MPD file Although not shown in the picture, the driver is included in the MPD file, sat in the truck (although the correct torso print was not available in MLCad, so he's just wearing a plain white vest). Minifigs don't seem to come off well when being rendered in POV-Ray, as the standard face's printing is out of proportion, and the face (if anything other than the standard grin) and arms don't look particularly good either, as no native versions of these elements exist for POV-Ray, and making them from scratch is a little bit beyond my expertise.
  17. 5767 Cool Cruiser (Model A) [Creator, 2011] MPD file There is a slight collision where the door edges meet the frame, but it was the only way to get the doors to close in the same way as the actual model. Nearly all parts that are attached via a hinge can be moved in the same way that you would on the real thing, as I've made sure all sub-models have the correct rotation point. @palathadric: I'm nearly done with a guide, which I'll try and post over the weekend.
  18. 8020 Universal Set (Model A) [Technic, 1984] LDR file Another fairly basic render, which took a long time due to the windscreen (the bottom corner closest to camera, in particularly). I'm going to try playing around with the lighting a bit more, as it looks a little grey and washed out, whereas most actual photos of LEGO tend to look a little more vibrant.
  19. 1972 Go-Kart [Technic, 1985] MPD file A version of a model posted previously by @legolijntje. With this version, I've created it in MLCad and utilised LSynth to create the rubber hoses. As long as LSynth is installed it can be viewed without errors within either MLCad or LDView. Edit: MPD file now hosted on Dropbox.
  20. 6743 Street Speeder [Creator, 2009] MPD file This is the "A" model from the above set. Errors: None, as far as I can remember. And yes, I'm working on a guide at the moment, trying to make it as user-friendly as possible. Currently putting it together in Word, so I can export it to whichever format is best (as I think a version available as a post/thread would be good, but also perhaps a PDF so that you can use it offline). Edit: Image now hosted on Flickr. Edit 2: MPD file now hosted on Dropbox.
  21. I'm happy to put something together, although it might be quite basic, as I've only really produced renders from LDView-generated files.
  22. Another one rendered in POV-Ray, and this time it's one of my all-time favourites: 5510 Off Road 4x4 [Model Team, 1986] LDR file Errors: Missing stickers and string for the front winch. Regarding the actual rendering, I build the model in MLCad first and then view it using LDView, which has a handy POV-Ray-exporting function. I use this as the basis for the final render, but apply a slightly reflective finish to the floor, use more accurate colours (as I mentioned in the previous post) and, most importantly of all, use higher-quality lighting. The standard POV-Ray file that LDView exports has three lights, all of which cast sharp shadows. Instead, I've turned three of them into "area lights" (which cast a soft, more realistic shadow), moved one of the three so that windscreens don't get too much glare, and then added an extra light to the right of the model which doesn't cast a shadow. This slows down render times a lot, but it makes for a better looking render. Models rendered at a shallow angle tend to end up with a very dark horizon in them, so I try to stick to a viewing angle of between 23 and 30 degrees. Otherwise, you need to render some fog in the background to soften it up a bit. To be honest, I find building things in MLCad easier (but slower) than in LDD, as I have more direct control over exact positioning, plus I can create a render of the model that looks great (although some of LGEO's default substitute parts don't look quite right, such as the base part for the control stick, here used as windscreen wipers). Edit: Image now hosted on Flickr. Edit 2: LDR file now hosted on Dropbox.
  23. Haven't posted on Eurobricks for a while but I've recently got back into using LDRAW, and I've also started experimenting with POV-Ray, so I thought I'd post my first effort for a while with one of 2012's new Creator sets: 6913 Blue Roadster [Creator, 2012] MPD file Colours are all correct, as far as I can tell. The correct tyres (61254) are not yet available for LDRAW, so I have substituted them for a similar design (3483). For those interested, I'm using a custom "lg_color.inc" POV-Ray file, with official colours taken mainly from the Peeron colour guide, with neon colours taken from the Lugnet guide. I'm happy to post it for those interested, although it's still a work in progress and still needs much annotating before doing so. Edit: Image now hosted on Flickr. Edit 2: MPD file now hosted on Dropbox.
  24. In an atempt to give @AndyC a run for his money... 602 Fire Chief's Car Town (1978) LXF file Notes: - Wheels have been replaced. - No accurate printing/stickers. 620 Fireman's Truck Town (1978) LXF file Notes: - Wheels have been replaced. - No accurate printing/stickers. 640 Fire Truck and Trailer Town (1978) LXF file Notes: - Wheels have been replaced. - No accurate printing/stickers. 671 Shell Petrol Tanker Town (1978) LXF file Notes: - Wheels have been replaced. - No string available. - No accurate printing/stickers. 672 Fire Engine and Trailer Town (1978) LXF file Notes: - Wheels have been replaced. - No string available. - No accurate printing/stickers. 6690 Snorkel Pumper Town (1980) LXF file Notes: - Wheels and hinge plates have been replaced. - No accurate printing/stickers.
  25. 611 Air Canada Jet Plane Town/Promotional (1988) LXF file Notes: - Parts 4859, 3933 and 3934 have been substituted. - No printed parts.
×
×
  • Create New...