[Radiance-general] texture mapping

atelier iebele abel - toren.com [email protected]
Thu, 22 May 2003 14:26:06 +0200


Hi Greg,

Thanks for your reply. I start to get some bettter results, but still I
have some questions:


Q1.

I experimented  with texture cordinates in the tmesh.cal parameters.
Instead of u and v I used  :
mod(u,max(1,1))  mod(u,max(1,1))
I don't know what this really means, but I tried to tile the texture,
like in picture.cal (tile_u tile_v)
I get good results for only one part of my model ( the trunk of the tree
) but other parts (the leaves) act very strange.
Do you have a suggestions? And where can I find some documentation about
mod, frac, tri etc... (It is not explained in the book, is it?)


Q2.

When using tmesh2rad I specify a picture (-p). But what if I need a
tranparant texture?
Following your suggestion somewhere else in this discussion I create a
transparant picture like the example below.
These do not have texture coordinates like above, but as you will
understand, I cannot write such for each triangle of a leave (more as
20.000 in a tree).
Do you have a tip or workaround for this?


Iebele


________________
#my transparant picture example

void colorpict AL05lef 15 red green blue
/disk12/_3DLIB/bomen/AL05_Aesculus_hippocastanum_Horse_Chestnut/AL05lef.pic

picture.cal
tile_u tile_v
-s 1
-rx  0
-ry  0
-rz  0
0 1 1

AL05lef plastic AL05lef_map
0 0 5
1 1 1
0 0

void mixpict  leaf_col_leaf2
11  AL05lef_map  void green
/disk12/_3DLIB/bomen/AL05_Aesculus_hippocastanum_Horse_Chestnut/AL05lef-alpha.pic

picture.cal tile_u tile_v -s 1.0 -rz 0
0
0

______________________________




Greg Ward wrote:

> Check out the thread on "Using OBJ2MESH utility" -- this talks about
> the new mesh primitive in Radiance 3.5 for mapping uv coordinates on
> complex mesh geometry.  I think this could help you a lot.
>
> -Greg
>
> > From: "atelier iebele abel - toren.com" <[email protected]>
> > Date: Fri May 16, 2003  5:50:03  AM US/Pacific
> >
> > Hi community,
> >
> > I have a question regarding texture mapping.
> > For rendering leaves of a tree a I have a scanned photograph that I
> > have to
> > map on the geometry of a leave.
> > Each leave is a created (in the software xfrog) as a triangle mesh
> > that has
> > for each vertex  x,y,z coordinates, a normal vector and u and v
> > coordinates.
> >
> > Having this information, how do I use colorpict to map the photo
> > exactly right
> > on each triangle ?
> > Any hints are helpfull.
> >
> > Iebele
> >
> > For those who like to see the project involved (work in progress,
> > quicktime
> > vr's), look at
> > http://www.toren.com/maris
>
> _______________________________________________
> Radiance-general mailing list
> [email protected]
> http://www.radiance-online.org/mailman/listinfo/radiance-general