I want to add "decals" to parts of my terrain.
To that end, I created a PNG with mostly transparent pixels, and a few colored areas representing my decals (e.g. roads). I then created an Image Map Shader (on top of the Base colours shader created when the model is first created) and linked the PNG to the Image Map Shader.
The decal parts look great. Unfortunately, areas shaded by transparent pixels are... transparent. I guess that makes sense, but my hope was that transparent pixels would allow the result of underlying shaders to display.
Is this expected? Am I doing something wrong? Is there a way to accomplish what I'm trying to do?
Try placing your image map shader as a child of a surface layer
:)
Richard
Doesn't seem to work :-(
Attached a small test project. Would you mind having a look at it?
What you want to do is use your Image Map as the Blend Shader input of whatever shader(s) you want to limit the coverage of. It's best to use a separate image for the alpha/mask in this case.
- Oshyan
For use as a mask, you'd best make a black and white (grayscale) TIF. For fine detail, keep it rather large, for rough masking, decrease size for less memory use. A png is quite heavy, I suspect, and not necessary.
I found that you need the decal image in both places on a surface layer[both image map and blend shader] as Oshyan said , on a Surface layer over top of the layer you wish to apply the decal to.
Also you need an area mask to constrain where it goes if you use Tile x&z..I used a circular one for emphasis in this.This happens in the Coverage Tab.
Here's the .tgd....just replace the maps with your own
OK... I'm using the image both as the "Blend by" shader for the Surface Layer and as file for the Image Map Shader.
Generally that seems to be working, but I'm observing a bug. I'm using the free edition build 2.2.23.1
When rendering, I see multiple errors in the Errors and Warnings window that all say:
An unknown error occurred in trBucketRender::RenderMore() rasterised pass
There are large unrendered areas in the final render output.
Updated TGD file attached.
I just tested this using a bitmap image. There were no errors reported. You may need to re-install Terragen 2. Something the program needs may have been accidentally deleted or the program file corrupted somehow.
Well I just ran that .tgd and my normally stable system gave me the same error message with the .png image.
I've packaged up a sample project with all the needed maps ans if it's extracted to the C Drive it should load nicely.
If you use this as a template for making your scene[I can't figure what you've done wrong]you should notice where you've gone astray.
It's too big for this forum but I think it'll fit in fie sharing so after I put it there I'll paste a link to it here.
Sorry...too big for here but I'll post it at http://www.terragen.org/ in the freestuff. It should appear in a day or so depending how busy they are. This is a screen shot...I think the bluebells are from there as well.. ...
Well that was well nigh instantaneous...here's the URL
http://www.terragen.org/index.php?action=tpmod;dl=get598
Looking forward to looking at the sample project (the screenshot looks great!)
I resaved the PNG as a TIF using Paint.NET and the scene now renders without crashing. However, a grey border is rendered on each side of the narrow yellow lines ("roads") where no grey border is rendered around the oval. Any idea where the border is coming from?
Maybe try downloading the free IrfanView image viewer/processor/converter and save the tif out from that, sounds like you don't have Photoshop, which is what I use for my tif conversions, but I think the IrFan ones work well as well.. ...