Opacity Masks in TS 7.6

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Opacity Masks in TS 7.6 // New Users

1  |  

Post by redcrosse // Aug 26, 2008, 4:42am

redcrosse
Total Posts: 19
I've been working on some terrain and I'm looking for a way to setup a dx shader that can cleanly transition from grass to dirt to stone, etc...


I know its totally different technology but the best example I have for the end result is in this tutorial:


http://silverlight.net/blogs/msnow/archive/2008/08/25/terrain-tutorial-part-3-creating-smooth-tile-transitions-using-opacity-masks.aspx


I know how to create a shader which is transparent on the edges to mimic the effect, but I'm having problems wrapping my head around how to create a shader that I could just apply to several faces that would appear as a patch of dirt or grass.


Thanks for your help :)

Post by Jack Edwards // Aug 26, 2008, 4:54am

Jack Edwards
Total Posts: 4062
pic
This thread may be of use to you:
http://forums1.caligari.com/truespace/showthread.php?t=5233

:D

Post by redcrosse // Aug 26, 2008, 6:11am

redcrosse
Total Posts: 19
Thanks for the link. That technique looks pretty cool, but I *think* I'm looking for something slightly different.


Say I have a plateau surrounded by grass, I'd love to find a way to make a set of shaders (grass, stone and dirt.) The stone shader would paint the faces of the sides of the plateau and would blend with the base grass shader. The top of the plateu would have its faces painted with the dirt shader and would blend with the stone sides. Is any of this making sense!? :p

Post by jamesmc // Aug 26, 2008, 8:03am

jamesmc
Total Posts: 2566
I think you can do what your asking without masks with just some 2D work.

First Image is the terrain in WorkSpace that is textured with the diffuse and normal map.

Second image is a diffuse map

Third is a normal map

Fourth is the UVEditor Map that shows the contours of the plane that is divided.

I would use the UVeditor Map as a guideline that shows where you want the instances of rock,grass, dirt and etc. to appear.

If you want transitions to occur like water to beach, sand to grass, then you'll have to use an alpha mask for those on specific faces.

Actually, the link suggested is probably easier and you can adjust instances of the color in your 2D editor and it should update if you save to the same file name.

Or, can do it an alternative way and use multiple planes, each with a different diffuse color and use an alpha mask on the different planes to transition one area to another.


EDIT: BTW, the maps I used on the top image were 2048x2048. So, you wont' get the same results if you use the maps attached. :)
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2021. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn