POV-Ray : Newsgroups : povray.newusers : Advice for a new user looking for a renderer Server Time
23 Nov 2024 21:00:46 EST (-0500)
  Advice for a new user looking for a renderer (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: TSGM
Subject: Advice for a new user looking for a renderer
Date: 31 Oct 2011 23:45:00
Message: <web.4eaf6a9abdbedd2e31848b5f0@news.povray.org>
For my day job, I do a bit of work involving mathematical functions and
concepts. Often, I'll want to illustrate these things (for talks, classes,
publications, etc.). Here is an example of something I created for a talk:

http://www.youtube.com/watch?v=z2ACICctjqw

This was done using Matlab, a numerical computing environment. It's well suited
to scientific computations, but basically, I want to start learning how to use
actual 3d modeling and ray tracing software to generate something more akin to
this:

http://www.subblue.com/assets/0000/4491/Shading_full.jpg
(From www.subblue.com)

Basically, I'm not sure what software or renderer I should start learning.

Although I can't anticipate all my needs, I can say that at least initially, my
main goal is to simply illustrate three-dimensional surfaces which are generated
in matrix form (meaning x,y,z coordinates provided). I'm sure my needs will
evolve, but let's leave it at that.

Here are my needs:
[*]Simple scenes (a plain backdrop for instance)
[*]The kind of ray-traced pictures I've shown above
[*]Simple coding environment
[*]Good documentation
[*]OSX support


I've given POV-Ray a try, though I'm a bit unhappy by the results (I'm not sure
whether this is my own abilities or simply that the software is quite old and
not as slick...?). I've heard of Sunflow (no longer supported), Luxrender, and
Yafaray.

I've also given Blender a try, and while its interesting, I just don't think I
need a full GUI environment. Like I said, right now, all I want is something
that I can read in an imported text file from Matlab containing data for the
surface, put it into a simple scene, and adjust textures and lighting, and come
out with something beautiful.

I'm sure some of you will say that amazing results can be made with the right
user on any kind of software...but since my needs are quite limited (and since
this is not really my day job), I just want to know the easiest one to learn for
illustrating simple surfaces.


Post a reply to this message

From: Le Forgeron
Subject: Re: Advice for a new user looking for a renderer
Date: 1 Nov 2011 03:57:23
Message: <4eafa663@news.povray.org>
Le 01/11/2011 04:42, TSGM nous fit lire :
>  my
> main goal is to simply illustrate three-dimensional surfaces which are generated
> in matrix form (meaning x,y,z coordinates provided).

Could you clarify? Do you intend to represent a monkey saddle
( a²z = x(x²-3y²) ), Gabriel's horn ( (x²+y²)z²=a^4 ) or all that kind
of polynomial surfaces ?
(with the polynom expressed as a matrix of coefficient)

Or would your surface been generated as a matrix of voxel ?

> 
> Here are my needs:
> [*]Simple scenes (a plain backdrop for instance)
> [*]The kind of ray-traced pictures I've shown above

There is two approach in renderer: you can compute effect of each light
(and even more, separate lightning & shadow) separately, applying each
layers on the final result; Or compute everything at once. The latter is
the povray approach.
Your picture of a julia (well, your citation of) looks like a set of
pictures for the former approach (well, the title suggests that to me).

> [*]Simple coding environment
> [*]Good documentation
> [*]OSX support
> 

If you want to make movie, you will need an additional program to turn
the serie of pictures from povray into your animation.
Otherwise, looks like povray could qualify for all your needs.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Advice for a new user looking for a renderer
Date: 1 Nov 2011 07:41:32
Message: <4eafdaec@news.povray.org>
TSGM wrote:

> Although I can't anticipate all my needs, I can say that at least initially, my
> main goal is to simply illustrate three-dimensional surfaces which are generated
> in matrix form (meaning x,y,z coordinates provided). I'm sure my needs will
> evolve, but let's leave it at that.

