Planetside Software Forums

Support => Terragen Support => Topic started by: N-drju on April 10, 2013, 07:02:18 AM

Title: Transparency in textures?
Post by: N-drju on April 10, 2013, 07:02:18 AM
Sorry for being such a pain in the back, but today I've got a question concerning custom textures. :)

I was wondering how can I load custom textures to the surface and have some parts of it transparent? The idea is that I want to have, say, a winding road in the scene and several sand patches near it. Between those, I would like 'base colours' to remain visible. Obviously I can't load this sort of texture without transparent areas. If I do, I will get a black square surrounding the desired texture.

What is the solution here? I think it might have something to do with alpha channels, but I'm not sure if I should create them in the image processing program or inside the Terragen.
Title: Re: Transparency in textures?
Post by: Dune on April 11, 2013, 05:08:35 AM
You can blend a surface layer by fractals, and so can an image map be blended in, also at half coverage if you want.
Title: Re: Transparency in textures?
Post by: N-drju on April 11, 2013, 06:28:52 AM
Thanks Dune! That's about the thing I need. However I'm not sure how much control will I have over where the texture appears if the fractal is used...? :-\
Title: Re: Transparency in textures?
Post by: Dune on April 11, 2013, 06:53:38 AM
You can paint a 'map' in a painted shader, or use a drawn map (photoshop, grey-scale tiff of enough resolution), imported as another image map shader. Give the map a square or easy dimension for ease, as you have to take those dimension over in the image map shader.
Title: Re: Transparency in textures?
Post by: N-drju on April 11, 2013, 10:45:59 AM
Ok, so let's sum it up and correct me if I'm wrong - I should have two image maps (one grey scale) connected in the node view. Then, if I understand it well, the grey scale map will somehow indicate where the program should put (or 'unhide') the colored textures?

I think that there is also a possibility to make masks to put textures in specific places, but I can't find any documentation on this and I don't know how it works. What's your view on this method?
Title: Re: Transparency in textures?
Post by: Dune on April 11, 2013, 12:29:30 PM
You got it in your first sentence. Experimentation is a great part of this software and without it you'll never be able to understand what is going on and what can be done (which is virtually endless). So I'd say; just try it with some gray scale file, and a colored file blended by the gray scale file. If you can't get it to work, post a file or screenshot or image, and help will be available.

I may add that the whites in the gray scale map will be 100% of the colored file, black will be none, and all tones in between a semi-colored terrain.
Title: Re: Transparency in textures?
Post by: Oshyan on April 12, 2013, 02:26:01 AM
It's easiest to have your alpha in a separate image, though you can also read embedded alpha for supported formats (e.g. TIFF). You will want to have 2 Image Map or Default shaders (both can load images), one for color/main texture, the other for your alpha/mask, or what in TG is called a "blend shader". Load up your alpha image in the 2nd shader and connect it to the Blend Shader input of your first (you can also create a new Image Map or Default shader directly in the Blend Shader slot using the + button to the right of the Blend Shader input). Be sure that your Blend Shader is enabled. Once it's configured this way you should start to see the results you're aiming for and you can tweak from there.

- Oshyan
Title: Re: Transparency in textures?
Post by: N-drju on April 12, 2013, 03:33:39 AM
Finally I understood how to fine-tune a texture placement with the use of paint shader as Dune suggested. This is probably the most precise tool yet and works great once you learn how to use it.  :D Probably that will do, at least for now. Still, I'll try to work with image maps later according to your directions. So thanks for taking your time, educating me guys!