Texture blending possible yet?

ArkArk Join Date: 2009-08-15 Member: 68489Members
Is it possible to do any sort of blending between textures yet?

I've been wanting to make some terrain tests and its kinda bland without any sort of texture blending. Its also useful for breaking up repetition on other meshes like walls and such. If you've played Uncharted 2, you can see they use it extensively throughout the game, blending between brick and plaster and such.

I've been hoping UW add support for vertex colour blending, particularly something similar to the video below, where theres an extra 'modulate map' that controls the transition between the textures: <a href="http://developer.valvesoftware.com/wiki/$blendmodulatetexture" target="_blank">http://developer.valvesoftware.com/wiki/&#...modulatetexture</a>

<a href="http://www.youtube.com/watch?v=0V6bit8PrZo" target="_blank">http://www.youtube.com/watch?v=0V6bit8PrZo</a>

A great thread on the topic: <a href="http://www.polycount.com/forum/showthread.php?t=66952" target="_blank">http://www.polycount.com/forum/showthread.php?t=66952</a>

Anyone with shader writing skills willing to mod this in?

Comments

  • InsaneInsane Anomaly Join Date: 2002-05-13 Member: 605Members, Super Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, NS2 Map Tester, Subnautica Developer, Pistachionauts, Future Perfect Developer
    edited August 2010
    There's nothing like that that I'm aware of at the moment. Given that we're doing indoor sci-fi environments and this sort of thing is usually used for terrain, it's not that big a priority to get this implemented.
  • TquilaTquila Join Date: 2010-02-26 Member: 70738Members, NS2 Playtester
    I would also imagine the Dynamic Infestation could do some of this for us. Depending on the impact (weather it's just goey stuff or actually rusting ahead of the infestation), that could probably do what you want.
  • InsaneInsane Anomaly Join Date: 2002-05-13 Member: 605Members, Super Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, NS2 Map Tester, Subnautica Developer, Pistachionauts, Future Perfect Developer
    Oh, good point about DI actually. I don't know exactly what kind of system it uses, but it could involve something like what you're after.
  • ArkArk Join Date: 2009-08-15 Member: 68489Members
    Well, DI in the videos just seems to use a single material.
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    True, but it does seem to blend or use some kind of alpha on darker parts near the edges from what I can see. It looks so awesome even for a demo <img src="http://members.home.nl/m.borgman/ns-forum/smileys/biggrin.gif" border="0" class="linked-image" />
  • LazerLazer Join Date: 2003-03-11 Member: 14406Members, Contributor, Constellation, NS2 Playtester
    I like this. Definitely useful for DI. Also we are already using a lot of terrain-like areas for caves etc so I can already see use for it. On top of that say we have a couple versions of a texture where one is dirty and one is clean we could then blend the two to give the effect of it dirty in certain areas etc.

    From a technical perspective it isn't that hard to code (in comparison to the other features). I'm surprised texture blending support doesn't already exist in the engine. It would be a little tougher to implement in the editor however because the user has to be able to 'paint' the multi-texture surfaces. The painted surfaces are then translated to alpha maps that the pixel shader on the video card will use to determine how much of each texture to use per pixel on each face. (100% white = texture1, 0% = texture2, 50% = half each texture etc...) doesn't have to be 2 textures either. Could use an rgba texture map for 4 different textures but this starts to get unnecessary.

    Although there are much more needed features/fixes to be added in I don't see this feature too ridiculous of a request or too difficult to pull off.
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited August 2010
    Indeed, it will give us much more textures, without creating much more textures. Giving maps that unique look, even when using the same set. It's usefulness will spread into the technological textures as well...
  • crodecrode Join Date: 2002-11-09 Member: 7876Members
    I would prefer some type of decal placement like hammer uses. The one where you can throw cracks or graffiti onto a generic wall. It can also be used for the bullet marks.
  • ArkArk Join Date: 2009-08-15 Member: 68489Members
    edited August 2010
    <!--quoteo(post=1792090:date=Aug 5 2010, 07:19 PM:name=Lazer)--><div class='quotetop'>QUOTE (Lazer @ Aug 5 2010, 07:19 PM) <a href="index.php?act=findpost&pid=1792090"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I like this. Definitely useful for DI. Also we are already using a lot of terrain-like areas for caves etc so I can already see use for it. On top of that say we have a couple versions of a texture where one is dirty and one is clean we could then blend the two to give the effect of it dirty in certain areas etc.

    From a technical perspective it isn't that hard to code (in comparison to the other features). I'm surprised texture blending support doesn't already exist in the engine. It would be a little tougher to implement in the editor however because the user has to be able to 'paint' the multi-texture surfaces. The painted surfaces are then translated to alpha maps that the pixel shader on the video card will use to determine how much of each texture to use per pixel on each face. (100% white = texture1, 0% = texture2, 50% = half each texture etc...) doesn't have to be 2 textures either. Could use an rgba texture map for 4 different textures but this starts to get unnecessary.

    Although there are much more needed features/fixes to be added in I don't see this feature too ridiculous of a request or too difficult to pull off.<!--QuoteEnd--></div><!--QuoteEEnd-->


    The vertex painting could be done in a 3d app, not asking for a feature like UDK's meshpaint to be implemented in the editor (although that would be awesome,) like in that video. Just want the shader support.
  • LazerLazer Join Date: 2003-03-11 Member: 14406Members, Contributor, Constellation, NS2 Playtester
    edited August 2010
    <!--quoteo(post=1792102:date=Aug 5 2010, 02:31 PM:name=Ark)--><div class='quotetop'>QUOTE (Ark @ Aug 5 2010, 02:31 PM) <a href="index.php?act=findpost&pid=1792102"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The vertex painting could be done in a 3d app, not asking for a feature like UDK's meshpaint to be implemented in the editor (although that would be awesome,) like in that video. Just want the shader support.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Well I know hammer supports this for the source engine and I remember playing around with it way back with the ut2k4 editor too. If we didn't have this feature in the spark editor we might as well do our own texture blending in photoshop since I'm assuming the majority of this is going to be applied to map geometry and not as much so props although I see some use there too.

    The other thing is for texture blending to look correct we need to blend in the pixel shader and not the vertex shader. The vertex shader could hold the different textures for the pixel shader to interpolate between, but it would look weird blending on a per-vertex basis. (unless there are a lot of vertices really close)

    Don't see this as too urgent of a feature but it would be really nice.
  • ArkArk Join Date: 2009-08-15 Member: 68489Members
    Well, if it was implemented as i said earlier with the additional 'modulate' map, theres no need to tessellate the geometry as much to avoid the smooth transitions cause by not enough surrounding vertices. The 'modulate' map breaks up the transitions between the textures, avoiding the standard gradient look caused when vertex painting.
Sign In or Register to comment.