One option would be to check whether you have really reached
the limits of what can be achieved within software geared towards
plots and mathematical visualizations. Such an environment is
probably the most convenient to use if you want to focus on
the math and not the 3d rendering aspects.

For example, there appears to be a volume rendering function
for Matlab available at

http://www.mathworks.com/matlabcentral/fileexchange/4927-vol3d-m-vol3dtool-m

As general purpose renderers go, POV-Ray is probably a good choice
as its progamming-based approach will be more comfortable for someone
with a technical / math background (as opposed to a 3d artist). Also,
if you frequently render similar type of graphics but with different
functions, this will allow you to create a reusable scene that can
then simply read or include update data files or functions.

> I've given POV-Ray a try, though I'm a bit unhappy by the results

If you post a sample of your data / function and how you want to
render it, I'm sure people here will help you get started with a
basic scene that is suitable for your purposes.

Note that if you generate your data from a function, you should
provide both as it may in some cases be preferrable to render the
function itself within povray.


Post a reply to this message

From: TSGM
Subject: Re: Advice for a new user looking for a renderer
Date: 1 Nov 2011 12:05:01
Message: <web.4eb017b0cb0d82671ba246b0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

> There is two approach in renderer: you can compute effect of each light
> (and even more, separate lightning & shadow) separately, applying each
> layers on the final result; Or compute everything at once. The latter is
> the povray approach.
> Your picture of a julia (well, your citation of) looks like a set of
> pictures for the former approach (well, the title suggests that to me).

Dear Le,

You mention that POV-Ray operates differently in that it applies the lighting
and shadow all at once. Does that means that it produces fundamentally different
pictures (either better or worse?). Forgive me for the naive question...

TSGM


Post a reply to this message

From: TSGM
Subject: Re: Advice for a new user looking for a renderer
Date: 1 Nov 2011 12:10:01
Message: <web.4eb0173bcb0d82671ba246b0@news.povray.org>
Dear Christian,

Thank you for your help. A few comments:

I'm far from an expert on Matlab, but I've used it for many years, and I would
say that the graphics I produce are already pushing the limits as far as what
the pre-packaged software is capable of.

> if you frequently render similar type of graphics but with different
> functions, this will allow you to create a reusable scene that can
> then simply read or include update data files or functions.

This is exactly what I need. I won't be doing many different kinds of scenes but
rather, many different variations of the same scene (with different input
files).

> If you post a sample of your data / function and how you want to
> render it, I'm sure people here will help you get started with a
> basic scene that is suitable for your purposes.

I would be most pleased to take you up on your offer!

I've given as an example the function whose height is given by the real part of
z^(1/3) in the complex plane. However, the trick is that this function is
multi-valued, and so the complete surface must be 'patched together'. Basically,
this is something that's easy to do as data but not so much as a function.

My hope is for some of you in the POV-Ray community can play around with the
data files and show me what POV-Ray is capable of. For example, how easy is it
to create something that looks -as nice- (or even nicer) than what can be
accomplished in just a few lines of Matlab?

I've made things as easy as possible by creating a file directory:
http://www.mediafire.com/?5lb1xpdvflxy6

It includes a pdf file which shows what the data should resemble and what can be
done in Matlab. It also explains the outputs. The zip file contains the data
I've outputted in a variety of formats. This includes:

[mesh_x.dat, mesh_y.dat, mesh_z.dat, mesh_color.dat] These data files describe a
100x300 surface. They were outputted directly from Matlab.

[cubicfun.inc and cubicfun.obj] This is a POV-Ray inc file and also an OBJ file
which was generated with the help of Ankur Pawar's Matlab functions here
(http://sites.google.com/site/workofap/3d/matlab3d) though note that no color
data is provided!

I look forward to seeing what some of you can do with that surface and seeing
what POV-Ray is capable of. Let me know if there's anything I can do to help.


Post a reply to this message

From: Le Forgeron
Subject: Re: Advice for a new user looking for a renderer
Date: 1 Nov 2011 12:50:27
Message: <4eb02353$1@news.povray.org>
Le 01/11/2011 17:00, TSGM nous fit lire :
> Le_Forgeron <jgr### [at] freefr> wrote:
> 
>> There is two approach in renderer: you can compute effect of each light
>> (and even more, separate lightning & shadow) separately, applying each
>> layers on the final result; Or compute everything at once. The latter is
>> the povray approach.
>> Your picture of a julia (well, your citation of) looks like a set of
>> pictures for the former approach (well, the title suggests that to me).
> 
> Dear Le,
> 
> You mention that POV-Ray operates differently in that it applies the lighting
> and shadow all at once. Does that means that it produces fundamentally different
> pictures (either better or worse?). Forgive me for the naive question...

It's just different. Some rendering engines perform with layers, you
play with each layer and updates only the one you changed. Povray is not
that kind. A change means the render is run again.


Post a reply to this message

From: waggy
Subject: Re: Advice for a new user looking for a renderer
Date: 1 Nov 2011 15:10:00
Message: <web.4eb042efcb0d82679726a3c10@news.povray.org>
"TSGM" <nomail@nomail> wrote:
> I've given as an example the function whose height is given by the real part of
> z^(1/3) in the complex plane. However, the trick is that this function is
> multi-valued, and so the complete surface must be 'patched together'. Basically,
> this is something that's easy to do as data but not so much as a function.
>
> My hope is for some of you in the POV-Ray community can play around with the
> data files and show me what POV-Ray is capable of. For example, how easy is it
> to create something that looks -as nice- (or even nicer) than what can be
> accomplished in just a few lines of Matlab?

It will take some tweaking and good texturing to get it to look nice, but I'd
like to demonstrate how POV-Ray is well-suited to visualizing mathematical
surfaces directly.  With a little messing around, I found the following branch
cuts seem match the ones in the illustration.

pow( pow(y,2)+pow(x,2),1/6 )*cos(( atan2(y,x)   )/3)
pow( pow(y,2)+pow(x,2),1/6 )*cos((-atan2(y,x)   )/3)
pow( pow(y,2)+pow(x,2),1/6 )*cos(( atan2(y,x)+pi)/3)
pow( pow(y,2)+pow(x,2),1/6 )*cos((-atan2(y,x)+pi)/3)

With that in mind, the macro isobranch() makes short work of these variations in
the file below.  Note the abs(z+...) construction is used to give the surface a
finite thickness.


#version 3.7;

#local z_min = -pi;
#local z_max =  pi;
#local r     =  1.0;

#macro isobranch(s1,s2)
  isosurface {
    function {
    abs( z+s1*pow( pow(y,2)+pow(x,2),1/6 )
       *cos((s2*atan2(y,x) +pi*(s1>0))/3) )
    }
    threshold 0.005  // Controls the thickness of the surface
    max_gradient 100
    accuracy 0.0001
    contained_by{box{<-r,-r,z_min>,< r, r,z_max>}}
  }
#end

intersection{
  cylinder{<0,0,z_min>*0.9999,<0,0,z_max>*0.9999,r*0.9999}
  union{
    isobranch( 1, 1)
    isobranch( 1,-1)
    isobranch(-1, 1)
    isobranch(-1,-1)
  }//end union
  texture{
    pigment{color rgbt<0.5,0.5,1.0, 0.3>}
    finish{ specular 0.5 phong 0.5}
  }//end texture
}//end intersection

background{color<1,1,1>}

light_source{<-10,-10,10> 1}

camera {
  location <-2,-2,2>
  up z sky z
  right -x*image_width/image_height
  look_at   <0,0,0>
  }


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Advice for a new user looking for a renderer
Date: 1 Nov 2011 15:15:55
Message: <4eb0456b$1@news.povray.org>
TSGM wrote:

> I look forward to seeing what some of you can do with that surface and seeing
> what POV-Ray is capable of. Let me know if there's anything I can do to help.

It should be noted that while povray can make nice renderings of
the geometry, this is not necessarily related to what a typical plot
looks like (that may be intended to convey information about the
structure using contour lines, wireframes and such). Such elements
do not come naturally in the render process and would need to be
constructed as additional geometry.

Regarding the per vertex color information it should be possible
to incorporate it using u-v-mapping but is not straightforward.

Below is a most basic scene that simply renders the cubicfun mesh
geometry in plain white material using fairly high quality lighting
(area light and radiosity) so you can get an impression of that.

Hopefully it already helps to increase the perceived "slickness" ;)

