adjust an image into a GL triangle

shaker08's picture

hi ! im triying to expand the image to the borders of the triangle using "image crop" but when i conect it to a gl triangle the image disappear.. i add two pictures, as you can see the "U1 V1 U2 V2..." is the same in both pictures , only change the image dimension .... any ideas to fix it please ??? thanks !!!

PreviewAttachmentSize
first.png
first.png157.92 KB
second.png
second.png183.72 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cybero's picture
Re: adjust an image into a GL triangle

What I see in your images is GL Triangle without image input, GL Triangle with un-cropped image input and no GL Triangle with cropped image input. See attached for an example working with cropped image input onto two overlaid GL Triangle patches. It's pretty basic ; I couldn't reproduce the wireframe look that the second image you posted showed. The only way I could reproduce was to adumbrate the specified construct by deploying a Polygon Mode patch wrapping the GL Triangle, set to Wireframe.

PreviewAttachmentSize
imageongltriangle.qtz329.81 KB

shaker08's picture
Re: adjust an image into a GL triangle

sorry cybero but i think you dont understand my problem... i add a composition. And my question is .. what i have to do to expand the image into the triangle to link the image dimension with the dimension of the triangle.. i try using image crop but when i up the dimension from the original dimesion nothing happens... i dont known if image crop is the way to do that ... any ideas please!!?? thanks

PreviewAttachmentSize
triangle problem.qtz191.52 KB

shaker08's picture
Re: adjust an image into a GL triangle

with image resize doesnt work neither ... anyone can help me please ???

PreviewAttachmentSize
triangle problem 2.qtz191.39 KB

dust's picture
Re: adjust an image into a GL triangle

the easiest way to fix your problem is to use a image texture that can be uv mapped correctly. (see pic) the purple area will not render only the magenta and lines.... also it is possible to just use a triangle mesh (see patch), or to complicate things a great deal its also possible to render just one triangle strip out of lets say a cube model by using just one face's indices (see patch). you more than likely will never go the 3rd route but it does illustrate how gl triangles work.

PreviewAttachmentSize
traingle_uv.png
traingle_uv.png45.22 KB
gl_triangle_uv_map.qtz74.07 KB
cube-tri_poly.zip482.41 KB

shaker08's picture
Re: adjust an image into a GL triangle

yeah thanks dust !! i choose the easy way because i dont understand how mesh works .. but this skill solved my problem , easy and perfect excelent!