| 
  | 
Le 16/08/2011 08:30, Saket a écrit :
>> Just an idea: keep the sponge dry and add filtering/transmitting spheres
>> based on wetness.
>> If dry->wet darkens, a normal filtering is fine. (range 0 to 1)
>> If dry->wet lighten, you need a filtering factor which multiply the
>> actual colour.
(actually, that would be a transmit factor > 1)
>>
>> If the triangle mesh was open to update with its own texture (no need to
>> UV map), it would be a simpler issue of using a palette of texture based
>> on wetness.
> 
> Hi,
> 
> Thanks for the reply.
> 
> As to your first point are you suggesting adding filtering spheres outside every
> wet triangle?
I'm dumber. outside every wet vertex. (yes, a lot of tiny spheres!)
You need to raise max_trace_level a lot if not using version 3.7;
> 
> Can you explain your last point?
Mesh can have a texture per vertex (see the mesh2 syntax).
> mesh2 {
>    vertex_vectors {
>       9, 
>       <0,0,0>, <0.5,0,0>, <0.5,0.5,0>,
>       <1,0,0>, <1,0.5,0>, <1,1,0>   
>       <0.5,1,0>, <0,1,0>, <0,0.5,0> 
>    }
>    texture_list {
>       3,
>       texture{pigment{rgb <0,0,1>}}
>       texture{pigment{rgb 1}}
>       texture{pigment{rgb <1,0,0>}}
>    }
>    face_indices {
>       8, 
>       <0,1,2>,0,1,2,  <1,3,2>,1,0,2,
>       <3,4,2>,0,1,2,  <4,5,2>,1,0,2,
>       <5,6,2>,0,1,2,  <6,7,2>,1,0,2,
>       <7,8,2>,0,1,2,  <8,0,2>,1,0,2
>    }
> }
Assuming you start with a dry mesh with a texture list of 10 textures,
and you have 20 degrees of wetness (per dry texture),
the dry-mesh with 10 textures would transform into a dry-and-wet-mesh
with 200 textures.
On the specification of the face_indices, your program would simply put
the right texture index according to the original mesh and the wetness.
 Post a reply to this message 
 | 
  |