We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Point (0,0) in LD3DView image mapping
#12
Hi,

The textxtures parameter help info is:

A space or colon deliminated list of the texture coordinates for each node.  Each node has 2 values between 0 and 1 indicating the x,y image mapping to the node. The may be defaulted to "" if the texture has previously been set.

So the space and colon are deliminators and I used : to separate between x y pairs to make it easier to read.

The are 2 triangles on this 3D object (square).  Although 2 nodes could be shared they were specified separately so there are 6 nodes.  There are are also 6 x y pairs of textiure cordinates, one for each triangle node.

So the purpose of the each texture node is to say what coorcinates ont the image the node corresponds to.  The first is 0 0 which is bottom left of the image mapped to the first node.  The second is 1 0 which is bottom right of the image mapped to the second node tec.

The mapping coordinates do not have to be whole numbers, see the effect using just the left half of the image for example "0 1:0.5 1:0.5 0:0.5 0:0 0:0 1".
[-] The following 2 users Like litdev's post:
  • AbsoluteBeginner, stevantosic
Reply


Messages In This Thread
RE: Point (0,0) in LD3DView image mapping - by litdev - 02-23-2024, 05:00 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)