I added some surface roughness to cover the mesh seams, but refrained
from using reflections or shininess as that only serves to highlight the
mesh approximation. Exporting a higher resolution mesh might be useful.

I posted a render at

http://news.povray.org/povray.binaries.images/thread/%3C4eb042fd%40news.povray.org%3E/

-----------------------------

#default {finish {ambient 0}}

#include "colors.inc"
#include "rad_def.inc"

#include "meshfiles\cubicfun.inc"

global_settings
{
   assumed_gamma 1.0
   radiosity {Rad_Settings(Radiosity_Final, off, off)}
   //radiosity {Rad_Settings(Radiosity_Normal, off, off)}
}

camera
{
   location  <0.0, 1.20, -2.2>
   look_at   <0.0, 0.95,  0.0>
   angle 90
}

light_source
{
   < -10,  5, -5> color White
   area_light x,y,9,9 circular orient
}


sphere
{
   0, 1000 pigment {color SkyBlue} hollow
}

plane {y, 0 pigment{checker color White color Black}}

object
{
   cubicfun
   pigment {color White}
   normal  {bozo 0.5 scale 0.01}
   rotate 90*x
   translate y
}


Post a reply to this message

From: Stephen
Subject: Re: Advice for a new user looking for a renderer
Date: 1 Nov 2011 18:48:37
Message: <4eb07745$1@news.povray.org>
On 01/11/2011 4:08 PM, TSGM wrote:
> I look forward to seeing what some of you can do with that surface and seeing
> what POV-Ray is capable of.

And animations.
http://www.youtube.com/watch?v=vNl5NPf4emU


-- 
Regards
     Stephen


Post a reply to this message

From: waggy
Subject: Re: Advice for a new user looking for a renderer
Date: 1 Nov 2011 21:10:00
Message: <web.4eb097cdcb0d82679726a3c10@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> It should be noted that while povray can make nice renderings of
> the geometry, this is not necessarily related to what a typical plot
> looks like (that may be intended to convey information about the
> structure using contour lines, wireframes and such). Such elements
> do not come naturally in the render process and would need to be
> constructed as additional geometry.
>
Although this is true for an arbitrary mesh, when rendering a function it's
often possible to map the function (or its inverse) to a repeating pattern and
use that as a texture.

In this case, another, simpler alternative is to simply extrude a polar graph
paper pattern.  Applying the layered texture below results in a render similar
to the illustration, with black radial and circumferential lines, though it has
a solid base color.  (Radial gradients applied to each branch so the colors
match at the ends could also be used.)

#include "colors.inc"
....
  texture{ pigment{
    radial frequency 10 triangle_wave
    color_map{
      [0 Black][0.02 Black]
      [0.02 Violet+<0,0,0,0.85>]
      [0.98 Violet+<0,0,0,0.85>]
      [0.98 Black][1 Black]}
    rotate 90*x
    }
    finish{ specular 0.5 phong 0.5}
  }//end texture
  texture{ pigment{
    wood scale 0.2 triangle_wave
    color_map{
      [0 Black][0.04 Black]
      [0.04 Clear] [0.96 Clear]
      [0.96 Black][1 Black]}
    }
    finish{ specular 0.5 phong 0.5}
  }//end texture
....


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.