LDraw.org Discussion Forums
LDView POV output - 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: LDView POV output (/thread-11702.html)



LDView POV output - Michael Horvath - 2014-01-05

Some of my parts are written as having color "LDXColor60_slope", but this color is not defined anywhere in the POV file. What should I do in the meantime? Is there a workaround?

[edit]

This is the change to the POV code I did to fix it. Instead of this:

Code:
#ifndef (LDXSkipChromeColorMacro)
#macro LDXChromeColor(r, g, b)
#if (version >= 3.1) material { #end
    texture {
        pigment { rgbf <r,g,b,0> }
#if (LDXQual > 1)
        finish { ambient LDXAmb diffuse LDXDif }
        finish { phong LDXPhong phong_size LDXPhongS reflection LDXChromeRefl brilliance LDXChromeBril metallic specular LDXChromeSpec roughness LDXChromeRough}
#end
    }
#if (version >= 3.1) } #end
#end
#end


I did this:

Code:
#ifndef (LDXSkipChromeColorMacro)
    #macro LDXChromeColor(r, g, b)
        #if (version >= 3.1) material { #end
            texture {
                pigment { rgbf <r,g,b,0> }
        #if (LDXQual > 1)
                finish { ambient LDXAmb diffuse LDXDif }
                finish { phong LDXPhong phong_size LDXPhongS reflection LDXChromeRefl brilliance LDXChromeBril metallic specular LDXChromeSpec roughness LDXChromeRough}
        #end
            }
        #if (version >= 3.1) } #end
    #end
    #macro LDXChromeColor_slope(r, g, b)
        #if (version >= 3.1) material { #end
            texture {
                pigment { rgbf <r,g,b,0> }
        #if (LDXQual > 1)
                finish { ambient LDXAmb diffuse LDXDif }
                finish { phong LDXPhong phong_size LDXPhongS reflection LDXChromeRefl brilliance LDXChromeBril metallic specular LDXChromeSpec roughness LDXChromeRough}
                normal { bumps 0.3 scale 25*0.02 }
        #end
            }
        #if (version >= 3.1) } #end
    #end
#end

And then I did this:

Code:
#ifndef (LDXColor60) // Chrome Antique Brass
    #declare LDXColor60 = LDXChromeColor(0.392157,0.352941,0.298039)
    #declare LDXColor60_slope = LDXChromeColor_slope(0.392157,0.352941,0.298039)
#end



Re: LDView POV output - Stephen - 2014-01-06

I've always had the same issue with LDView. If you use a colour significantly beyond the main 16 for a slope then you'll get these errors, which I've usually just fixed in a similar way to yourself using scripts. It's not all colours. For example, "tan" and "dark tan" are fine. But certainly the higher ones seem to fail.

There also seems to be a related issued. If you use a slope in a sub-model and colour it with colour 16 (main-colour) and then specify the actual colour in the parent model, the render (if it succeeds at all) will be missing the "bumps" pattern on the slope in the sub-model. But if you directly specify a real colour for the slope in the sub-model then then "bumps" will render properly.

I've always just assumed these to be more LDView bugs, so I'll be keeping an eye on this thread to see if anyone suggests otherwise.


Re: LDView POV output - Travis Cobbs - 2014-01-06

You are correct that these are LDView bugs. I don't think I was aware of either one, and will investigate. The first problem (slopes with newer colors) should be simply a matter of LDView adding its own definition for these (with ifdefs around them so that the official LGEO definition will be used if present). The other problem could be a lot more problematic to fix, but I will investigate.


Re: LDView POV output - Michael Horvath - 2014-01-06

Could you also look at this post Travis?

http://forums.ldraw.org/showthread.php?tid=11739&pid=11739#pid11739

There are some more errors in the output.



Mike


Re: LDView POV output - Travis Cobbs - 2014-01-07

One of the things on my to-do list is to generate an updated (fixed) LGEO.xml, which should fix that problem. There are other problems with the existing file (due to bugs in lg_elements.lst inside LGEO), but I'm pretty sure the "most fixed" version that I have includes new parts that aren't part of the latest official LGEO release. (LGEO hasn't been update recently, to the best of my knowledge, and at least one person has started extending it himself.)


Re: LDView POV output - Michael Horvath - 2014-01-07

Is "LDX_48_slash_1_dash_12ri38_dot_dat_in_part" one of those new parts? What does LDView normally when it can't recognize a part? I think L3P can handle just about everything unless it's a sub-part primitive.


Re: LDView POV output - Travis Cobbs - 2014-01-07

No, but it's result of another LDView bug (which I have fixed in my development code). If you remove "_in_part", the problem should go away. Or, if there are a bunch of those in your file, you can add a #declare that declares LDX_48_slash_1_dash_12ri38_dot_dat_in_part to be LDX_48_slash_1_dash_12ri38_dot_dat.


Re: LDView POV output - Michael Horvath - 2014-01-07

OK thank you!


Re: LDView POV output - Michael Horvath - 2014-01-07

OK, I removed the "_in_part" bit like you said, but now it is missing "LDX_48_slash_1_dash_12ri38_dot_dat".


Re: LDView POV output - Travis Cobbs - 2014-01-08

Please email the Datsville you're trying to convert to the LDView email address. I'll take a look.


Re: LDView POV output - Michael Horvath - 2014-01-08

OK, the mail is sent.


Re: LDView POV output - Travis Cobbs - 2014-01-08

I posted a link to an updated POV file in the other thread.


Re: LDView POV output - Michael Horvath - 2014-01-09

Travis I was wondering what your stance is on whether to support old versions of POV-Ray or not. The way gamma is handled by the different versions you can't really cater to both. Therefore I would ask you to drop support for versions 3.62 and less.

My 2 cents.


Re: LDView POV output - Travis Cobbs - 2014-01-09

My intent for the gamma stuff was to default to 3.7, but have a setting in the POV export options to output a file that will instead work in 3.6. It's one of the things on my list of bug fixes prior to the official 4.2 release that I haven't gotten around to yet.


Re: LDView POV output - Steffen - 2014-01-15

just to connect the 2 threads: please see
http://forums.ldraw.org/showthread.php?tid=4415&pid=4415#pid4415


Re: LDView POV output - Michael Horvath - 2014-01-15

You're going to have a hard time making the scenes look the same in 3.62.

See the trouble we had to go through to get 3.62 scenes to look ~somewhat~ the same in 3.7.

http://wiki.povray.org/content/HowTo:Fix_old_scenes_to_work_with_the_new_gamma_system