Planetside Software Forums

General => Terragen Discussion => Topic started by: RealUser on March 18, 2007, 11:09:14 AM

Title: Tree problems
Post by: RealUser on March 18, 2007, 11:09:14 AM
I have finally managed to import an obj-tree and convert it to .tgo with textures. But there is a slight problem with artifacts as you can see in the image at the end of the branches (little dots or rests of leaves or something). Does anybody have the same problem and know how to solve it?
Title: Re: Tree problems
Post by: child@play on March 18, 2007, 11:27:46 AM
strange, looks like nuts
Title: Re: Tree problems
Post by: Costaud on March 18, 2007, 11:44:24 AM
look like scale down leafs , can you post your tgo file?
Title: Re: Tree problems
Post by: Buzzzzz on March 18, 2007, 11:49:52 AM
Nice tree BTW. One thing to check is: in the Default shader for the textures check to see if Displacements are set at .01, if so, set it to 0. That might help?  In other words go Object settings, Shaders, go to multishader, then go to the setting for each texture where the image is loaded and then set Displacement to 0 if needed.

Hope the is clear?
Title: Re: Tree problems
Post by: Will on March 18, 2007, 11:54:29 AM
Yea could be a problum with displacments. Buzzzzz you got a new acount?

Regards,

Will
Title: Re: Tree problems
Post by: Buzzzzz on March 18, 2007, 11:57:03 AM
Quote from: Will on March 18, 2007, 11:54:29 AM
Yea could be a problum with displacments. Buzzzzz you got a new acount?

Regards,

Will

He He Yup.  ;D
Title: Re: Tree problems
Post by: RealUser on March 18, 2007, 05:19:40 PM
Well, i did set displacement to 0.0 with no success. The image files are .rgb, maybe this is the problem? The tree is about 15megs!
Title: Re: Tree problems
Post by: Oshyan on March 19, 2007, 02:07:27 AM
Markus, is this one of the free Xfrog "public plants"? If so it may be a problem with the original data - the image maps and alphas provided with them originally were often not of best quality. Particularly in a program like TG2 where opacity is treated as either off or on (no partial opacity), you can get artifacts like this. You may want to try adjusting the images in an image editor to make sure the alphas are setup correctly.

- Oshyan
Title: Re: Tree problems
Post by: RealUser on March 19, 2007, 09:29:59 AM
OK, the main problem was the image map shader i used for the textures. I replaced it with a default shader, the color map in the color tab and a masking map in the opacity tab with "alpha from color" checked (alpha key 1, key tolerance 0.99). TIF images with an alpha key didn't work correctly. You can see white artifacts on the edge of the leaves, no matter if the alpha is part of the tif (alpha channel) or a seperate opacity image. The model comes from the public xfrog library here: http://web.inf.tu-dresden.de/ST2/cg/downloads/publicplants/
Title: Re: Tree problems
Post by: Mandrake on March 19, 2007, 09:41:44 AM
Looks good now Markus, did you make that? You might want to run it through Poseray and do the y=0 thing.
Title: Re: Tree problems
Post by: king_tiger_666 on March 19, 2007, 10:01:08 AM
Quote from: child@play on March 18, 2007, 11:27:46 AM
strange, looks like nuts

nuts in mid air? ;D ;D  will be interesting to see how this turns out since you are dealing with those xfrogs plants.

Title: Re: Tree problems
Post by: Aenea on March 19, 2007, 10:44:09 AM
I have the same problems on the public plants too, but hadn´t spend too much attention to it, cause I was already delighted when I was able to get such a tree with all textures into terragen....
Thanks to poseray I found a way to get it working properly for me...
I´ll post a tut about it soon, maybe I should include this problem too and a solution for it...I´ll try it at once I got back to my own pc....
These artifacts were really annoying...

also, I´m not sure if anyone of you have observed that the leaves often look a bit cutted on their border....really strange.
I use tif images with transparency, under color image and as alpha channel as well....it works fine...but this propblem still occurs...

Aenea
Title: Re: Tree problems
Post by: Oshyan on March 19, 2007, 02:22:24 PM
Once again I just have to reiterate that although those public plants are a great resource, they are also a very old and less high quality version of Greenworks' Xfrog plants. They have known and acknowledged problems. By all means continue to work with them and if you get them working well then they are an excellent resource, but keep in mind that you are more than likely to run into problems with them.

- Oshyan
Title: Re: Tree problems
Post by: Costaud on March 19, 2007, 04:47:41 PM
New trees from XFrog are expensive and the program isn't cheap either but I'm very interested in this program maybe if I have some extra money during next summer I'll purchase it and if I could made some trees I'll offering them free, so stay tuned. 
Title: Re: Tree problems
Post by: RealUser on March 19, 2007, 05:23:34 PM
@Mandrake: I have downloaded Poseray and see what i can do. And yes, I did the renderings. Wasn't difficult after i have solved the problem.
@Oshyan: Thanks for the information. I think this plants are good enough for distant vegetation and simple scenes.
@Aenea: Yes, please make that tutorial! :-) I can give you a hand if you need some help.
Title: Re: Tree problems
Post by: Aenea on March 20, 2007, 04:37:23 AM
@RealUser: Oh sure...I WILL do that....I think there are still some secrets in working with objects I haven´t figured out *lol*
I think I´ll do that this weekend (the tut, not revealing the secrets...think this needs some time  ;D)

