Add Decals to Terrain

Started by PeanutMocha, April 10, 2011, 11:06:38 PM

Previous topic - Next topic

PeanutMocha

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?

cyphyr

Try placing your image map shader as a child of a surface layer
:)
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

PeanutMocha

Doesn't seem to work :-(

Attached a small test project.  Would you mind having a look at it?

Oshyan

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

Dune

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.

bobbystahr

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.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

bobbystahr

Here's the .tgd....just replace the maps with your own
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

PeanutMocha

#7
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.

Henry Blewer

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.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

bobbystahr

#9
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
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

PeanutMocha

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?


bobbystahr

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.. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist