Code Monkey home page Code Monkey logo

vscode-povray's Introduction

POV-Ray Extension for Visual Studio Code

Build Status

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.

What's New

Version 0.0.11

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

Version 0.0.10

  • The extension now properly handles spaces in paths and filenames for most cases. (Some known issues with Powershell). Thanks to Galbi3000 for identifying this bug and helping to fix it.

View the Change Log

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

  • 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

Requirements

This extension does not install POV-Ray. You can either install it yourself or run it using Docker.

Running POV-Ray using Docker

If you have Docker installed, you can easily run POV-Ray on any platform by selecting the Docker > Enable Docker option in the VS Code POV-Ray settings.

Screenshot of POV-Ray Docker Options

By default, the jmaxwilson/povray:latest docker image will be used. Additional povray docker images are available and you can set the image you want to use in the settings.

Note: if you are using WSL Bash as your integrated terminal on Windows, you will need some addtional setup to make Docker for Windows work with WSL Bash.

Installing POV-Ray

If you are not using Docker, 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

Known Issues

  • On Windows using Powershell as the integrated terminal, if the outputPath setting has a path with a space in one of the path names ("./out put", "C:\pov\my scenes\output"), POV-Ray fails to honor the output path or fails to render. Spaces in path names work properly on all other supported platforms and terminals.

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

Attributions

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

POV-Ray Logo by SharkD.

vscode-povray's People

Contributors

jmaxwilson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vscode-povray's Issues

POVRay not launching when hitting the render button in the extension

I'm trying to run POV-Ray on a simple project but when I click the in-extension render icon absolutely nothing appears to happen. There aren't any installation instructions that I can find, so I may be missing something obvious.

  1. I installed POV to a spaceless path, so spaces in the path/file name are not the issue.

  2. I added an environment path pointing to the directory with the .exe, but it's not clear that this is even needed if not using Docker. How does the extension know where the executable is? I am unable to find a setting for it.

  3. Finally, I manually set the path to the POV standard includes and still get nothing.

I would like to use this as part of my tool chain. Thanks for any insight you can provide.

Bug Fixes

@jmaxwilson
I've worked on some bug fixes and am considering a few additions, do you mind if I release a new version? I don't want to step on any toes, but since you've been quiet for a bit thought it might be okay. Let me know. :)

Rendering doesn't work correctly when paths or filenames contain spaces

Hi, I am using version 1.33.1 of Visual Studio Code and added the Pov-Ray extension a few days ago. I like the extension but do not like the way the POV-Ray editor opens whenever you click to render the image. I know that is not an issue with the extension but rather how POV-Ray 3.7 works from the command line.
So I noticed the "Use Docker to run POV-Ray" option and decided to try that. I installed Docker, signed up to create an account with Docker and thought all would be good. Nope, after I enabled the "Use Docker to run POV-Ray" option in the settings and clicked to render a working .pov file I get the following in the terminal:

> Executing task: docker run -v d:\Documents\My Projects\VS Code\Povray Scenes\Pencil\:/source -v d:\Documents\My Projects\VS Code\Povray Scenes\Pencil:/output jmaxwilson/povray Pencil.pov Width=1920 Height=1080 Output_File_Type=J <

C:\Program Files\Docker\Docker\Resources\bin\docker.exe: invalid reference format: repository name must be lowercase.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.
The terminal process terminated with exit code: 1

Clearly the option to use Docker does not work 'out of the box' but there are no detailed instructions on how to use the extension with Docker.

povray icon click does not work

Issue Type: Bug

Hi,

I am running Code on Ubuntu 20.04 LTS with Povray extension.
A few days ago when clicking on the top right povray icon in Code, rendering was working, but since 2 days, nothing happens, no error message, no outpout and no rendered imahge gets open.
Any hints would be more than welcome.
Many thanks

Extension version: 0.0.11
VS Code version: Code 1.59.0 (379476f0e13988d90fab105c5c19e7abc8b1dea8, 2021-08-04T23:13:20.182Z)
OS version: Linux x64 5.4.0-80-generic
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz (12 x 1452)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 0, 0, 0
Memory (System) 31.24GB (19.37GB free)
Process Argv --crash-reporter-id 3681ac4d-1abf-416a-aecf-706e77ed0e41
Screen Reader no
VM 0%
DESKTOP_SESSION mate
XDG_CURRENT_DESKTOP MATE
XDG_SESSION_DESKTOP mate
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vsdfh931cf:30280410
vshan820:30294714
vstes263cf:30335440
vscoreces:30322571
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805cf:30301675
pythonvspyt200:30340761
vscextlang:30333561
binariesv615:30325510
vsccppwt:30329788
pythonvssor306:30344512
bridge0708:30335490
vstre464:30350172
bridge0723:30350414

The latest update to Visual Studio Code broke the POV-Ray extension!

Yep, it's me again!
As the subject title says. Specifically it will not render at all. It does not matter if I use Docker or not, clicking the render button does nothing, no errors or any other messages in the output pane either.

I left it until today to report it to see if you had already noticed and was fixing it.

Usage of .ini file

Hello,

I might have missed something but I wonder if we can use a .ini file for a given .pov file ?

Basically, I have a .ini file for each of my .pov file with animation settings and output dir (scene specific), but I dont figure out how to do this with current version of your extension.
It would be really great to have it :)

Thanks for this alredy, its very nice to use :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.