Especially with these artifacts....

Another thing I have observed with the trees: the stem often look a bit edgy...not all are smooth round shaped...I wondered if this is a problem of the imported obj or they haven´t that much polygons when they were created...
Very clearly I saw this with the cerasifera nigra tree....I got results with very edgy stems and then I got it work properly and the stem was normal shaped...haven´t found the reason for it... maybe the texture also had something to do with it...as soon as I got the right texture on it and not only a colour, it worked fine....

Aenea

Title: Re: Tree problems
Post by: RealUser on March 20, 2007, 05:50:44 AM
Hey, Aenea!
Yep, i have had the edgy stem problems with the chestnut tree too. I am not certain if TG2TP handles smoothed (phong shaded or other technique) polygons correctly. Question to Planetside: Does TG2TP support polygon smoothing in any way?
Well, i did further experiments with the tree and added some translucency to the leafs with some succes. I first tried the lambert technique, in which you put a  lambert shader between the leaf shader and the multi shader. That didn't worked for me. Then i simply cranked up the translucency slider in the default shader up to 25 and voilá, translucent leafs as you can see in the image below. I didn't find out how a translucent image must look like to affect the translucency. Maybe a greyscale image works here. Another thing is, that the leafes look all flat. I need a certain bend over the leaf to give it a better and more realistic look. If you take a closer look at a real chestnut tree, the "fingers" of the leafes are hanging down a bit. I think this should be possible with some displacement and a suitable "bending image".
Title: Re: Tree problems
Post by: king_tiger_666 on March 20, 2007, 06:47:22 AM
Realuser. that looks fantastic!!!.. applied to some other tree objects it has great potential..

Title: Re: Tree problems
Post by: Aenea on March 20, 2007, 07:26:54 AM
awesome realuser....

sad that I´m currently at work....my fingers are itching....wanna try this too :-\

Aenea
Title: Re: Tree problems
Post by: Oshyan on March 20, 2007, 02:41:48 PM
Quote from: RealUser on March 20, 2007, 05:50:44 AM
H Question to Planetside: Does TG2TP support polygon smoothing in any way?

Not yet, no, but it will certainly be supported in the future.

- Oshyan
Title: Re: Tree problems
Post by: RealUser on March 21, 2007, 10:12:26 AM
Errrrr, displacing a leaf obviously affects the translucency. I have to double the translucency value to get the same effect than before without displacement. I have used the leaf alpha mask as a mask for the circular grayscale color range from white to black. White in the middel (high displcement) black to the edges of the leaf (low displacement) and the other way round. The only effect i got was that darkening and some bright green edges on the leaf. Any help anyone?
Title: Re: Tree problems
Post by: Oshyan on March 21, 2007, 01:27:21 PM
Relative to the leaf size such curvature is going to be pretty extreme. Generally the leaves will be only 1 polygon anyway (with a square texture + alpha providing proper shape). TG2 doesn't currently subdivide imported models for displacement as far as I know so you're not going to get the effect you want at present. This may be possible in the future however.

- Oshyan
Title: Re: Tree problems
Post by: RealUser on March 21, 2007, 05:23:23 PM
Oshyan, i was afraid you would say that. I can wait ...
Title: Re: Tree problems
Post by: bigben on March 21, 2007, 06:43:55 PM
I haven't tried displacement on leaves yet, only on bark where it works quite well.  If you've added a sub-surface for the displacement then this will be causing some loss of translucency. Adding additional surface layers below the default shader will require a lambert and reflective shader to also be added to get accurate results.

If you've added it to the default shader then obviously the increase in thickness will require an increase in translucency. If you increase the translucency but still have thin leaf margins then these will look lighter.

I think having a better shaped leaf polygon to map the image onto would be of more benefit than changing the thickness, but this would greatly increase the complexity of the tree, not mention the extra work in modelling. Flat leaves do have their limits.
Title: Re: Tree problems
Post by: RealUser on March 22, 2007, 05:47:39 PM
As far as i understand,  i could subdivide the leafs in PoseRay. But that would end in a huuuge tree object. On the other hand, the tree looks rather convincing from a normal distance. I would like to make a forest scene (Fangorn?) with rays, translucency, dust and nebula. I am curious if i can do that with the tech preview.
Title: Re: Tree problems
Post by: Oshyan on March 22, 2007, 10:14:06 PM
Quote from: RealUser on March 22, 2007, 05:47:39 PM
As far as i understand,  i could subdivide the leafs in PoseRay. But that would end in a huuuge tree object. On the other hand, the tree looks rather convincing from a normal distance. I would like to make a forest scene (Fangorn?) with rays, translucency, dust and nebula. I am curious if i can do that with the tech preview.
You can make it, it just may take an age to render. ;)

- Oshyan
Title: Re: Tree problems
Post by: RealUser on March 23, 2007, 06:39:05 PM
From a certain distance displacement is not necessary, only for close ups. But i do hope this will be possible with not to much effort of render time in the future. It could be combined with a kind of LOD for the subdivision or some kind of fake displacement mapping. Like a kind of billboard of a displaced leaf and mapp it on a lower poly leaf object.