# make triangle.

This topic is 4493 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

when I know four corners of a quad in 3d,and some vertices on edge of the quad or in quad. how to make triangle list ,so I can map it and render it. the problem from here. I want to make a footprint on ground. I project quad to ground and get a quad on ground. so the question above occur.

##### Share on other sites
I'm afraid I don't get what you want.

##### Share on other sites
Quote:

yes, decals is what i need.
but I wanna decals on non-plat wall and ground.it seem too complex. someone give some links about that? google decals give more unuseful links hard to found them.

##### Share on other sites
I just implemented decals for my terrain engine yesterday. I simply calculated the rectangle of the decal as:

rect.left = Floor(x - size / 2)
rect.top = Floor(y - size / 2)
rect.right = Ceil(x + size / 2)
rect.bottom = Ceil(x + size / 2)

Then I extracted the points from the heightmap to build a trianglestrip quad. After that you'll have to make a texture matrix to offset the decal texture. The texture need to be clamped btw. - Render it blended!

##### Share on other sites
Quote:
 Original post by DanielHI just implemented decals for my terrain engine yesterday. I simply calculated the rectangle of the decal as:rect.left = Floor(x - size / 2)rect.top = Floor(y - size / 2)rect.right = Ceil(x + size / 2)rect.bottom = Ceil(x + size / 2)Then I extracted the points from the heightmap to build a trianglestrip quad. After that you'll have to make a texture matrix to offset the decal texture. The texture need to be clamped btw. - Render it blended!

could you explain more detail? what does x,y mean? does it mean center of quad?
what does left top right bottom mean in rectangle?
does it mean :?
left      top|---------||         | |         ||         ||---------|bottom     right

##### Share on other sites
i'm just looking for some advices about how to make a triangle.

1. 1
Rutin
42
2. 2
3. 3
4. 4
5. 5

• 9
• 27
• 20
• 14
• 14
• ### Forum Statistics

• Total Topics
633390
• Total Posts
3011631
• ### Who's Online (See full list)

There are no registered users currently online

×