LDView povray export
2019-06-20, 6:47 (This post was last modified: 2019-06-20, 6:55 by Michael Horvath.)
2019-06-20, 6:47 (This post was last modified: 2019-06-20, 6:55 by Michael Horvath.)
Here are some things I suggest for LDView's povray export. They all make things easier when using an external file to set variables, which I do often. I.e. I will create a "wrapper" file that is used in common by several scenes.
1. Precede all variable declarations with #IFNDEF. For instance:
Change this
To this
2. Check the variable's value when disabling lights and camera. For instance:
Change this
To this
3. Create a variable to enable/disable the background. For instance:
4. Lastly, if you could do the camera calculations inside the POV file instead of "hardcoding" the values, that would be great. For instance, start with latitude, longitude and radius to generate the camera location; then translate the camera based on the center of the bounding box. (I'm not 100% sure exactly what LDView does to output the camera.)
Thank you!!
1. Precede all variable declarations with #IFNDEF. For instance:
Change this
Code:
#declare LDXQual = 3;
To this
Code:
#ifndef (LDXQual) #declare LDXQual = 3; #end
2. Check the variable's value when disabling lights and camera. For instance:
Change this
Code:
// Camera
#ifndef (LDXSkipCamera)
camera {
#declare LDXCamAspect = image_width/image_height;
location LDXCameraLoc
sky LDXCameraSky
right LDXCamAspect * < -1,0,0 >
look_at LDXCameraLookAt
angle 77.011589
}
#end
To this
Code:
// Camera
#ifndef (LDXSkipCamera) #declare LDXSkipCamera = false; #end
#if (LDXSkipCamera = false)
camera {
#declare LDXCamAspect = image_width/image_height;
location LDXCameraLoc
sky LDXCameraSky
right LDXCamAspect * < -1,0,0 >
look_at LDXCameraLookAt
angle 77.011589
}
#end
3. Create a variable to enable/disable the background. For instance:
Code:
#if (LDXShowBackground = true) background { color rgb <LDXBgR,LDXBgG,LDXBgB> } #end
4. Lastly, if you could do the camera calculations inside the POV file instead of "hardcoding" the values, that would be great. For instance, start with latitude, longitude and radius to generate the camera location; then translate the camera based on the center of the bounding box. (I'm not 100% sure exactly what LDView does to output the camera.)
Thank you!!