Set Slope surface bumps for Ldview Pov-ray export


Re: Set Slope surface bumps for Ldview Pov-ray export
#2
It's possible, but not trivial. Unfortunately, that's not something I expected to be requested. First, you need to go into the POV export options in LDView, and fill in a filename for the Top include. Then, create that file, and put is somewhere that POV can find it via #include. Then, inside that file, define the colors used by LDView. You can simply copy LDView's definition into your file and change it, or you can find someone else's custom definition on the Internet. The key is that if you define a color using the same name that LDView uses, LDView's definition will be skipped.

So, for example, to redefine the black slope color with LGEO enabled, add the following to your include file:
Code:
#declare LDXColor0 = #if (version >= 3.1) material { #end
        texture {
                lg_black
        }
#if (version >= 3.1) } #end
#declare LDXColor0_slope = #if (version >= 3.1) material { #end
        texture {
                lg_black
                #if (LDXQual > 1) normal { bumps 1 scale 25*0.02 } #end
        }
#if (version >= 3.1) } #end

Note that you can't define just the slope color. You have to define both the slope color and the standard color, because LDView's #ifndef only checks the main color name (LDXColor0 in the example above).

If you're going to do this for colors, I would recommend creating a second file with your custom color definitions in it and nothing else. Then, #include the color file from your custom Top include. That way, if in the future you want to customize other stuff, you don't have a bunch of unrelated stuff mixed up in the same file.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: Set Slope surface bumps for Ldview Pov-ray export - by Travis Cobbs - 2014-05-11, 5:04

Forum Jump:


Users browsing this thread: 1 Guest(s)