Skip to content

A Visual Studio Code extension to allow you to edit Persistence of Vision Ray Tracer (POV-Ray) Scene files and render them using the integrated terminal

License

Notifications You must be signed in to change notification settings

VirtualWhirlwind/vscode-povray2

Repository files navigation

POV-Ray Extension v2 for Visual Studio Code

(https://github.com/VirtualWhirlwind/vscode-povray2)

The Persistence of Vision Raytracer is a high-quality, free software tool for creating three-dimensional graphics by using a Scene Description Language.

This extension allows you to use Visual Studio Code to edit POV-Ray Scene Description files and render them using POV-Ray in the integrated terminal.

Getting Started

  • After installing POV-Ray and this extension, open the Extension Settings and be sure to fill in:
    • Library Path
    • Pvengine Path
  • Start creating .pov files and use the "P" button in the upper right to trigger rendering
  • Rendering errors are not shown in VSCode yet, you need to open the pov file in the POV-Ray editor to see scene problems

Links

POV-Ray Official Website

POV-Ray on GitHub

POV-Ray for VS Code Extension on GitHub

POV-Ray for VS Code Extension in the VS Code Marketplace

POV-Ray for VS Code Extension in the Open VSX Registry

Lemmy.world

What's New

View the Change Log

Version 2.1.3

  • Snippet improvements
  • Development package updates

Version 2.1.2

  • Additional QOL improvements
    • Removed INI syntax highlighting

Version 2.1.1

  • Miscellaneous QOL improvements

Version 2.1.0

  • Added code completion (similar to IntelliSense) for several default library files when the LibraryPath is provided.

Version 2.0.0

  • Forked from J. Max Wilson's code (as that repo has been quiet for a while).
  • Fixed issues that appeared when VSCode made backend changes.
  • Made a tweak to support a security change ion POV-Ray.
  • Prep work for possible future updates.

Version 0.0.11

  • Library Updates to address security vulnerabilities in 3rd party package.

Features

  • Render the current .pov or .ini scene file by clicking the POV-Ray render icon in the editor menu or by using the VS Code build task key combination ctrl-shift-b.

    Animated GIF of POV-Ray in Visual Studio Code

  • Includes Syntax Highlighting and Snippets for common POV-Ray scene elements

    Animated GIF of POV-Ray Snippets

  • Includes Basic Code Completion from the standard INC files for several POV-Ray scene elements

    Animated GIF of POV-Ray Code Completion

  • Control output image format and output path through User and Workspace settings

    Animated GIF of POV-Ray Output Options

  • Set default image dimensions for rendered images

    Screenshot of POV-Ray Default Dimensions Options

  • Option to open the rendered image when rendering completes.

    Screenshot of POV-Ray Post-Render Options

  • Enjoy built in VS Code features like bracket matching, code folding, and comment toggling

    Screenshot of VS Code features with POV-Ray scene language

  • Preview of colors in the scene file

    Screenshot of VS Code features with POV-Ray scene language

  • Color editor and browser for colors declared in "colors.inc" if the library path is stablished in the configuration

    Screenshot of VS Code features with POV-Ray scene language

  • Preview of images on hover for image_map and height_field

    Screenshot of VS Code features with POV-Ray scene language

  • Preview of color_maps on hover

    Screenshot of VS Code features with POV-Ray scene language <<<<<<< HEAD

  • Viewer/editor for color_maps

    Screenshot of VS Code features with POV-Ray scene language =======

19fb9eaf4d847bcddabe15ce9d02824e85b70c49

Requirements

This extension does not install POV-Ray. You need to install it yourself. (Docker support suspended pending further testing)

  • Please check the extension settings to configure the POV-Ray engine path.

Installing POV-Ray

You will need to install POV-Ray for your specific OS and you will need to make sure that it can be run via the commandline from your terminal.

Ubuntu Linux

sudo apt install povray

Windows 10 with WSL

For the best experience on Windows, install the Windows Subsystem for Linux (WSL) and Ubuntu for Windows. Then configure VS Code to use C:\\Windows\\System32\\bash.exe as the integrated shell. Once you have WSL and Ubuntu working, you can install the povray package for Ubuntu exactly the same as above.

Windows

Download and run the POV-Ray installer for Windows:

http://www.povray.org/download/

Make sure the full path to pvengine.exe is added to your PATH Environment Variable so that it can be run from Powershell or the Windows command line.

You may also have to turn off Script I/O Restrictions in the POV-Ray Options.

Mac

Download the unofficial Command line POV-Ray 3.7.0 final for Mac:

http://megapov.inetart.net/povrayunofficial_mac/finalpov.html

Using the terminal, unzip the downloaded file and move the extracted files into ~/povray :

unzip PovrayCommandLineMacV2.zip && mv PovrayCommandLineMacV2 ~/povray

Create a povray symlink in /usr/local/bin to run Povray37UnofficialMacCmd :

ln -s ~/povray/Povray37UnofficialMacCmd /usr/local/bin/povray

Modify the POV-Ray Extension Settings in VS Code to set the Library Path to ~/povray/include

Screenshot of POV-Ray Library Path Option

Attributions

Forked from: https://github.com/jmaxwilson/vscode-povray

POV-Ray Scene Description Language syntax highlighting adapted from the atom-language-povray project by 羽洲.

POV-Ray Logo by SharkD.

About

A Visual Studio Code extension to allow you to edit Persistence of Vision Ray Tracer (POV-Ray) Scene files and render them using the integrated terminal

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published