Sign in to follow this  
cosmocaos

Stud.io, exporting POV-ray files: POV-ray files edition.

Recommended Posts

Hello all,

I'm a beginner in rendering LEGO models in a mac OS system.

I discovered that Stud.io makes its renderings using POV-ray (a software for rendering) and that you can export .pov files for render externally in the POV-ray software itself. 

The POV-ray 3.7 has not graphical user interface (GUI) for mac OS X, and can only be executed in the command line. The render is controlled in a text file with the .pov extension. 

I installed POV-ray 3.7 with the sotware mac ports:  [ The command is:  sudo port install povray @3.7.0.0_2 ] 

Then I modified the file /opt/local/etc/povray/3.7/povray.ini adding the path to the LGEO libraries, which were already installed by Stud.io.

Library_Path="/Applications/Stud.io/povray/LGEO"
Library_Path="/Applications/Stud.io/povray/LGEO/lg"
Library_Path="/Applications/Stud.io/povray/LGEO/ar"

Also modifying the Width and Height parameters. 

Then in the mac terminal I ran:  povray Nova_AlexandriaFrontal_10.pov

The result is similar to what I have obtained in Stud.io renderings. 

 

Now I want to improve the renderings learning to use POV-ray. 

First step learning about lights.  Which I will update in this post.

Any advice will be greatly appreciated, which will be included here. 

 

Solution Update:

.pov files exported from Stud.io give me some trouble, so instead, from stud.io I export a .ldr file, which then I open in LDView, and from there I exported the .pov file. 

This also allow me to select the perspective of the model, and automatically translated to the .pov file (Which I could not do it in Stud.io). 

At first time the .pov file exported from LDView has mismatch colors, that was fixed updating the file /Applications/LDView.app/Contents/Resources/LGEO.xml. 

NOTE: I will eliminate this topic to create a new one with the focus on mac OS related issues of POV-Ray Rendering.

 

 

 

Working with a iMac 2.7 GHz Intel Core i5, 8 GB 1600 MHz DDR3, Intel Iris Pro 1536 MB.

 

 

 

 

 

 

 

 

 

Nova_AlexandriaFrontal_9_light.png

Edited by cosmocaos

Share this post


Link to post
Share on other sites

You might find some useful code snippets in this guide. Sadly the images of that guide are gone, but most of the content is still there. As far as lighting is concerned, I personally like 7.3 Custom lighting more than 7.6 Radiosity.

Share this post


Link to post
Share on other sites
17 hours ago, legolijntje said:

You might find some useful code snippets in this guide. Sadly the images of that guide are gone, but most of the content is still there. As far as lighting is concerned, I personally like 7.3 Custom lighting more than 7.6 Radiosity.

Yes, very useful that guide, thanks. I'm trying to adapt the lines of code mentioned there (like the one you mention, 7.6 Radiosity) to the .pov file exported from Stud.io.

But I had some trouble, because the .pov file, already has a macro for lights:   WriteLight(0, 0, 1, 0, 200, 5) . If I remove that macro (see line below), somehow the rendering fails. 

I'm trying to understand more of the POV-ray language to find whats happening. I will post this question in the guide you provide me. 

 

 

 

 

#macro WriteLight(Lat, Lon, LightPower, Shadowless, AreaLightWidth, AreaLightColumns)
#local latRad = radians(Lat);
#local lonRad = radians(-Lon)-CameraTheta;
#local sinLat = sin(latRad);
#local cosLat = cos(latRad);
#local sinLon = sin(lonRad);
#local cosLon = cos(lonRad);
#local lightVectorSize = 4.0*LDXRadius;
light_source {
    <lightVectorSize*((-sinLon)*cosLat),lightVectorSize*(-sinLat),lightVectorSize*(-cosLon)*cosLat> + LDXCenter
    color rgb <1,1,1>*LightPower
    #if (Shadowless = 0)
    #if (AreaLightWidth > 0)
    area_light AreaLightWidth, AreaLightWidth, AreaLightColumns, AreaLightColumns
    adaptive 1
    jitter
    circular
    orient
    #end

    #else
        shadowless
    #end
}
#end
// Lights
// camera fai = 0
// camera theta = 0
WriteLight(0, 0, 1, 0, 200, 5)

 

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.