|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Could it be possible to add a new and easier to use mesh type to povray 4?
From what I've seen elsewhere, it looks quite cumbersome and confusing to
write a mesh using smooth triangles.
How about a syntax like this:
mesh3{
triangle{p1,p2,p3
pigment{rgb1, rgb2,rgb3} // blended colours
// or
pigment{uv1,uv2,uv3} // using image texture, only from mesh
// or
pigment{rgb} // solid colour triangle
smooth_vect{v1,v2,v3} // only used if smooth turned on in mesh
}
image{filename} // used to specify texture
smooth on // uses smooth_vect values for individual triangeles
// works like in heightfield for any non-smoothed triangles
tesselate on // uses tesselation to create curved surfaces, curve would
// probably be based on smoothvect, and verticies from nearby
// triangles
}
This looks like it would be more understandable when writing meshes by hand.
It would probably take longer to parse though.
What do you think?
Rohan _e_ii
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rohan Bernett wrote:
> Could it be possible to add a new and easier to use mesh type to povray 4?
> From what I've seen elsewhere, it looks quite cumbersome and confusing to
> write a mesh using smooth triangles.
>
> How about a syntax like this:
[SNIP, I leave it to the others...]
> smooth on // uses smooth_vect values for individual triangeles
> // works like in heightfield for any non-smoothed triangles
Interesting (with irony!): How do you create the smoothness information
? By magic of the code, I presume ?
You might want to have a look at my tesselation patch which has a
'smooth' primitive (input a mesh, output a smooth mesh). There is too
many way to compute a smooth normal at a vertex for a collection of
triangle. see http://jgrimbert.free.fr/pov/patch/tessel/smooth.html
(beware, it's in french, so babelfish might help you too!)
> tesselate on // uses tesselation to create curved surfaces, curve would
> // probably be based on smoothvect, and verticies from nearby
> // triangles
First that's not 'tesselate', it is 'surface subdivision' in your case.
Tesselation is when you have a finite solid object and end up with a mesh.
Subdivision is when you have a raw mesh and end up with a finer mesh
(with far more triangle, obviously intelligently placed...).
You should probably have a look at the bicubic patch object in Povray.
> }
>
> This looks like it would be more understandable when writing meshes by hand.
> It would probably take longer to parse though.
>
> What do you think?
There is more than mesh in native Pov.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rohan Bernett <rox### [at] yahoocom> wrote:
> pigment{rgb1, rgb2,rgb3} // blended colours
I don't understand why it would be necessary to extend the pigment syntax
just to make writing a mesh "easier".
Why do you want the 'pigment' keyword there anyways?
Besides, meshes take textures, not just pigments.
The other things were commented already in another post...
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <web.3da4f198f1acbd18ccf4f70@news.povray.org>,
"Rohan Bernett" <rox### [at] yahoocom> wrote:
> This looks like it would be more understandable when writing meshes by hand.
> It would probably take longer to parse though.
It really looks like you've misunderstood the entire texture syntax.
Your "pigment {blah1, blah2, blah3}" syntax would break consistency with
every other use of pigments, and would take a lot of work to implement.
And I don't know why you want some kind of "image{}" block that is
nothing like any other texture syntax in POV.
Your "smooth_vect" should say what it is: "normals", and the braces are
unnecessary clutter there. Your "tesselate" is really subdivision, and
would need a lot more parameters than just on/off. Similar for
smoothing: there are several possible algorithms to choose from.
Aside from all that, your proposed syntax really looks more cumbersome
to me, and it doesn't add anything that couldn't be added to the current
syntaxes and retain backwards compatibility.
Here is my proposal:
mesh {MESH_IDENT //add ability to deep-copy existing mesh.
//these are supported just like they are now, with a few
//restrictions loosened...no need for declared textures, for example.
//The syntax would be exactly the same as for triangles outside a
//mesh.
smooth_triangle ...
triangle ...
//new syntax for smooth triangles:
//If 6 vectors are specified, it is smooth
triangle {p1, n1, p2, n2, p3, n3 ...}
//Any shape can be tesselated into the mesh. The new triangles are
//simply added to the mesh. Each shape can have its own specialized
//tesselation methods...no need to re-tesselate height fields or
//triangle primitives.
tesselate {SHAPE TESSELATION_PARAMETERS}
auto_smooth {SMOOTH_PARAMS}
displace {DISPLACEMENT_ITEMS}
subdivide {SUBDIVISION_PARAMS}
}
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christopher James Huff <chr### [at] maccom> wrote:
> displace {DISPLACEMENT_ITEMS}
Perhaps better:
function { FUNCTION } // each vertex is transformed according to this
This function would be given extra information besides the x, y and z
of the vertex point (eg. the normal vector at the vertex, for example
named nx, ny and nz).
Of course transforming vertices usually invalidates previously existing
normal vectors, so they must be either recalculated or entered otherwise
by the user. This is a bit problematic.
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3da76bd0@news.povray.org>, Warp <war### [at] tagpovrayorg>
wrote:
> Perhaps better:
>
> function { FUNCTION } // each vertex is transformed according to this
>
> This function would be given extra information besides the x, y and z
> of the vertex point (eg. the normal vector at the vertex, for example
> named nx, ny and nz).
That would be one possible displacement type. I wouldn't want it to be
the only one, and just "function {}" seems like a very bad syntax
decision, it says nothing about what the function is for.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>Interesting (with irony!): How do you create the smoothness information
>? By magic of the code, I presume ?
What about using the center of the object as a reference point to calculate
the smooth vectors?
>First that's not 'tesselate', it is 'surface subdivision' in your case.
Then why is it somtimes referred to as tesselation?
Rohan _e_ii
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
It's meant to be a way of specifying different colours to each vertex.
Apologies for the confusion, as I hardly ever use textures, and am not used
to using them.
And just in case you were wondering, I haven't tried writing a mesh by hand
yet. Come to think of it, I haven't used a mesh in any of my scenes yet, no
idea why.
Rohan _e_ii
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>It really looks like you've misunderstood the entire texture syntax.
>Your "pigment {blah1, blah2, blah3}" syntax would break consistency with
>every other use of pigments, and would take a lot of work to implement.
There are pigments with more than one rgb, such as the checker and hexagon
patterns.
After all the telling off for my ignorance and stupidity regarding meshes,
I'm sorry I made the post in the first place. :-(
Rohan _e_ii
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <web.3daa28bc7d95834218ccf4f70@news.povray.org>,
"Rohan Bernett" <rox### [at] yahoocom> wrote:
> There are pigments with more than one rgb, such as the checker and hexagon
> patterns.
But that is an entirely different case: one pigment with one pattern
that takes several solid colors instead of a blend of colors. This is 3
pigment items in a place where there should only be 1.
A triangle_blend pattern would at least be consistent, but wouldn't be
very useful.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|