Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 1,588
» Latest member: Brixe
» Forum threads: 4,135
» Forum posts: 36,126

Full Statistics

Online Users
There are currently 29 online users.
» 1 Member(s) | 26 Guest(s)
Applebot, Bing, Takeshi Takahashi

Latest Threads
LDraw AIOI, LDView, the L...
Forum: LDraw Editors and Viewers
Last Post: Willy Tschager
46 minutes ago
» Replies: 1
» Views: 69
POV-Ray rendering in 2020
Forum: Rendering Techniques
Last Post: Willy Tschager
53 minutes ago
» Replies: 1
» Views: 644
James Jessiman Memorial A...
Forum: LDraw.org Announcements
Last Post: Philippe Hurbain
2 hours ago
» Replies: 10
» Views: 951
Part 4210 (hose reel)
Forum: Parts Authoring
Last Post: N. W. Perry
Yesterday, 15:03
» Replies: 17
» Views: 2,173
Some Gear Rotations are "...
Forum: LDraw Editors and Viewers
Last Post: Max Martin Richter
Yesterday, 8:45
» Replies: 4
» Views: 4,147
LDraw snapshots coming up...
Forum: LDraw Editors and Viewers
Last Post: Ber
Yesterday, 1:32
» Replies: 15
» Views: 823
New Parts for LGEO Librar...
Forum: Rendering Techniques
Last Post: Ber
Yesterday, 1:31
» Replies: 249
» Views: 255,063
Parts in LDCad
Forum: LDraw Editors and Viewers
Last Post: Wesley McDonald
2020-10-20, 0:56
» Replies: 51
» Views: 3,204
Creating patterns from of...
Forum: Parts Authoring
Last Post: N. W. Perry
2020-10-18, 13:54
» Replies: 5
» Views: 416
It is recommended that me...
Forum: LDraw Editors and Viewers
Last Post: NikosSprocket
2020-10-18, 6:46
» Replies: 6
» Views: 1,066

 
Information POV-Ray rendering in 2020
Posted by: Ber - Yesterday, 3:07 - Forum: Rendering Techniques - Replies (1)

I've been exploring lego rendering using the LDraw system over the last few months, and it's been quite a journey. I've found several guides online from over the last ten years that have had various tips on how to get a good render using LDraw & POV-Ray. There was a lot of great info in them, but some of the advice was now out of date, and I had to spend a while comparing info between guides to get a good process.

So, now that I have a process that I'm pretty happy with, I thought I'd share it here for other's interest, and feedback is also welcome.

0. Install the LDraw AIOI package
Install whatever designers you like, and for rendering I am using LDView, the LDraw parts library, and Pov-Ray 3.7. (I am not using any of the POV-Ray alternatives such as Mega-Ray etc, as it seems POV-Ray 3.7 is newer / better than them.)

After installing that, I also install the latest version of LDView I can get, newer than what is in the LDraw AIOI at time of writing, which does change the .pov file exported, it seems to use new features of POV-Ray 3.7. I downloaded it from here: https://github.com/tcobbs/ldview/release...v4.4_Beta2

1. Generate the POV-Ray file in LDView
When LDView exports to a .pov file, it knows about high resolution part models designed for rendering, which results in a much better quality render. (It's doing this by using LGEO.xml to map to .inc part files, instead of using the standard / editor .dat part definition files). 

The process to generate the pov file is to open your model file (probably an .ldr file) in LDView, then choose file menu, export...

I don't edit any of the options here, just save the file

2. Set up POV-Ray to render larger resolutions
You'll probably want to render a larger file than what POV-Ray offers by default. For one thing, the Anti-Aliasing in POVRay is not great. So, render at 2x the dimensions you want, then resize down in a program that has bicubic (or other better) resize algorithm (eg. I use the free image editor, Paint.net). 

So, to do this, you need to make a one-time edit to a file that POV-Ray reads to get the render size options to offer. The file will be located at: C:\Users\[yourusername]\Documents\POV-Ray\v3.7\ini\quickres.ini

Making sure POV-Ray is closed at the time, open that file into a text editor.

If you wanted to render at 1920x1080 as you final resolution, you would want an option to render initially as 3840x2160, which you would add to the end of the file as:
[3840x2160, No AA]
Width=3840
Height=2160
Antialias=Off

Once you've added this once, save and close the file. Now this size will be available all the time in POV-Ray as a render option - which we'll get to in a minute.

3. Edit your .pov file in POV-Ray - change it to use Radiosity rendering
The default lighting provided in the .pov file from LDView has a standard 3-lights lighting setup, which casts some fairly strong shadows. I prefer to use an alternative lighting option called Radiosity rendering. To change to this I make two simple copy-paste changes at the top of .pov file, which I can do exactly the same on any file I want to render. They are:

Open the .pov file in POV-Ray first. Look at the top of the file, right below the comments, for these two lines:

Code:
#version 3.7;

#if (version >= 3.7) global_settings {assumed_gamma 1} #end

Replace them with (don't miss the scroll bar and extra lines here):
Code:
#version 3.7;

#include "rad_def.inc"

global_settings {
      max_trace_level 10
      radiosity {
              Rad_Settings(Radiosity_Final, on, off)
      }
      assumed_gamma 1
}

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;

Then scroll down just a bit to the // Camera settings section, and look for these 5 lines:
Code:
#ifndef (LDXFloorR) #declare LDXFloorR = 0.8; #end // Floor Red
#ifndef (LDXFloorG) #declare LDXFloorG = 0.8; #end // Floor Green
#ifndef (LDXFloorB) #declare LDXFloorB = 0.8; #end // Floor Blue
#ifndef (LDXFloorAmb) #declare LDXFloorAmb = 0.4; #end // Floor Ambient
#ifndef (LDXFloorDif) #declare LDXFloorDif = 0.4; #end // Floor Diffuse

Replace with:
Code:
#ifndef (LDXFloorR) #declare LDXFloorR = 1; #end // Floor Red
#ifndef (LDXFloorG) #declare LDXFloorG = 1; #end // Floor Green
#ifndef (LDXFloorB) #declare LDXFloorB = 1; #end // Floor Blue
#ifndef (LDXFloorAmb) #declare LDXFloorAmb = 0; #end // Floor Ambient
#ifndef (LDXFloorDif) #declare LDXFloorDif = 0.9; #end // Floor Diffuse

4. Do a test render
The final render can take a while, even on a multi-core i7 cpu, so you want to be sure you're happy. So do a small test render to make sure its looking right.

You do this by, in POV-Ray, in the dropdown list of resolutions in the top left corner choose a small size (eg 800x600) , then press the Run icon across the top toolbar.


5. Do the final render
Once a test render looks good, time to do the final render.

To do this, go back to that dropdown list of resolutions, and look for your large size you added earlier, and choose that. Then press Run again. For a fairly simple model, the render will probably take 15 mins to an hour, depending on your hardware.

6. Resize to your final size
Open your resulting .png file in your image editing program, and resize it down 50% to your final resolution, and save.


So that's my process, I think it produces pretty nice results, with a fairly simple workflow per image. I hope someone finds it helpful. And also would be interested to hear what anyone else is doing with POV-Ray now in 2020.

Print this item

  LDraw AIOI, LDView, the LDraw parts library, and LGEO.xml
Posted by: Ber - Yesterday, 2:28 - Forum: LDraw Editors and Viewers - Replies (1)

I've been learning my way around rendering using LDView & POV-Ray. Along the way I've learnt about the basic/editor .dat part files, the much more detailed LGEO .inc files, and how LDView uses LGEO.xml to know when .inc part files are available, then the .dat files as a fallback in other cases. (Side note: Please let me know if I have any of that wrong!)

What I've discovered in my adventures is that the LGEO.xml file in use seems to be the one that resides in the LDView folder (C:\program files (x86)\Ldraw\LDView\), which comes with LDraw AIOI. I think in theory this should be synchronised with the .inc files available in the Ldraw parts library also installed in LDraw AIOI. However, for at least one part - 2815 technic tyre - the .inc file is in my parts library, but missing from my LGEO.xml file.

I have edited it in manually, and now my pov renders use the high resolution part.

I wonder though if I am missing something. How is LGEO.xml normally kept up to date / edited? Is there any automated tools, or official downloads that should maintain and update it?

Print this item

  James Jessiman Memorial Award for 2020 awarded to Lasse Deleuran
Posted by: Orion Pobursky - 2020-10-20, 15:15 - Forum: LDraw.org Announcements - Replies (10)

The LDraw.org Steering Committee is pleased to announce that the 2020 James Jessiman Memorial Award (JJMA) recipient is Lasse Deleuran.

Lasse has been instrumental in bringing LDraw rendering to web browsers. His WebGL software package, buildinginstructions.js, powers the part preview on the Parts Tracker, the model viewer on the LDraw.org main site, instructions on Rebrickable, and his own site, Brickhub.org (and maybe more that I don't know about). His can do attitude, willingness to help, and passion for LDraw has helped to improve LDraw's usability and visibility. In addition to all of this, he has graciously made his code open and sharable to allow others use it in their projects.

Learn more about Lasse in his wiki bio:
https://wiki.ldraw.org/wiki/Meet_Lasse_Deleuran

On behalf of the LDraw Steering Committee, we thank Lasse for his contributions and look forward to working with him in the future.

Orion Pobursky

Print this item

  Some Gear Rotations are "disconnected"
Posted by: NikosSprocket - 2020-10-18, 7:23 - Forum: LDraw Editors and Viewers - Replies (4)

Hello

I am new with LDCad (but not with CADD) and I am baffled with the following issue.

For some gears, when I try to rotate them so the teeth mess correctly, the hub and the teeth are "disconnected"!

For example for 32269 if I rotate it clockwise the hub will follow my rotation but the teeth will rotate counter-clockwise!
Another example for 3648b I can only rotate the hub but not the teeth.

I have tried both using the GUI rotation {R} and the entry {Ctr-r} with the same result.

Am I missing something?

Nikos

Print this item

  Wiki fixed and site updates
Posted by: Orion Pobursky - 2020-10-17, 1:53 - Forum: LDraw.org Announcements - No Replies

I've updated the wiki to the latest Mediawiki version. Apparently, some backend stuff has been broken for some time. If you were trying to create and account or edit and encountered an error, I apologize.

In related news, the wiki.ldraw.org domain will be retired soon and the wiki moved to www.ldraw.org/wiki. I'll be doing the same thing with the forums and omr. These changes will happen as soon as I've tested and verified that nothing will break.

Print this item

  Creating patterns from official instructions
Posted by: N. W. Perry - 2020-10-16, 16:33 - Forum: Parts Authoring - Replies (5)

According to Brickset's random set browser, my next project is 4012 Wave Cops. This will require 3 new stickers (patterns for which already exist in some form), including one formed to the boat hull, and a new printed slope that appears in several police/emergency sets of that period.

For whatever reason, the official downloadable instructions for some of these late '90s sets are crystal-clear vector PDFs (as opposed to the newer ones that have raster images of not-so-good resolution). This means that I can open the PDF page in Inkscape and grab the pattern vectors directly from there:
       

This will give a much better resolution than any of the part photos I've seen so far—and probably better than any real copy of the part!

I had not heard of this technique being used before; has anyone got an established workflow for this process? Seems like it should be a matter of just straightening the vectors, resizing them to the slope face, importing them into—svg2ldraw, perhaps?—and probably re-triangulating. But we shall see…

Print this item

  Space / Insectoids
Posted by: N. W. Perry - 2020-10-15, 15:34 - Forum: Official Models - Replies (5)

Topic for the Space / Insectoids theme

Print this item

  6436 Duplo Arch 4 x 10 x 3 with Glass (Skylight)
Posted by: SNIPE - 2020-10-13, 20:15 - Forum: Part Requests - Replies (11)

Hi,

I wonder if this could be done in LDRAW. really I'm mostly interested in the glass itself since it is around 16L x 8L x 6L
and would look awesome in a lego train station digital MOC assuming I can find some clever way to incorporate it with lego pieces.

[Image: 6436.png]

It comes in 10 sets and the frame is only in yellow: https://www.bricklink.com/v2/catalog/cat...5D#T=C&C=3

I'm trying to find more photos / videos of it from other angles but its hard.

i'll update this tread if I find anything.

EDIT: found some high quality images:
https://i.ebayimg.com/images/g/Rt8AAOSwN...-l1600.jpg
https://i.ebayimg.com/images/g/RaAAAOSwb...-l1600.jpg
https://i.ebayimg.com/images/g/ajMAAOSwG...-l1600.jpg
https://i.ebayimg.com/images/g/2OQAAOSwG...-l1600.jpg
https://i.ebayimg.com/images/g/60wAAOSwv...-l1600.jpg

Print this item

Question Possible new primitive idea
Posted by: Mark Kennedy - 2020-10-13, 3:59 - Forum: Parts Authoring - No Replies

Here is an idea for a possible new primitive that could be useful for plates like parts 2540, 48336, and quite a few others.
As for a name or description for such a primitive I would like some suggestions. There already exist a knob1 primitive used in minifig arms so should something else be used?
Another question I have is if the primitive should have holes where the cylinder enters it. This would possibly make 2 versions necessary, one with a hole on one side and another with holes on both sides.
Also the part makes use of a new 11-16disc primitive.



Attached Files
.dat   knob2.dat (Size: 679 bytes / Downloads: 2)
.png   knob.png (Size: 19.34 KB / Downloads: 27)
Print this item

  Duplo Candle with Yellow Flame
Posted by: Jaco van der Molen - 2020-10-12, 8:37 - Forum: Part Requests - Replies (2)

A little unusual perhaps, but I am in need of the Duplo Candle with Yellow Flame.
[Image: 98219c01.png]
I have some sort of mockup for the candle itself (just a cylinder and a torus), but the flame of course is a complex form.

Does anyone have an idea of how to mock-up the flame or make it?
Perhaps there is a way to do it quick and dirty?
It would just be for the looks of the image I am making. No hight quality or precise part is needed atm.
Just the form of the flame will do. No need for the hole on top.

Print this item