LDView povray export


RE: LDView povray export
#2
(2019-06-20, 6:47)Michael Horvath Wrote: 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

Code:
#declare LDXQual = 3;

To this

Code:
#ifndef (LDXQual) #declare LDXQual = 3; #end

The above should be unnecessary. The intent is for you to redefine all of these values in whatever file you tell LDView to use as its "Top include". This filename (if set) gets #included immediately following all of the declares, so you can redefine (or undefine) any of them there.


(2019-06-20, 6:47)Michael Horvath Wrote: 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

Once again, the expectation is that you would use "#undef LDXSkipCamera" in your top include to force LDXSkipCamera to not be defined (if that is your goal).


(2019-06-20, 6:47)Michael Horvath Wrote: 3. Create a variable to enable/disable the background. For instance:

Code:
#if (LDXShowBackground = true) background { color rgb <LDXBgR,LDXBgG,LDXBgB> } #end

This makes sense (although I would probably use "#ifndef (LDXSkipBackground) ..." for consistency.


(2019-06-20, 6:47)Michael Horvath Wrote: 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.)

It's been a long time since I worked on the POV-Ray stuff, so I'm not sure about how difficult this would be. I'll at the very least look into it.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
LDView povray export - by Michael Horvath - 2019-06-20, 6:47
RE: LDView povray export - by Travis Cobbs - 2019-06-20, 17:37
RE: LDView povray export - by Michael Horvath - 2019-06-20, 23:03
RE: LDView povray export - by Travis Cobbs - 2019-06-21, 2:04
RE: LDView povray export - by Michael Horvath - 2019-06-21, 21:56
RE: LDView povray export - by Orion Pobursky - 2019-06-21, 22:00
RE: LDView povray export - by Travis Cobbs - 2019-06-21, 23:53
RE: LDView povray export - by Travis Cobbs - 2019-06-22, 19:48
RE: LDView povray export - by Michael Horvath - 2019-06-25, 12:40
RE: LDView povray export - by Travis Cobbs - 2019-06-21, 3:46
RE: LDView povray export - by Steffen - 2019-06-23, 1:31
RE: LDView povray export - by Travis Cobbs - 2019-06-23, 1:48
RE: LDView povray export - by Michael Horvath - 2019-06-25, 23:35
RE: LDView povray export - by Travis Cobbs - 2019-06-26, 1:42

Forum Jump:


Users browsing this thread: 2 Guest(s)