Introduzione al linguaggio di descrizione di scene del raytracer POV-Ray         pagina 11
di Friedrich A. Lohmüller
English English English
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorials
 
   Introduzione a POV-Ray
   Indice del contenuto
 
  1. Usare POV-Ray:
      "Insert Menu Add-on".
  2. Principi fondamentali
      Comme descrivere una scena?
      Coordinate 3D,
      Numeri e vettori
  3. Struttura di Scena
      Esempio di Base.
  4. SScene file header:
      #include files,
      camera, light_source.
  5. Oggetti geometrici di base
      sphere, box, cylinder,
      cone, torus, plane.
      et altri oggetti
  6. Trasformazioni
      scala, rotazione,
      translazione e altri.
      CSG: union,
      difference, intersection.
  7. Colori e superfici
      texture, pigment, normal, finish
  8. #declare, #local, #macro.
      Variabili e oggetti flessibili.
  9. #while - loops, cicli.
      Esempi di Base.
 10. #include, include files.
      Oggetti riutilizzabili.
>11. Efficienza,
      velocità, flessibilità,
      lavorare con moduli.
      Adattare di 3.1 a 3.5;3.6
      Adattare di 3.5;3.6 a 3.7
      POV-Ray + Windows Vista.
 
  - Insert Menu Add-on
    & Download
                                                     

Consigli e Trucchi per Lavorare Efficientamente con POV-Ray.
Suggerimenti di velocità:

Il raytracing, la computergrafica fotorealistica e ancora più l'animazione a computer saranno per sempre una lotta con la potenza insufficiente del computer! Di conseguenza è molto irrealistico ed inutile, attendere fino ai computer infine sarà "abbastanza veloce" - non saranno mai abbastanza veloce per le nostre idee!!!! Così è miglio cominciare oggi d'imparare ed allenarsi i piccoli trucchi come si può ridurre i periodi per lo sviluppo e il calcolo sui nostri computer troppo piccoli e troppo lenti d'oggi. Coloro che conosce questi trucchi inoltre sui supercomputer del domani arriveranno molto più velocemente ai buoni risultati allora quella gente senza questo "know-how".
 
Regole di base, degno d'accettare:
1. Tenere in assetto per mantenere la pista!
     Lavorare modularemente!

  • Attenzione a mettere il file di testo in ordine sistematico e bene strutturato!
  • Non dimentica d'inserire con "//" linee di commenti con parole chiare e significante.
  • Ne cerare testi di tipo verme nastriforme ne creare testi con frasi troppi lunghi e troppe cose differente in una linea! - È una cosa d'esperienza per trovare il giusto senso!
    Ed è certamente una questione di esperienza, che cosa ` adeguata per voi!
  • Divida i progetti più grandi nelle più piccole parti chiaramente contrassegnate dei progetti parziali.
  • Con "/*" e "*/" è facile da commentare fuori per i motivi diversi tutte le altre parti di una scena. Con questo, è possibile risparmiare molto tempo di calcolo a renderizzare di una prova durante sviluppare una scena.
2. Mantenere flessibilità!
  • Predefinisca gli elementi usati multipli come gli oggetti, i valori, strutture ed e così via da "# dichiarano...". Ciò concede più flessibilità e cambiare facile del questo elementi. È di un'importanza molto fondamentale d'avere tale flessibilità se desiderate progettare una scena o un oggetto e se dovete adattare le proporzioni ed i colori di alcuni elementi nella scena.
3. Renderizzare con quick_color:
  • Per scène con un gran numero di componenti con testuri molto complessi e stentato à calcolare si recommanda aggiungere nelle dichiarazioni di pigment colori di tipo "quick_color". Con colori "quick_color" chiaro distinguibile è più facile posizionare gli elementi ai posti giusti con rendering in modo "quick".
4. Renderizzare parzialemente:
  • Per vedere singoli elementi in scala più grande (per adattare i testuri o le forme più preciso), si puo calcolare solo parti della scena con partial rendering.
    Si inizia questo modo par la "command line" o con bottone "Ini":
    "command line options":
    " +sr100 +er200 +sc300 +ec350" per esempio significa:
    cominciare con la fila 100, finire con fila 200 e cominciare con colonna 300, finire con colonna 350.
  • Si puo anche selezionare una regione nel Render Window dopo un rendering precedente con il modo "rubber band" (nasto di gomma).
5. Incrementare max_trace_level:
  • By using glass textures and/or mirroring surfaces, it is possible that you will see often black spots in complex structures of objects in the glass or in the reflecting materials. This is caused by the fact that the raytracer has there to trace too many levels of refractions/reflections. By default POV-Ray stops tracing a ray if it does not find an object after 5 refractions/reflections - in this case the point remains black. Use the statement global_settings {max_trace_level 20} to increase it and reduce the size of black spots in surfaces of glass or mirrors.
  • On the other hand it is obvious, that it speeds up test renderings of such scenes, if you put max_trace_level back to 5 during tests or if you are using quick rendering in quick_colors. Then there no refraction or reflection will be calculated - all surface with these effects will remain black or will appear in the explicit defined quick_color of this object.
6. Attenzione utenti della versione 3.0: "Halo" non ha futuro!
  • Those who are using POV-Ray version 3.0 (e.g. on win3.x) should not use the halo feature and the atmosphere feature anymore. These effects are totally new designed in version 3.1. So using sceneries with these features and newer versions of POV-Ray will no longer work without dramatic changing of this text files!
7. Adattando POV-Ray 3.1 file di scena a POV-Ray versione 3.5/3.6:
      Nella versione 3.5 di POV-Ray qualche caratteristica critica ha cambiata, qui sono alcune di loro:
  • L'angelo della macchina fotografica ha cambiato a valori più realistici! - In 3.2 the values for camera angle were unrealistic high - now they are adapted to reality:
    Use something about a half of the angle that you used in 3.1 scene files!
     
  • Nuova caratteristica interessante:
    Instead of changing the aspect ratio in the camera by "right x*4/3 up y" or quadratic: "right x up y ", in POV-Ray 3.6/3.6 we can install a automatic calculation of aspect ratio by   " right x*image_width/image_height"
     
  • Punto e virgola è richiesto! - After a declaring of a float or vector value semicolon is necessary:
    Samples:
    #declare R = 0.25;
    #local Diameter = 2*Radius;

     
  • Changed New Noise Generators - In version 3.5 three different noise generators are in use. Default for POV-Ray 3.6 is now the noise_generator 2. Old POV-Ray 3.1 used noise_generator 1. This causes some turbulent textures made with POV-Ray 3.1 to look different in POV-Ray 3.6. In this case we can reinstall the old noise generator by the statement
    global_settings { noise_generator 1 }
     
  • Gradient pattern has changed:
    It used to reverse / mirror for negative values along the specified orientation vector. Solution: Use function{abs(x)} as a pattern instead of gradient x and similar for gradient y and gradient z.
     
  • The float function log used to be the natural logarithm, as per version 3.5/3.6 it is 10-based.
    Solution: replace log by ln.

     
8. Adattare testi per POV-Ray 3.5/3.6 a POV-Ray Versione 3.7:
      Nuovo nella versione 3.7 di POV-Ray:
  • L'adattamento di Gamma dovrebbe essere fatto solo fuori il testo di scena!
    Una separazione logica coerente di "frontend" (user-interface, Parsing e command-line options e ini-file etc.) e "backend" (Parsing e rendering della scena) esige di non definire "assumed_gamma" nel testo di scena.
    Questo è una preparazione per una versione con la capabilità di rete perfetta.
    La sezione di testo di scena:
    #version 3.5
         global_settings{ assumed_gamma 1 } // with display_gamma = 2.2
    in POV-Ray 3.7 si deve cancellare o commantare fuori con "//".
     
9. "Error-Terror" -- despite of this: don't worry, be happy :-),
  • Keep cool and stay happy, also if any of this magic error reports are bothering you! And how they can bother you! ;-((((
    Stay cool! If it doesn't kill you, it will make you stronger! To learn a systematic and successful research on error handling is also a positive thing you can do with this program (also very easy :-).
  • Often the reason for this error is to find some lines before the line where parsing stopped. By tracing the text for errors, we must keep in mind, that the program tried to understand the statements in the text translating it starting from the head. So a forgotten final brace at a statement like "#declare .. = union{ ... }" (sometimes many many lines later) will result in an "undeclared_identifier"-error.
  • And please: If you cannot avoid to make errors (and if you are a human, you can't!), so don't make a second error and think: this program did this error - because it was the only other one here, who also was involved in this action!
    This program was and is developed by the best cracks in computer graphics from all over the world and during so many years of testing, that it's unrealistic, that a beginner may be able to discover during his first steps an error in this program. Well - sorry, I can give you no help! - if an error occurs, you have to seek it by yourself, it is highly probable (~ 99.999% !), that it is "your error" :-)
  • A complete listing of all types of errors and their possible reasons, also with all the errors a ray tracing newbie usually can make, I will write it N E V E R   A T   A L L!! Because this masterpiece would become much longer than the best description of all the positive possibilities of this wonderful POV-Ray!
10. Usare POV-Ray 3.6 e POV-Ray 3.7 con Windows Vista ,
  • Dobbiamo installare POV-Ray 3.6.2 (10-giugno-2009) per usare il programma sotto Windows Vista senza problemi con animazioni! Questo é un update di 3.6.1 adatto per lavorare sotto sisteme Vista e Vista64. Download qui: www.povray.org/download/.
    Strutture nuove:
    I program file (bin) sono adesso localizzati in "C:\User\AppData\Roaming\POV-Ray\v3.6\bin\"
    mentre il Insert Menu, i include file e i sample scene files adesso sono in "C:\User\Documents\POV-Ray\v3.6\"
    Perché POV-Ray 3.6 for Windows é designato per Windows98/ME/XP ci sono qualche problema con Vista.
    In particolare durante gli animazioni POV-Ray ha bisogno di scrivere nel sua directory. Mas il programma é paralizzato e fa una discesa molto male perche questa azione non é permetto per programma compatibile con Vista.
    Come il programm funziona su le mie computer:
    Installare POV-Ray 3.6.1 o 3.5 sotto Vista:
    1. Non si può installare POV-Ray nella directory "programma"!
      Si deve installare POV-Ray in qualche altro posto, per esempio in "C:\POV-Ray3.6 ".
      (Non si puo muovere i file a mano! Si deve chambiare la directory "installation directory" durante il processo d'installazione!)
    2. Doppo l'installazione cerciamo nel directory "C:\Programme\POV-Ray for Windows v3.7\bin" il file binario di POV-Ray nella directory
      "C:\POV-Ray for windows v.36\bin\pvengine.exe".
      Cliccare a destra su simbolo e scegliere "Properties" .
      Cliccare la scheda "Compatibilità" et cliccare il bottone "Run this program in compatibility mode for:",
      scegliere qui: "Windows 98/Windows Me"
      e scegliere qui più basso "Disable visual themes"
    3. Cliccare la scheda "sicurezza" e permette che "tutti gli utenti" hanno "controlo completo" par scegliere " permessi".
  • Utilizare POV-Ray 3.7:
    POV-Ray 3.7 é "un'urgente necessità." per utenti con sistema multicore/multiprocessore. Utilizanto multicore POV-Ray prova un'accelerazione drammatica:
    La velocità di POV-Ray 3.7 é quasi proportionale al numero di core di processori x numero di threads !!!

  • Per installare POV-Ray 3.7 non si deve avere una installazione di POV-Ray 3.6.
  • Nuove structura con POV-Ray 3.7:
    Il programma adesso é in "C:\Programs\POV-Ray\v3.7\bin\quot;
    Il "Insert Menu" adesso é in "C:\Users\Documents\POV-Ray\v3.7nsert Menu\"
    Anche il resolutions ini file "quickres.ini" e "povray.ini" con i Library_Path settings é in "\v3.7ni\".
    Altrettanto anche gli esempi adesso sono in "\v3.7\scenes\".
  • Compatibilità: Normalamente tutti file creato sotto version 3.6 si dovrebbe funzionare anche sotto versione 3.7. Solo con la funzione radiosity sono necessari piccoli adattamenti (cioè repaces 'emissione' 'ambiente').
    Viceversa: Nuovi oggetti in POV-Ray versione 3.7 sono cioè i file 'shapes3.inc', 'meshmaker.inc' e 'makegrass.inc' dovrebbe funzionare anche con POV-Ray versione 3.6, se si dispone degli include file in qualche parte nel 'include file path' della versione 3.6.

parte 0 | parte 1 | parte 2 | parte 3 | parte 4 | parte 5 | parte 6 | parte 7 | parte 8 | parte 9 | parte 10 | parte 11

top

© Friedrich A. Lohmüller, 2014
homepage:www.f-lohmueller.de