Thea tree (leaf texture) rendering

General discussion on Thea Render for SketchUp

Moderator: Frederik

Thea tree (leaf texture) rendering

Postby pipinek » Wed Nov 18, 2015 3:58 am

frond.skp
Greetings,

Is there any simple setting (equivalent to vray 'use texture as transparency') for texture mapping in Thea for SketchUp render.
I have just started some first steps in Thea for Su and I cannot find the mentioned option in Material Lab. I do not think that a user shall 'manually' mapping the given (leaves) texture.

I will deeply appreciate any elucidation and advise/guidance.
Thank you in advance,


AC

PS
I have just noticed that the img leaves file is in tiff format. While converting it into png it has no background (as usual) and Thea treats it well.
The original tiff file (please-find-attached file) has a green background when edited and no background at all inserted to SU.

Where the tiff img transparency comes from in SU (attached file)?

Once more, many thanks in advance...
0
Last edited by pipinek on Wed Nov 18, 2015 8:54 am, edited 1 time in total.

pipinek 
Premium Member
Premium Member
 

Re: Thea tree (leaf texture) rendering

Postby srx » Wed Nov 18, 2015 8:15 am

You have to add alpha bitmap in Thea material editor/Clip map, as far as I know.
0
www.saurus.rs
User avatar
srx 
 

Re: Thea tree (leaf texture) rendering

Postby pipinek » Wed Nov 18, 2015 9:01 am

srx wrote:You have to add alpha bitmap in Thea material editor/Clip map, as far as I know.


Thank you.
I think the problem is the tiff file (I have inserted a first found model for test sake).
Thea renders png img without any intervention. I have made some tests on png trees.

I am really curious why in the attached file a tiff image (leaf) has transparency applied in SketchUp while it has originally a green background.
0

pipinek 
Premium Member
Premium Member
 

Re: Thea tree (leaf texture) rendering

Postby JQL » Wed Nov 18, 2015 10:55 am

Somehow Thea isn't assuming your Tiff's transparency automatically.

The thing with transparent images is that every transparent pixels has at least 4 channels. Red, Green, Blue (RGB) and Alpha (A).

- RGB - are the ones common to most image formats and are the channels that mix to display the color you see.
- Alpha - Is the channel that controls how transparent is a pixel. It's in greyscale and black means fully transparent while white means fully opaque.

Many leaf images have a green background wich has a black alpha and a leaf foreground that has white alpha. The idea is that in the edges of the leaf, where black transitions to white, you have a grey aliasing transition line. This grey line is half transparent, so barely visible. If the background color there is black it will create a grey transparent line surrounding your leaf. If the background is white, you'll see a whitish halo around your leaf. As the color is green it will only seem the leaf is a bit bigger.

You should edit that material in matlab:
- click on the texture to make it available in texture editor;
- open clipping options and enable clipping;
- drag the texture into the clipping map;
- The leaf is transparent based on a grey scale version of the RGB channels;
- use the alpha channel as clipping instead of the RGB;
- Now the leaf is good to go.
- You can further tweak the thickness of the grey line by adjusting the threshold on the clipping options and if it's soft or not.

Click the gif:

Using Alpha Channel for Clipping.gif
5
User avatar
JQL 
Premium Member
Premium Member
 

Re: Thea tree (leaf texture) rendering

Postby pipinek » Wed Nov 18, 2015 9:01 pm

I remain bouche bée.
I would have never got better explication and guidance! Simply awesome.

Thank you very much for your kind and clear explication and its visual method.

AC
0

pipinek 
Premium Member
Premium Member
 

Re: Thea tree (leaf texture) rendering

Postby JQL » Wed Nov 18, 2015 9:24 pm

No problem, it was only possible because you made your question clear and provided a simple model.

You made the question easy to answer.
1
User avatar
JQL 
Premium Member
Premium Member
 

Re: Thea tree (leaf texture) rendering

Postby pipinek » Mon Nov 30, 2015 3:28 am

Hullo once again,

I have got one more question to confirm (or contradict) my observation and thus assure my components quality.

I have mapped several Sketchup models following your splendid instruction. I have saved them as SU components. After opening/inserting them into Sketchup I have noticed they miraculously seem to keep the modified via Thea texture/transparency. At the same time Thea can render them without any additional material changes.

My question is - is this a natural and standard program behaviour or just some habitual hazard case here?

I thank you in advance for your kind reaction.
Best regards,
AC
0
Last edited by pipinek on Mon Nov 30, 2015 9:35 am, edited 1 time in total.

pipinek 
Premium Member
Premium Member
 

Re: Thea tree (leaf texture) rendering

Postby Mistro11 » Mon Nov 30, 2015 8:39 am

JQL....I thank you for that as well. You just gave me a duh moment. All this time I been copy/pasting tiff images to clip, inverting and using the threshold down to 10 for most leaves. That looks so much easier and clean.
0
i7-4930k @3.4/3.7GHz, 32Gb RAM, NVidia GTX 980Ti 6Gb, Windows 7 Pro 64bit
Structural Integrity is Not Just Physical...It's in the Design and Purpose
User avatar
Mistro11 
 

Re: Thea tree (leaf texture) rendering

Postby JQL » Mon Nov 30, 2015 12:10 pm

pipinek, once you've configured a material on Thea for Sketchup you can copy it around to any models and it will render as you set it.

The only occasions where this doesn't happen are:

- If you use external textures (textures different from the Sketchup texture) and then move the textures around on your folder paths;
- If you use sketchup textures on a material, save a material to a Thea library and try using it in other models through Thea browser. Those materials won't have a texture with them and will probably render black as the original sketchup texture only exists in the original sketchup model.

Mistro,

those duh moments are very nice to have! It's nice it came from this...
0
User avatar
JQL 
Premium Member
Premium Member
 

Re: Thea tree (leaf texture) rendering

Postby pipinek » Mon Nov 30, 2015 7:17 pm

Thank you very much JQL for your elucidation.
0

pipinek 
Premium Member
Premium Member
 

Re: Thea tree (leaf texture) rendering

Postby JQL » Mon Nov 30, 2015 7:46 pm

You're welcome.

Beware of moving textures around or creating mod.thea files from Sketchup models wich use sketchup textures.

Probably they will render black because they're composed by materials with SU textures.
0
User avatar
JQL 
Premium Member
Premium Member
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Thea

Who is online

Users browsing this forum: No registered users and 1 guest

Visit our sponsors: