POV-Ray : Newsgroups : povray.newusers : Advice for a new user looking for a renderer Server Time
30 Jun 2024 14:45:33 EDT (-0400)
  Advice for a new user looking for a renderer (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
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

From: TSGM
Subject: Re: Advice for a new user looking for a renderer
Date: 2 Nov 2011 00:45:05
Message: <web.4eb0ca4ecb0d826731848b5f0@news.povray.org>
Dear waggy, Christian, and Stephen,

Thank you all for the input.

I'm still going through some of the quick codes you've written for me, and still
learning. However, some quick thoughts:

"waggy" <hon### [at] handbasketorg> wrote:

> Although this is true for an arbitrary mesh, when rendering a function...

Although I understand the advantages of functions vs. mesh data, I want to keep
the conversation focused on mesh definitions; it's the more general scenario,
and I want to see that POV-Ray can do in this respect.

I want to also raise the point that Christian made about the difficulty (he
didn't quite say 'difficult') with coloring the meshes.

My main concern with beginning to learn POV-Ray was due to Ankur Pawar, who has
a wonderful gallery on flicker:
http://www.flickr.com/photos/powerofankur/

You can also see that he has some beautiful surfaces rendered in Sunflow:
http://www.flickr.com/photos/powerofankur/5771193670/
http://www.flickr.com/photos/powerofankur/5210558726/
http://www.flickr.com/photos/powerofankur/4792169852/

From what I gather, these were all generated from mesh data and not function
descriptions. Notice also that the color of the meshes were generated in Matlab
for some of these (I will have to ask him how he did that!)

From my correspondence with Ankur, he mentioned that he preferred Sunflow, as he
found it much easier to generate these sorts of results, in contrast with
POV-Ray.

Of course, I'm left to wonder whether POV-Ray is -just as good- and can generate
the same sort of results with a modest degree of effort.

Comments? Hopefully, I will e-mail this thread to Ankur, and perhaps he will
join us in the discussion as well.


Post a reply to this message

From: waggy
Subject: Re: Advice for a new user looking for a renderer
Date: 2 Nov 2011 01:20:07
Message: <web.4eb0d233cb0d82679726a3c10@news.povray.org>
> "waggy" <hon### [at] handbasketorg> wrote:
>
> > Although this is true for an arbitrary mesh, when rendering a function...
>
> Although I understand the advantages of functions vs. mesh data, I want to keep
> the conversation focused on mesh definitions; it's the more general scenario,
> and I want to see that POV-Ray can do in this respect.

Ah, but surface texture definitions apply regardless of the type of object.  The
texture I posted should look pretty much the same on a mesh.  (The only issues I
can think of being how well it hides or accentuates discretization artifacts,
and that it will be applied to one surface rather than two so a transparency
adjustment may be in order.)


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Advice for a new user looking for a renderer
Date: 2 Nov 2011 15:35:10
Message: <4eb19b6e@news.povray.org>
waggy wrote:

> Ah, but surface texture definitions apply regardless of the type of object.

not quite, as some textures may be difficult to define as 3d pattern,
but only some objects support uv-mapping.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Advice for a new user looking for a renderer
Date: 2 Nov 2011 16:14:22
Message: <4eb1a49e@news.povray.org>
TSGM wrote:

> I want to also raise the point that Christian made about the difficulty (he
> didn't quite say 'difficult') with coloring the meshes.

Actually I just noticed that the mesh2 object supports specifying a
texture index for each face separately. So, the functionality is already
there and it shouldn't be too hard to extend the output of the surf2pov
function with color information.

In order to still retain control over other aspects of the texture
the exported texture list could call a FACE_TEXTURE(COLOR) macro that
needs to be defined by the scene prior to #including the data.

> From what I gather, these were all generated from mesh data and not function
> descriptions. Notice also that the color of the meshes were generated in Matlab
> for some of these (I will have to ask him how he did that!)

As far as I see only two of his images are tagged with povray and those
do not look like precolored meshes.

> Of course, I'm left to wonder whether POV-Ray is -just as good- and can generate
> the same sort of results with a modest degree of effort.

One of the problems may also be that your requirements are still a
bit vague. The Julia reference from your first post is quite a different
beast than a colored mesh plot.


Post a reply to this message

From: Ankur Pawar
Subject: Re: Advice for a new user looking for a renderer
Date: 5 Nov 2011 03:50:01
Message: <web.4eb4e9bbcb0d8267e2ecd1400@news.povray.org>
Hello everyone,

      I use that functionality of povray which can be generated form other
software or language and can be exported. Till now I have not used textures in
povray mesh.When MATLAB generates a mesh or surf it also assign colors to its
faces we can easily get those colors and export it.


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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