Manual:Creating renderings/it: Difference between revisions

From FreeCAD Documentation
(Created page with "Per la produrre il rendering con PovRay e LuxRender useremo il tavolo che abbiamo modellato nel capitolo modellazione trdizionale.")
(Created page with "* Iniziare caricando il file table.FCStd modellato in precedenza o dal link in fondo a questo capitolo. * Premere sulla freccia verso il basso piccolo accanto al pulsante Im...")
Line 23: Line 23:
Per la produrre il rendering con PovRay e LuxRender useremo il tavolo che abbiamo modellato nel capitolo [[Manual:Traditional modeling, the CSG way/it|modellazione trdizionale]].
Per la produrre il rendering con PovRay e LuxRender useremo il tavolo che abbiamo modellato nel capitolo [[Manual:Traditional modeling, the CSG way/it|modellazione trdizionale]].


* Start by loading the table.FCStd file that we modeled earlier or from the link at the bottom of this chapter.
* Iniziare caricando il file table.FCStd modellato in precedenza o dal link in fondo a questo capitolo.
* Press the small down arrow next to the [[Image:Raytracing_New.png|16px]] [[Raytracing_New|New Povray project]] button, and choose the '''RadiosityNormal''' template
* Premere sulla freccia verso il basso piccolo accanto al pulsante [[Image:Raytracing_New.png|16px]] [[Raytracing_New/it|Nuovo progetto Povray]], e scegliere il modello '''RadiosityNormal'''
* A warning message might appear telling you that the current 3D view is not in perspective mode and the rendering will therefore differ. Correct this by choosing '''No''', choosing menu '''View->Perspective view''' and choosing the RadiosityNormal template again.
* Potrebbe apparire un messaggio di avviso che indica che l'attuale vista 3D non è in modalità prospettiva e quindi il rendering sarà diverso. Correggere questo scegliendo '''No''', scegliere il menu '''Visualizza->Vista in prospettiva''' e scegliere nuovamente il modello RadiosityNormal.
* You might also try other templates after you created a new project, simply by editing its '''Template''' property.
* Dopo aver creato un nuovo progetto si può provare anche altri modelli, semplicemente modificando la sua proprietà '''Template'''.
* È stato creato un nuovo progetto:
* A new project has now been created:


[[Image:Exercise_raytracing_02.jpg]]
[[Image:Exercise_raytracing_02.jpg]]

Revision as of 20:06, 30 September 2016

In ambito informatico, rendering è una parola usata per descrivere una bella immagine prodotta da un modello 3D. Naturalmente, si potrebbe dire che quello che se vede nella vista FreeCAD 3D è già bello. Ma chi ha visto un recente film di Hollywood sa che con un computer è possibile produrre immagini che sono quasi indistinguibile da una fotografia.

Naturalmente, la produzione di tali immagini foto-realistiche richiede un sacco di lavoro, e un'applicazione 3D che offra strumenti specifici per questo, ad esempio dei controlli precisi per i materiali e l'illuminazione. FreeCAD è un'applicazione più orientata verso la modellazione tecnica, che non dispone di alcun strumento per il rendering avanzato.

Fortunatamente, il mondo open-source offre molte applicazioni per la produzione di immagini realistiche. Probabilmente il più famoso è Blender, che è molto popolare e ampiamente utilizzato nei film e nei giochi. I modelli 3D possono essere esportati da FreeCAD molto facilmente e fedelmente e poi importati in Blender, dove è possibile aggiungere materiali e illuminazione realistici, e produrre le immagini finali o anche le animazioni.

Alcuni altri strumenti di rendering open-source sono fatti per essere utilizzati all'interno di un'altra applicazione, e si occupano di fare i complessi calcoli per produrre delle immagini realistiche. Tramite il suo ambiente Raytracing, FreeCAD può utilizzare due di questi strumenti di rendering: POV-Ray e Luxrender. POV-Ray è un progetto molto veccchio, ed è considerato un classico motore di raytracing, mentre LuxRender è molto più recente, ed è classificato come un unbiased renderer. Entrambi hanno i loro punti di forza e di debolezza, a seconda del tipo di immagine di cui si vuole ottenere il rendering. Il modo migliore per conoscerli è quello di guardare gli esempi sui siti web di entrambi i motori.

Installazione

Prima di poter utilizzare l'ambiente Raytracing in FreeCAD, si deve installare una di queste due applicazioni di rendering sul proprio sistema. Questo di solito è molto semplice, entrambi forniscono gli installatori per molte piattaforme o di solito sono inclusi nei repository software della maggior parte delle distribuzioni Linux.

Dopo che POV-Ray o Luxrender sono installati, è necessario impostare il percorso per il loro eseguibile principale nelle preferenze FreeCAD. Questo di solito è necessario solo su Windows e Mac. Su Linux FreeCAD li cerca e individua nelle posizioni standard. Per trovare la posizione degli eseguibili POVRAY o LuxRender basta semplicemente cercare nel sistema i file denominati povray (o povray.exe in Windows) o luxrender (o luxrender.exe in Windows).

In questa schermata Preferenze si può anche impostare la dimensione desiderata dell'immagine che si vuole produrre.

Rendering con PovRay

Per la produrre il rendering con PovRay e LuxRender useremo il tavolo che abbiamo modellato nel capitolo modellazione trdizionale.

  • Iniziare caricando il file table.FCStd modellato in precedenza o dal link in fondo a questo capitolo.
  • Premere sulla freccia verso il basso piccolo accanto al pulsante Nuovo progetto Povray, e scegliere il modello RadiosityNormal
  • Potrebbe apparire un messaggio di avviso che indica che l'attuale vista 3D non è in modalità prospettiva e quindi il rendering sarà diverso. Correggere questo scegliendo No, scegliere il menu Visualizza->Vista in prospettiva e scegliere nuovamente il modello RadiosityNormal.
  • Dopo aver creato un nuovo progetto si può provare anche altri modelli, semplicemente modificando la sua proprietà Template.
  • È stato creato un nuovo progetto:

  • The new project has adopted the point of view of the 3D view as it was at the moment we pressed the button. We can change the view, and update the view position stored in the povray project anytime, by pressing the Reset camera button.
  • The Raytracing Workbench works the same way as the Drawing Workbench: Once a project folder is created, we must add Views of our objects to it. We can now do that by selecting all the objects that compose the table, and press the Insert part button:

  • The views have taken the color and transparency values from their original parts, but you can change that in the properties of each individual view if you wish.
  • We are now ready to produce our first povray render. Press the Render button.
  • You will be asked to give a file name and path for the .png image that will be saved by povray.
  • The povray will then open and calculate the image.
  • When this is done, simply click the image to close the povray window. The resulting image will be loaded in FreeCAD:

Rendering with LuxRender

  • Rendering with Luxrender works almost the same way. We can leave our file open and create a new Luxrender project in the same file, or reload it to start from scratch.
  • Press the little down arrow next to the New Luxrender project button and choose the LuxOutdoor template.
  • Select all the components of the table. If you still have the povray project in your document, be sure to also select the lux project itself, so the views created in the next step won't go in the wrong project by mistake.
  • Press the Insert part button.
  • Select the luxrender project, and press the Render button.
  • Luxrender works differently than povray. When you start the render, the luxrender application will open and immediately start rendering:

  • If you leave that window open,Luxrender will continue calculating and rendering forever, progressively refining the image. It is up to you to decide when the image has reach a sufficient quality for your needs, and stop the render.
  • There are also many controls to play with, on the left panel. All these controls will change the aspect of the image being rendered on the fly, without stopping the rendering.
  • When you feel the quality is good enough, simply press Render->stop, and then File->Export to image->Tonemapped low dynamic range to save the rendered image to a png file.

You can extend greatly the render possibilities of FreeCAD by creating new templates for povray or luxrender. This is explained in the Raytracing Workbench documentation.

Downloads

Read more