-
Posts
124 -
Joined
-
Last visited
Content Type
Profiles
Forums
Gallery
Everything posted by juraj3579
-
6861-1: X1 Patrol Craft [space/Classic - 1980] 6861-1: X1 Patrol Craft by juraj3579 6861.l3b
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
Yes, the separate topic is much better , so we don't mix it with the models and can better follow the changes and ideas, which will hopefully come. I'm still on cleaning the script to make it publishable and I also added new feature for creating the seam between the parts automatically. I'll publish it in the end of the week.
-
Hello everybody, so here is a short tutorial of creating renders in Blender using Cycles - be sure you switch to Cycles, when you one new file in Blender! I used a simple 6611 Town Set as example. 1. create model (SR 3D Builder, MLCad, etc.): - I prefer SR 3D Builder. I like the connection function, which makes the aligning of the bricks easy and the workflow is really fun. 2. export the model to lwo (Lightwave object): - This is where I struggled a lot. There are some scripts, which imports ldraw files direct in Blender, but none of them works for me really. Then, I tried import obj files, which works quite good, however the mesh topology was bad and the logo on the studs was missing. Later I discovered the Lightwave exporter, which is available for download on the LDraw Webpage (LDraw2Lws). It has the possibility to replace ldraw parts with pre-created ones (in Lightwave format), which is really good feature, especially for the studs (they are available by default). If you want use this exporter, read the readme file and be sure, to set the library paths correct. It uses *.dat file format, but you can open .l3b file directly. 3. import lwo objects to blender: - The exporter creates a folder with all parts in lwo format in same directory as your model file. Blender can import them, however only one by one, which can be quite time consuming. So I modified the import script, that all the objects from the folder are imported at once. - I use a simple studio setup in blender (there are a lot of tutorials, how to do it in Blender or just download some free blend files available) and import model to the separate layer in it. A. modified import script copy and overwrite the default lightwave import script in "your blender install path"\"blender version"\scripts\addons (Example: d:\Program Files\Blender Foundation\Blender\2.66\scripts\addons\) with the downloaded(See end of the post) Usage: 1. enable replaced addon (make a backup of the old one :-) ) in the blender user preferences 2. use file->import-> Lightwave (lwo) then select the directory with the parts (created with lw2ldraw application), select one file and click import -> all files from the directory will be imported (it could take some time, depending on the count of the parts) 3. you should see your imported model in blender Basically it just do the import of the parts in a loop for all the files in the directory 4. working in blender: A. lego tools script A.1 download and save the Lego Tools script file on your pc. Also download the material library file. A.2 open the script file with notepad or similar and on the line 23 set the correct path to the downloaded material library file (mine is "E:\Privat\Lego"). Save the file. A.3 add the script in blender as any other addon. Go to user preferences in blender select addons -> install from file. Then search for lego tools and enable it by clicking on the checkbox A.4 on the left panel (show/hide with T) in the main blender window you should see menu item "Lego Tools" with the operators (Mesh Tools, Material Tools) B. mesh correction - after import, the mesh looks not really pleasing. You need to recalculate the normals and also remove double vertices. Also, the 90 degree edges are too smooth now. The Edgesplit modifier solves this problem. You can do the mesh operations only in edit mode, so this could be pretty time consuming again (selecting one object after another). So I wrote own add-on, which did the corrections on current selected objects with one click. Mesh Tools: you can select your imported model or portion of it and use the operators. Be carefull with selection. The script runs on all selected object with type of MESH. I use the operators in the same sequence as the buttons order. It's again just batch operation over all of the selected objects C. materials - imported model has just simple diffuse shader material. The materials are named "Surface xxx" where xxx is the number of lego color. Because of import, Blender creates always new instance for the same material (eg. "Surface 0.001, Surface 0.002" and so on). My plan was to auto-replace the materials with one from the lego material library for cycles, which I found on web. So the scripting again. First merge the materials, so it's always just one instance of the same material assigned to objects and then replace the materials with the better ones from the library. Again, works only on selected objects. Material Tools: to replace the materials which came with the import with the better ones from a library file (found on web) just select the objects, then click merge and then autoreplace. The operator appends the library file (see A.1+A.2), and replaces the materials using a dictionary (in the script file from line 26). Not all colors are implemented yet! 5. finish - after all, I play a little bit with the lightning, position of camera and so on. Then render the model. Actually, you can do a lot of stuff later with compositor. I didn't use it till now, but it's on my "blender study plan", as it allows you to bring more realism to the finished picture. So that's it. Maybe it looks a little bit complex, but in Blender it's actually only selecting the model and then 5 clicks to finish it. So, not big deal. Maybe the more time consuming part is to finish light and camera setup and rendering. Feel free to try it yourself. Feedback and ideas for improvement are most welcome. Edit 29.05.2013: Here are the links for the python scripts which I'm using in Blender. They were tested with the version 2.66 Import script: https://www.dropbox.com/s/q3hapud497xvktv/io_import_scene_lwo.py Lego Tools ver 1.0: - EDIT: I just realized, that make seam operator doesn't work properly Temporarily removed from operators panel https://www.dropbox....ools_ver_1_0.py Material Library: https://www.dropbox....ls_cycles.blend Next plans: my next topics (except building models) are to extend the color dictionary with more lego colors, try to create separate material for the slopes with the rough surface to push the renders more to reality and play with various ligthbox setups (I'll probably leave my space setup :-) and concentrate more on studio renders) Known bugs: LDraw2Lws can't export the space crater plate correct (which is bad, because I have 2 Space Classic sets build already)
-
891-1: Two Seater Space Scooter [space/Classic 1979] 891-1: Two Seater Space Scooter by juraj3579 891.l3b I'll post my workflow shortly. I want to clean up my blender script a little bit, if someone wants to use it later. As for the discussion POV-Ray vs. Blender. I think the Models rendered in POV-Ray are really good, maybe you can consider also a little bit image post processing after the render if you are not happy with the outcome. I'm using also a little bit of contrast, brightness correction and also a little bit of sharpening to give the render final touch. In both of the software, you have to go through quite a long process of try and error, till you get the satisfying results. It was also quite a pain in Blender to get all the things working, which i wanted to achieve (smooth edges, hard edges, smooth studs, logo etc.). However, what i like on blender is that you can directly see, what are you doing in case of composing and lightning (in cycles actually the real-time render) by moving the lights and camera. Also the blender is a huge in all it's functions (wondering, that it's still free) and has a big community with a lot of tutorials, so you don't have to invent the wheel again by your self. On current state, I'm pretty satisfied with the results. It has still some issues with the mesh topology, but for now I can live with it. As said, the workflow will follow in a brief steps, maybe also bit deeper, if someone is interested.
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
6984-1: Galactic Mediator [space/Space Police 2 1992] 6984-1: Galactic Mediator by juraj3579 6984.l3b
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
6929-1: Star Fleet Voyager [space/Classic 1981] 6929-1: Star Fleet Voyager by juraj3579 6929.l3b Thank you. Sure, I can put my steps together and post them, however it's still a little bit try and error process, especially my blender scripts are pretty clumsy.
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
8169-1: Lamborghini Gallardo LP 560-4 [Racers/Lamborghini 2009] 8169_hard.l3b Errors: Missing Stickers Rim Cover
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
6842-1: Small Space Shuttle Craft [space Classic/1981] 6842-1: Small Space Shuttle Craft by juraj3579 6842.l3b So, I got the studs and curves smooth and the lego logo on the studs, all in Blender. I think it works quite good. Next I should work a little bit on the materials, they are little bit glossy in my opinion.
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
Thank you for your advice. I just found another option, which is included in the Lightwave Exporter (I should read the readme files more often... ) and allows using "premade" parts in lightwave format instead of converting .dat (actually, the stud was already there). I just made small test with 1x1 brick and it looks promising. I'll try render something tomorrow.
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
6628-1: Shell Tow Truck [Town/1981] 6628-1: Shell Tow Truck by juraj3579 6628.l3b I improved the quality of the models recently. Found some modifiers in blender, which gives me better results on the smooth curves. I also did some scripting for batch operations. Then, I find another way to import the models to blender. I export the ldraw file to lightwave format and then import it to blender. The mesh looks better, it has also lego logo on the studs, but unfortunately, the studs are still too edgy (see the wheels). So, still the dilemma - .obj with smoother studs but no logo vs. lightwave with logo but edgy studs l also created another scene - more studio like.
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
Thank you. Actually it's not that time consuming. I have 1 source file with the enviroment setup (1 space plane as background, 1 baseplate and lighting setup). I import wavefront (.obj) file of lego set in this setup, do some positioning and camera tweaking. Replace the materials from a material library file with script I wrote and do render (ca. 40min to 1 hour for 1920x1080 resolution with 500 samples - depends on the parts count especially transparent ones) - so maybe 2-2.5 hours together for a set. Yes, there is a problem with the curved parts. I tried also another import scripts (ldraw to blender) but with no luck. I suppose the problem is with the lack of geometry comming from ldraw, also the part faces are tris and not quads, which causes also problems. I tried also smooth shading in Blender, but got some weird shadows on the parts. There is one project, I found http://www.blendpoli...hp?f=12&t=37706 (you can build models direct in blender), but it was not updated longer time and there are not so many parts yet. It would be really nice to have something like LGEO for Blender for smooth parts and also the lego logo on the studs...or maybe combine the enviroment made in blender and lego model togehter in pov-ray
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
6848-2: Inter-Planetary Shuttle [space Classic/1985] 6848-2: Inter-Planetary Shuttle by juraj3579, 6848-2.l3b
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
926-1: Command Centre [space Classic/1979] 926-1: Command Centre by juraj3579 926.l3b
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
6928-1: Uranium Search Vehicle [Classic Space/1984] 6928-Uranium Search Vehicle by juraj3579 6928.l3b
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
6870-1: Space Probe Launcher [space/Classic 1981] 6870 - Probe Launcher by juraj3579 6870.l3b
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
Hm, quite long time Mine took about 30 min. with Blender Cycles on HD resolution with 500 samples. I know, the transparent material is not that good (especially the yellow one), maybe i'll customize it later. Now, i'm still learning proper lightning and scene integration with Blender. I plan to recreate all Space/Classic Sets, already have couple of them finished, but not rendered yet. Maybe we can split them if you like, so we don't have duplicates... I'm looking forward to see your long term render
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
924-1: Space Transporter [space/Classic 1979] 924 - Space Transporter by juraj3579 924.l3b
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
6844-1: Sismobile [space/Classic 1983] 6844 - Seismologic Vehicle by juraj3579 6844.l3b
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
4439-1: Heavy-Lift Helicopter - City 4439 - Heavy Helicopter by juraj3579 4439.l3b Errors: Stickers No minifigs because of missing torsos and hips
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
6374-1 - Holiday Home [Town/1983] 6374 - Holiday Home by juraj3579 6374.l3b Errors: Missing stickers and 74 Number :-(
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
Thank you. Still learning proper lightning, rendering and compositing in Blender.
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
6357-1: Stunt 'Copter N' Truck [Town/1988] 6357-Stunt Copter Truck by juraj3579 6357 - Stunt 'Copter N' Truck.l3b
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
6372-1: Town House [Town/1982] 6372 - Town House by juraj3579 6372 - Town House.l3b Errors: Missing some stickers
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)
-
894-1: Mobile Ground Tracking Station (Space / Classic Space) finished_small by juraj3579, on Flickr 894.l3b My first model. Created in sr 3d builder, rendered in Blender Cycles. I'm pretty noob in Blender, so the render and compositing need a lot improvement, but I'm trying. Error: The dish 3960.dat hat connection problem, so the transparent stud is more inside.
- 2,235 replies
-
- LDraw
- Official sets
- (and 5 more)