LDView Wrong color display in POV-Ray


Wrong color display in POV-Ray
#1
Hello, I loaded Lego models into LDView 4.3 and exported them as POV-Ray files. I noticed that some colors are displayed incorrectly in POV-Ray. I haven't found a way to adjust the colors. In the following picture, the output of LDView can be seen in the upper part, saved as a PNG file, and in the lower part the representation in PovRay. There are particularly large deviations in the transparent colors. Am I doing something wrong or how can I adjust the colors?



   




Manfred
Reply
RE: Wrong color display in POV-Ray
#2
(2020-12-09, 22:59)Manfred Schäfer Wrote: Hello, I loaded Lego models into LDView 4.3 and exported them as POV-Ray files. I noticed that some colors are displayed incorrectly in POV-Ray. I haven't found a way to adjust the colors. In the following picture, the output of LDView can be seen in the upper part, saved as a PNG file, and in the lower part the representation in PovRay. There are particularly large deviations in the transparent colors. Am I doing something wrong or how can I adjust the colors?

Do you have LGEO enabled for your POV export? If not, LDView should generate all the colors and have them have the same RGB as it uses internally. If so, though, it will use the LGEO colors defined in LGEO.xml, which might not match the current LDConfig.ldr file that defines LDraw colors.
Reply
RE: Wrong color display in POV-Ray
#3
(2020-12-10, 2:23)Travis Cobbs Wrote: Do you have LGEO enabled for your POV export? If not, LDView should generate all the colors and have them have the same RGB as it uses internally. If so, though, it will use the LGEO colors defined in LGEO.xml, which might not match the current LDConfig.ldr file that defines LDraw colors.

Thank you for your fast replay.
No, I don't enabled LGEO. In the following picture you can see the regarding part of the options.
Is there another additional menue where I have to disable LGEO?


.png   Options.PNG (Size: 23.7 KB / Downloads: 81)

Manfred
Reply
RE: Wrong color display in POV-Ray
#4
(2020-12-10, 22:33)Manfred Schäfer Wrote: Thank you for your fast replay.
No, I don't enabled LGEO. In the following picture you can see the regarding part of the options.
Is there another additional menue where I have to disable LGEO?

No, the "Use XML mapping file" option is the only place to enable LGEO. I'm not sure what is going on. Could you email your test file to the LDView email address? I will investigate.
Reply
RE: Wrong color display in POV-Ray
#5
(2020-12-11, 0:13)Travis Cobbs Wrote: No, the "Use XML mapping file" option is the only place to enable LGEO. I'm not sure what is going on. Could you email your test file to the LDView email address? I will investigate.

Hello Travis,

Did you get my email?

Regards

Manfred
Reply
RE: Wrong color display in POV-Ray
#6
(2021-01-07, 12:05)Manfred Schäfer Wrote: Hello Travis,

Did you get my email?

Regards

Manfred

Sorry for the lack of response. I did get the mail, but haven't yet determined the source of the problem.
Reply
RE: Wrong color display in POV-Ray
#7
(2021-01-07, 18:28)Travis Cobbs Wrote: Sorry for the lack of response. I did get the mail, but haven't yet determined the source of the problem.

Thanks, no problem. I had already suspected that I had made a mistake sending the email. Smile

Regards

Manfred
Reply
RE: Wrong color display in POV-Ray
#8
(2020-12-09, 22:59)Manfred Schäfer Wrote: Hello, I loaded Lego models into LDView 4.3 and exported them as POV-Ray files. I noticed that some colors are displayed incorrectly in POV-Ray. I haven't found a way to adjust the colors. In the following picture, the output of LDView can be seen in the upper part, saved as a PNG file, and in the lower part the representation in PovRay. There are particularly large deviations in the transparent colors. Am I doing something wrong or how can I adjust the colors?

Sorry it took so long, but I finally think I figured out what is wrong. I think that the problem is caused by a difference in the way that POVRay treats colors in POVRay 3.7 and later. So I came up with a fix that I only activate if you tell LDView that you are exporting for POVRay 3.7 or later. Let me know what platform to build for (Windows 32-bit, Windows 64-bit, macOS), and I'll PM you with a link to a test build with a fix that you can test. (Note: if you need a Qt version, it will have to wait for the next Beta release.)

I also discovered that colors that have some transparency, but aren't "transparent LEGO" (like glow-in-the-dark) weren't working right either. I also attempted to fix those.
Reply
RE: Wrong color display in POV-Ray
#9
(2021-02-28, 0:33)Travis Cobbs Wrote: Sorry it took so long, but I finally think I figured out what is wrong. I think that the problem is caused by a difference in the way that POVRay treats colors in POVRay 3.7 and later. So I came up with a fix that I only activate if you tell LDView that you are exporting for POVRay 3.7 or later. Let me know what platform to build for (Windows 32-bit, Windows 64-bit, macOS), and I'll PM you with a link to a test build with a fix that you can test. (Note: if you need a Qt version, it will have to wait for the next Beta release.)

I also discovered that colors that have some transparency, but aren't "transparent LEGO" (like glow-in-the-dark) weren't working right either. I also attempted to fix those.

Hello Travis,
That sounds good. Smile
I am using Windows 7 (32-bit). Do you still have my email address? If not, I'll send it to the LDView email address. 

Greeting.

Manfred
Reply
RE: Wrong color display in POV-Ray
#10
(2021-02-28, 21:28)Manfred Schäfer Wrote: Hello Travis,
That sounds good. Smile
I am using Windows 7 (32-bit). Do you still have my email address? If not, I'll send it to the LDView email address. 

Greeting.

Manfred

Thanks. I emailed you a link to a 32-bit Windows test build.
Reply
RE: Wrong color display in POV-Ray
#11
(2021-03-01, 2:26)Travis Cobbs Wrote: Thanks. I emailed you a link to a 32-bit Windows test build.

note that some colors are not defined in LGEO.xml.

Yesterday, I had a problem with lavender color that was pink.

It occured that some lines were missing :
Code:
<Color>
            <LDrawNumber>30</LDrawNumber>
            <POVName>lg_medium_lavender</POVName>
            <Dependency>LGColors</Dependency>
        </Color>
         <Color>
            <LDrawNumber>31</LDrawNumber>
            <POVName>lg_lavender</POVName>
            <Dependency>LGColors</Dependency>
        </Color>
same goes for trans bright light green (color 35)

Code:
<Color>
            <LDrawNumber>35</LDrawNumber>
            <POVName>lg_clear_bright_green</POVName>
            <Dependency>LGColors</Dependency>
            <IoR>lg_ior</IoR>
        </Color>
Additionnaly, I switch this color from <217/255, 228/255, 167/255> to <179/255, 246/255, 37/255> in lg_color.inc and it looks more accurate (on my config)
Reply
RE: Wrong color display in POV-Ray
#12
(2021-03-31, 11:47)Bertrand Lequy Wrote: note that some colors are not defined in LGEO.xml.

Yesterday, I had a problem with lavender color that was pink.

It occured that some lines were missing :
Code:
<Color>
            <LDrawNumber>30</LDrawNumber>
            <POVName>lg_medium_lavender</POVName>
            <Dependency>LGColors</Dependency>
        </Color>
         <Color>
            <LDrawNumber>31</LDrawNumber>
            <POVName>lg_lavender</POVName>
            <Dependency>LGColors</Dependency>
        </Color>
same goes for trans bright light green (color 35)

Code:
<Color>
            <LDrawNumber>35</LDrawNumber>
            <POVName>lg_clear_bright_green</POVName>
            <Dependency>LGColors</Dependency>
            <IoR>lg_ior</IoR>
        </Color>
Additionnaly, I switch this color from <217/255, 228/255, 167/255> to <179/255, 246/255, 37/255> in lg_color.inc and it looks more accurate (on my config)

None of those colors exist in the last LGEO release from Lutz Uhlmann, and so they are therefore not in LDView's LGEO.xml. So these changes go along with any other custom changes to LGEO.xml that are made to support parts added by other people.
Reply
RE: Wrong color display in POV-Ray
#13
(2021-03-31, 19:44)Travis Cobbs Wrote: None of those colors exist in the last LGEO release from Lutz Uhlmann, and so they are therefore not in LDView's LGEO.xml. So these changes go along with any other custom changes to LGEO.xml that are made to support parts added by other people.

I understand, but nonetheless those color are in lg_color.inc from the AIOI (I din't install Damien's library)
Reply
RE: Wrong color display in POV-Ray
#14
(2021-04-01, 5:24)Bertrand Lequy Wrote: I understand, but nonetheless those color are in lg_color.inc from the AIOI (I din't install Damien's library)

I don't know if Willy includes an updated LEGO.xml in the AIOI that matches the additions made to LGEO. I'm pretty sure he does include additions to LGEO that were made after Lutz stopped updating it. If the LGEO.xml for LDView in the AIOI is modified compared to LDView's base LGEO.xml, then it could be that the additional colors were overlooked. If it isn't modified, then you'll presumably need to track down a modified LGEO.xml that matches the updated library.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 2 Guest(s)