POV-Ray : Newsgroups : povray.binaries.images : film, spline triangle test (213 kb) Server Time
6 Nov 2024 04:19:34 EST (-0500)
  film, spline triangle test (213 kb) (Message 1 to 7 of 7)  
From: Jaap
Subject: film, spline triangle test (213 kb)
Date: 18 Mar 2005 18:40:01
Message: <web.423b66404b8d670ea8399d8d0@news.povray.org>
testing a macro to subdivide triangles along two splines, with UV mapping.
(no smooth triangles where used)

jaap.
---------------------------------------------------------
#declare splineBot = spline {
  cubic_spline
 -1, <  60, -20,0>
  0, <  40, -70,0>
  1, <   0,-110,0>
  2, < -60, -90,0>
  3, <-100, -40,0>
  4, <-110,  30,0>
  5, < -60, 100,0>
  6, <  10,  70,0>
  7, <  20,  30,0>
}
#declare splineTop = spline {
  cubic_spline
 -1, <  60, -20,30>
  0, <  40, -70,30>
  1, <   0,-110,30>
  2, < -60, -90,30>
  3, <-100, -40,30>
  4, <-110,  30,30>
  5, < -60, 100,30>
  6, <  10,  70,30>
  7, <  20,  30,30>
}
//   -0-------1-------2-------3-------4-------5-------6- =splineTop
// V   1 1---2 1 1---2 1 1---2 1 1---2 1 1---2 1 1---2
// ^   |\ \ B| |\ \ B| |\ \ B| |\ \ B| |\ \ B| |\ \ B|
// |   | \ \ | | \ \ | | \ \ | | \ \ | | \ \ | | \ \ |
// |   |A \ \| |A \ \| |A \ \| |A \ \| |A \ \| |A \ \|
// |   2---3 3 2---3 3 2---3 3 2---3 3 2---3 3 2---3 3
//   -0-------1-------2-------3-------4-------5-------6- =splineBot
//
// 0   ------> U
#declare frames= 6;   // number of frames
#declare parts = 1;  // parts per frame (1..10 1=no sub devision)

mesh{
  #local frameNr = 0.0;
  #while(frameNr < frames)
    #local part = 0.0;
    #while(part < parts)
      #local partStart = part/parts;
      #local partEnd   = partStart+(1/parts);
      triangle { // A:
        splineTop(frameNr+partStart),
        splineBot(frameNr+partStart),
        splineBot(frameNr+partEnd  )
        uv_vectors <partStart,1>, <partStart,0>, <partEnd,0>
      }
      triangle { // B:
        splineTop(frameNr+partStart),
        splineTop(frameNr+partEnd  ),
        splineBot(frameNr+partEnd  )
        uv_vectors <partStart,1>, <partEnd  ,1>, <partEnd,0>
      }
      #local part = part + 1.0;
    #end
    #local frameNr = frameNr + 1.0;
  #end
  texture {
    uv_mapping
    pigment { image_map { png "frame.png" interpolate 2 filter all 1.0 } }
    finish {
      diffuse    0.8
      reflection 0.2
    }
  }
}


Post a reply to this message


Attachments:
Download 'film.jpg' (213 KB)

Preview of image 'film.jpg'
film.jpg


 

From: Lance Birch
Subject: Re: film, spline triangle test (213 kb)
Date: 18 Mar 2005 22:43:14
Message: <423b9fd2$1@news.povray.org>
Nice!  This could be very useful for the Internet Movie Project (www.imp.org)
who have been looking for such a system exactly like this for a new logo
animation.

Excellent work!

Lance.

thezone - thezone.firewave.com.au
thehandle - www.thehandle.com


Post a reply to this message

From: Jaap
Subject: Re: film, spline triangle test (213 kb)
Date: 19 Mar 2005 01:45:00
Message: <web.423bc961c60d457fa8399d8d0@news.povray.org>
"Lance Birch" <-> wrote:
> Nice!  This could be very useful for the Internet Movie Project (www.imp.org)
> who have been looking for such a system exactly like this for a new logo
> animation.
>
> Excellent work!
thanks!.
is that project still alive? the "Latest News" on there site is from
December 30 2003...

I was actually going to use it for a logo:
http://jwstolk.afreehost.net (under construction)

jaap.


Post a reply to this message

From: James D
Subject: Re: film, spline triangle test (213 kb)
Date: 20 Mar 2005 02:56:55
Message: <423d2cc7@news.povray.org>
Good stuff.


Post a reply to this message

From: Jaap
Subject: Re: film, spline triangle test (213 kb)
Date: 20 Mar 2005 08:40:00
Message: <web.423d7c87c60d457fa8399d8d0@news.povray.org>
update:

 -manipulating two splines in 3D was to hard (top and bottom ege of film),
  so now there is a single spline thrue the center of the film, and the top
  and bottom edges are calculated (spline must always be curved!)
 -using macro's. (i tryed making a user defined function that returns a
vector,
  but this dous not seem to be possible)
 -frame start/end is not longer linked to the control points of the spline,
  you can use any distance between control points, and set the frame size
  independently. (the frames are no longer counted, you will have to add
this
  in case you want to texture each frame differently)
 -using smooth_triangle, witch calculated normals, becouse the reflections
  looked bad, even with 20 parts/frame.
 -code cleanup.

source: http://jwstolk.afreehost.net/film_test_2.pov.gz

going to try HDR lighting now...

Jaap.


Post a reply to this message


Attachments:
Download 'film_test_2.jpg' (81 KB)

Preview of image 'film_test_2.jpg'
film_test_2.jpg


 

From: Jaap
Subject: Re: film, spline triangle test (213 kb)
Date: 20 Mar 2005 10:15:00
Message: <web.423d931ac60d457fa8399d8d0@news.povray.org>
if you thought that the above image looks bad, you are right!

camera right= image_width/image_height -> x*image_width/image_height
i could not find why some frames looked distorted, even after
automating frame start/end, i even moved the control points of
the spline, because the whole thing looked to narrow. then i drew
a reflective sphere, to test HDR, and... hm, that odd...
(source will be updated when i have added HDR)

sorry,
jaap.


Post a reply to this message


Attachments:
Download 'film_test_2.jpg' (51 KB)

Preview of image 'film_test_2.jpg'
film_test_2.jpg


 

From: Jaap
Subject: Re: film, spline triangle test (213 kb)
Date: 20 Mar 2005 12:45:00
Message: <web.423db62fc60d457fa8399d8d0@news.povray.org>
final result using HDR sphere + radiosity.
I think the radiosity errors are the result of setting the ambient of the
HDR mapped sphere to 400. Are there any tutorials about using
HDR + radiosity?

(update) source:
http://jwstolk.afreehost.net/film_test_2.pov.gz

Jaap.


Post a reply to this message


Attachments:
Download 'film_hdr_final.jpg' (82 KB)

Preview of image 'film_hdr_final.jpg'
film_hdr_final.jpg


 

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