Supposedly in a scenario there are, among other things, a tarmac strip and a meadow. The tarmac has an asphalt texture and its model is a triangle strip long that might bifurcate at some point into other tinier strips, and suppose that the meadow is covered with grass.

What can be done to make the two graphical entities seem less cut out from a photo and just pasted one on top of the other at the edges? To better understand the problem, picture a strip of asphalt and a plane covered with grass. The grass texture should also "enter" the tarmac strip a little bit at the edges (i.e. feathering effect).

My ideas involve two approaches:

  • put two textures on the tarmac entity, but that involves a serious restriction in how the strip is modeled and its texture coordinates are mapped


  • try and apply a post-processing filter that mimics a bloom effect where "grass" is used instead of light. This could be a terrible failure to achieve correct results.

So, is there a better or at least a more obvious way that's widely used in the game dev industry?


This is a conceptual question, I do not require a specific shading language or framework. In real life, I use Cg with Ogre for rendering experiments. If I supply two textures and two different texture coordinate sets for the tarmac entity, I can analyze the second texture coordinate set in the fragment shader and do some blending depending on the .y component of the uv pair, but that requires the artist to hand-craft every asphalt/tarmac runway in the scenario and it looked to me that this is probably the wrong way to tackle the issue.

  • 1
    \$\begingroup\$ You need a workflow and tools that allow to make designers life easy in the first place. When the road gets placed, said blending should be applied automatically or with a least effort (f.e. "blend through gravel/blend through sand" switch). Do not hardcode/bake the blends in case road needs to be moved. \$\endgroup\$
    – Kromster
    Sep 27 '12 at 18:34
  • \$\begingroup\$ Is the grass just a 2d texture, or something more complicated? \$\endgroup\$ Sep 27 '12 at 18:51
  • \$\begingroup\$ @KromStern that's a very good remark, I'm also interested in this idea you mention. Do you suggest to store a details/blendmap texture and through that decide which particular terrain texture to use at the edges of the road strip? As the OP suggested, blending at the edges could be done based on the uv components, provided that attribute is cleverly mapped. If this is not what you had in mind, do you know of any way a "road" strip can be made aware what texture it has in its vicinity? (this sounds like another of the OPs suggestions, i.e. some sort of blur/bloom, but that's too expensive). \$\endgroup\$
    – teodron
    Sep 27 '12 at 20:37


Add a weight to each texture by adding extra texcoords in a shader to your vertex declaration.

You haven't supplied what language you'd like this in (or even whether it's a programming question, but that's an assumption on my part), but Riemers provides a good tutorial using C# and XNA and also explains the concept here.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.