Planetside Software Forums

Support => Terragen Support => Topic started by: fleetfoot on January 08, 2015, 05:50:22 PM

Title: Textures On OBJs
Post by: fleetfoot on January 08, 2015, 05:50:22 PM
Hi,
I'm new to Terragen 3. I am familiar with other software and was trying to import some plant OBJ files. They do not render correctly but instead show an opaque area where the image files that make up the leaves for example use transparency to only show the leaves themselves.
[attachimg=1]

I must be missing something because I see lots of images made with Terragen that have lots of plants that look just fine.
Can someone please steer me in the right direction where I can learn what works and what does not?

I seem to have a lot of difficulty with the documentation. It does not seem current for version 3 and/or is not put together in a way I can follow easily.

Many thanks in advance,
fleetfoot
Title: Re: Textures On OBJs
Post by: Oshyan on January 08, 2015, 07:04:58 PM
Hello and welcome. :)

Have a look at these previous forum discussions:
http://www.planetside.co.uk/forums/index.php/topic,17613.msg170877.html#msg170877
http://www.planetside.co.uk/forums/index.php/topic,13538.0.html
http://www.planetside.co.uk/forums/index.php/topic,14856.0.html

Basically you need to correct the opacity settings.

- Oshyan
Title: Re: Textures On OBJs
Post by: fleetfoot on January 08, 2015, 10:50:40 PM
Pleased to meet you Oshyan.

Thanks for the reply and links, but I don't really get any joy from them. They don't tell me what I can do to make things work.

My initial query was because of some plants I got from Xfrog 3.5 Lite. I also noticed many difficulties with things not texturing correctly with exports from Sketchup (2015 in this case).

I have Vue 2014 Complete and have not had these problems with it. They render ok. I don't understand why there's a problem with Terragen.
Here an image from Vue. The same tree renders as a cloud of cotton balls in Terragen.
[attachimg=1]

I just need to know what do I do to fix the problem? I already have the OBJ files and can't change them now.

addendum:

I took the leaf image, which was a red leaf on a white background, and made another .tif file with a black background and the area where the leaf was I left as transparent. Brought it into the shader in T3 in the opacity tab and added it as an opacity image. I didn't change anything else, but it works. I spent 15 or 20 minutes fiddling beforehand and nothing worked.

I checked some other Xfrog exports and they do in fact have images with transparency. It seems inconsistant at this point but I'm sure there's a good reason for it. I just don't know what it is.

cheers,
fleetfoot
Title: Re: Textures On OBJs
Post by: Dune on January 09, 2015, 02:24:16 AM
The opacity input needs a texture with a white (leaf) center on black, or an alpha mask in the color image for the leaf. In the latter case you need to tick the 'use alpha', or you get these white spots.
A transparent tga or tiff will probably also work, but I always make them into tiffs with a black or dark background + an alpha layer, so always tick the alpha box in the default shader's opacity tab.
And welcome!
Title: Re: Textures On OBJs
Post by: Matt on January 09, 2015, 10:31:37 AM
Also, take a look at the "unpremultiply" settings on the Image tab of the Default Shader. Unpremultiply is supposed to work with images that have an alpha channel and a black background. But unpremultiply can create very bright pixels if the background is not black and opacity isn't setup right (either with "use alpha channel" or a separate opacity map).

Matt