LDraw.org Discussion Forums
Blender LDraw import tool - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw File Processing and Conversion (https://forums.ldraw.org/forum-22.html)
+--- Thread: Blender LDraw import tool (/thread-22780.html)

Pages: 1 2 3


RE: Blender LDraw import tool - Santeri Piippo - 2018-04-01

(2018-04-01, 14:03)Philippe Hurbain Wrote:
Quote:Could also be a driver issue. Often graphics drivers have bugs that manifest as strange behavior in very specific circumstances, like with here. Are your drivers up to date?
Not completely sure, but if I save the image and look at it with Photoshop, the green channel IS completely black. Why would this depend on graphics board?

I found by googling that apparently Blender can use the GPU for the rendering, not sure if it does it by default. I was wondering if the GPU manages to screw it up during the rendering phase.


RE: Blender LDraw import tool - Philippe Hurbain - 2018-04-01

(2018-04-01, 14:10)Santeri Piippo Wrote: I found by googling that apparently Blender can use the GPU for the rendering, not sure if it does it by default. I was wondering if the GPU manages to screw it up during the rendering phase.
Interesting, but not this. Default compute device was CPU. Switching to GPU provides the same image.

Could it be a problem with the importer? If I try to render Blender default startup cube, I get a nice grey cube image, with green channel properly used!


RE: Blender LDraw import tool - Merlijn Wissink - 2018-04-01

(2018-04-01, 14:47)Philippe Hurbain Wrote:
(2018-04-01, 14:10)Santeri Piippo Wrote: I found by googling that apparently Blender can use the GPU for the rendering, not sure if it does it by default. I was wondering if the GPU manages to screw it up during the rendering phase.
Interesting, but not this. Default compute device was CPU. Switching to GPU provides the same image.

Could it be a problem with the importer? If I try to render Blender default startup cube, I get a nice grey cube image, with green channel properly used!

Well, you could import a test LDraw file, then save the blender file and share it here so one of us could render the same file on our computer to see if something is wrong with the file  Smile

BTW: note that by default, selecting the gpu as renderer doesn't use the gpu as renderer. I was confused by this at first, but apparently you have to first select the device to use for the rendering, as can be read here: https://blender.stackexchange.com/a/73483


RE: Blender LDraw import tool - Reuben Pearse - 2018-04-02

(2018-03-31, 7:59)Merlijn Wissink Wrote: I just came across this Blender LDraw importer on Github: https://github.com/TobyLobster/ImportLDraw

I didn't know that one existed, I only knew of another one that only supported ldr files (and hasn't been updated in a while). This one however, supports dat, ldr and mpd files and seems to be relatively active too. It also has two modes: realistic and 'instruction style', which is a nice plus too.

I'm by far not a Blender expert, but I very quickly tried it on a small mpd file and the realistic mode produces quite a nice image without any tinkering (I just imported the model and pressed render). It's by far not as realistic as those Blender renders from Mecabricks, but pretty nice nonetheless  Smile


And just to make it extra clear: I'm not the author of this tool, just figured I'd share it here because I hadn't seen it here before (correct me if I'm wrong).

Thank for sharing this. I remember seeing something about a Blender import tool before, but your post has prompted me to try this out (I was getting very frustrated with my other Blender import method that goes via the LdrDat2Dxf tool).

I've just installed the Add-On and got this image using all the default settings - very impressed so far.
The MPD for this model can be found on this thread: https://forums.ldraw.org/thread-22295-post-26071.html


RE: Blender LDraw import tool - Philippe Hurbain - 2018-04-02

Going on investigations...
Marjorie.zip contains the .blend file that renders magenta on my machine.
I copied all objects and pasted them in default startup scene and rendered it. Clearly missing a lot of light, but at least the colors are right! (rendered with Blender and Cycles renderer). MarjorieOK.zip contains the .blend file of that version.


RE: Blender LDraw import tool - Steffen - 2018-04-02

(1)
When rendering your marjorie.zip, I get the same magenta image as you.

(2)
When I download your original MPD file from
https://forums.ldraw.org/thread-15660-post-28420.html#pid28420
, and import it myself into Blender, then I get a correct image.
I will attach the resulting *.blend file from that import to this post.

We should be able to find the problem by comparing these 2 separate Blender imports hopefully...

[Image: marjorie.png]


RE: Blender LDraw import tool - Merlijn Wissink - 2018-04-02

Hmm... I can confirm your Marjorie.zip also renders with a magenta look on my machine.
However, when I import the .mpd file myself, I don't have any problems (see attached blender file). What import settings have you used exactly?

[Image: Kwb8L7O.png]


RE: Blender LDraw import tool - Steffen - 2018-04-02

(2018-03-31, 15:25)Merlijn Wissink Wrote: About the reflection on the slopes: I had a similar effect on (sloped) tiles. Under the import option, there's a setting called 'Use curved wall normals' which is on by default. If you turn this off, the reflections should look less weird.

Yes, this made the slopes problem go away:

[Image: blenderrender02.png]


RE: Blender LDraw import tool - Steffen - 2018-04-02

just for fun:
here is a render of the mouse in the "LEGO Instructions" look:

[Image: marjorie2.png]


RE: Blender LDraw import tool - Philippe Hurbain - 2018-04-02

Now, matters are worse... when I open your .blend file it renders magenta!!!
Attached your blend file, just opened and saved on my machine...