|
|
Rune wrote:
> Actually, uv-mapping should be easy to make, as the whole patch seems to
> be based on uv coordinates in the first place.
That's true. There is also w which is dependant of u and v.
> Well, the tricky part is
> to write the triangles as a mesh2 rather than a regular mesh.
mesh support uv_mapping as well. So you can add support for uv_mapping when
you add 'uv_vectors uv1,uv2,uv3' in the triangle and smooth_triangle
definition (just after all points, this is about line 50 and 57).
However you have to see that not the whole uv space from <0,0> to <1,1> is
mapped onto the triangle but only half of it!
>
> When writing the patch as a mesh2, the vertices have to come in a
> logical order. The subdivision algorithm doesn't calculate the vertices
> in a very intuitive order, but I've found out that the subdivision
> approach isn't needed at all - the triangles can be made in a simple
> double loop. This also means that the number of triangles per edge is
> not limited to a power of two, but can be any number.
I do not really see an easy non-recursive way that does an equally sized
subdivison.
>
> By the way - even though I can modify a few aspects of the code, I still
> have no clue about the math behind it and the functions used, so I won't
> be able to make the 5 and 6 sided patches myself. I'm still looking
> forward to get my hands on those. :)
>
I'll try 5 and 6 sided as well. But these formulas probalby are quite a bit
messy.
- Micha
--
http://objects.povworld.org - the POV-Ray Objects Collection
Post a reply to this message
|
|