Image masking tests (Update2)

Started by bigben, February 06, 2007, 10:27:05 PM

Previous topic - Next topic

RedSquare

#15
@ BigBen, hundreds of years ago I used to be a printer. Although not from the pre-press area, I can't help but think that you seem to be employing what I vaguely remember (Probably incorrectly) as under colour removal, by seemingly subtracting tint 2 from tint 1 and vice versa. In fact I'm almost sure that's what you are doing, which implys that you are a pro'.

bigben

#16
Quote from: RedSquare on February 09, 2007, 07:10:15 PM
...which implys that you are a pro'.

You haven't seen the attempts that didn't work   :D  I must confess to having a degree in scientific photography which gives me a bit of a start in understanding colour. My personal interests are in landscape photography.. hence my interest in Terragen. From my TG0.9 days it always seemed to make more sense to use the interaction between surface layers to build up the final colour rather than creating a surface layer for a specific colour. This provides a greater degree of variation although it can get a bit tricky at times. I've also had a bit of exposure to the printing industry via some friends who were graphic artists so there's probably some influence from there as well but in the end it's just high tech finger painting  ;D

There are many different ways to get to the same result with TG2 and sometimes being a TG2 noob can have its advantages because you try things that an experienced person might not expect to work.

As for my progress on this project... I spent a lot of time trying to get the variation of the surfaces to apply to the population of trees at a "tree" level.. i.e. create a shader that would only apply to some trees within the population. Unfortunately this does not appear to be possible with the exception of the altitude and slope constraints, which are of limited (but still of some) use.   I'd love someone to prove me wrong on this.

After scaling the fractal breakup didn't work I tried an image map, both internally to the tree object and externally from the "root" node. Thinking further, it's probably a good thing that the surface layer isn't coloured according to its "world" coordinates as this could create vertical stripes of colour in a tree when viewed from certain angles. The only other way I can see this working the way I want is if surface layers had the same projection controls as image maps.. i.e. a choice between Plan Y and Object UV. But for now, I think it's pretty good that we can add surfaces within a model at all.  :)

In order to create different hues of trees within a population you need a separate population of objects for each colour, although at least each tree within that population would have uniquely coloured leaves and you don't have to create additional leaf images.

I've simplified my node network, linked it into a more appropriate node in the tree object and a test render is underway.

I'll post the render and accompanying files tomorrow.

bigben

Added the progress render (nearly done) and linked the additional files in the initial post.
http://forums.planetside.co.uk/index.php?topic=730.msg6169#msg6169

old_blaggard

Looks great!  Thanks! *downloads*
http://www.terragen.org - A great Terragen resource with models, contests, galleries, and forums.

§ardine

bigben, I'm very interested in what you are doing here! You've really developed this, and I'm impressed.

It's late and I've spent most of the evening getting caught up on all the new posts since I've been out this last week. But I will definitely be back here tomorrow to look over your techniques, and see what else you find out.

keep us posted!

-Sardine

bigben

Thanks for the comments.

Another thing I usually consider is animating anything I develop. Using these surface layers it should be possible do a reasonable simulation of the onset of autumn ... gradually fade in the yellow and follow it with the red surfaces, starting at higher altitudes and the progressing downwards... and possibly even add an opacity tweak to gradually remove the leaves and then pile snow on the branches.  (I've removed the leaves a quite a few times, but that was unintentional  :D)

hyper1

Ben,
I've been working with TG2 for quite a few months now, and I thought I understood it fairly well.   AND then you come along and one of your first projects opens up aspects of the program I didn't even consider!!! :o  My compliments and salutation.  Back a while now, I had a lengthy discussion with Matt and crew about some of the concerns you are addressing with this "experiment".  Tonal value with XFrog plants is tricky, at least if your aiming for a photographic look.  Before the ability to control the amount of light on the surface of the objects there was only one method that allowed for color or tonal adjustment.  It is the "Colour adjust" shader.  With that shader you can adjust a lot of the Gamma and tone of the object it was attached to.  But, the methods you are using has the potential of creating a greater degree of control.  I will be following this thread VERY carefully.  Thank you a lot for sharing!
Gary
Quote from: bigben on February 11, 2007, 06:26:01 PM
You haven't seen the attempts that didn't work 
There are many different ways to get to the same result with TG2 and sometimes being a TG2 noob can have its advantages because you try things that an experienced person might not expect to work.

As for my progress on this project... I spent a lot of time trying to get the variation of the surfaces to apply to the population of trees at a "tree" level.. i.e. create a shader that would only apply to some trees within the population. Unfortunately this does not appear to be possible with the exception of the altitude and slope constraints, which are of limited (but still of some) use.   I'd love someone to prove me wrong on this.

After scaling the fractal breakup didn't work I tried an image map, both internally to the tree object and externally from the "root" node. Thinking further, it's probably a good thing that the surface layer isn't coloured according to its "world" coordinates as this could create vertical stripes of colour in a tree when viewed from certain angles. The only other way I can see this working the way I want is if surface layers had the same projection controls as image maps.. i.e. a choice between Plan Y and Object UV. But for now, I think it's pretty good that we can add surfaces within a model at all.  :)

In order to create different hues of trees within a population you need a separate population of objects for each colour, although at least each tree within that population would have uniquely coloured leaves and you don't have to create additional leaf images.

I've simplified my node network, linked it into a more appropriate node in the tree object and a test render is underway.

I'll post the render and accompanying files tomorrow.

bigben

#22
Quote from: hyper1 on February 13, 2007, 10:57:34 AM
Tonal value with XFrog plants is tricky, at least if your aiming for a photographic look.  Before the ability to control the amount of light on the surface of the objects there was only one method that allowed for color or tonal adjustment.  It is the "Colour adjust" shader.  With that shader you can adjust a lot of the Gamma and tone of the object it was attached to.  But, the methods you are using has the potential of creating a greater degree of control.  I will be following this thread VERY carefully.  Thank you a lot for sharing!
Gary

Hi Gary
Having looked at the other public XFrog plants now (not just the TGOs) I think the biggest problem is that the texture images are poorly optimised in many cases. Most trees have only two textures... one of them may be well adjusted but I haven't found a tree yet that has all images well adjusted. This puts us behind the the 8 ball at the onset. Using good texture images gives a pretty realistic looking image with the default TG lighting (as you would expect).

This experiment is at the extreme end of what can be done. Used more subtley it could also be used to provide some extra variation in natural leaf colour to increase the realism.  This is probably more practical than replacing the entire leaf texture with TG surfaces which is pretty tricky (although possibly not for someone more experienced in surfacing). The fact that it can be done at all in TG is pretty cool  :)

bigben

#23
Added a test looking at mask image resolution and the impact of anti-aliasing in TG2. Definitely worth checking if you create image masks for surfaces with fine detail.

hyper1

Ben,
Thanks for all of your efforts!  I believe I'll be trying your method of tinting, perhaps today.  My problem is dealing with tropical grasses.  From the photos I've obtained the grasses in tropical regions go through their growth cycle on a continual basis.  This means I'll need greens, tans, even grays.  Ideally, they will have a very random nature.  Even having multiple populations would not produce the variation in nature. 
Gary
Quote from: bigben on February 13, 2007, 08:17:23 PM
Added a test looking at mask image resolution and the impact of anti-aliasing in TG2. Definitely worth checking if you create image masks for surfaces with fine detail.

bigben

Grass may actually be a little easier. Using this method, you can distribute your required colours through the population of leaves. While the overall colour of the populations when viewed from a distance won't vary, up close each population will be unique. You can also use slope and height constraints to restrict specific colours to specific populations e.g. more dead grass on higher areas or steeper slopes. This will help to show variations in terrain as well and can look reasonable realistic.

garcia


§ardine

I've had a little time for reading and no time for rendering/testing so I havn't been able to look into this. :-\

I was wondering if we are able to get the slope direction an individual object in a population is located on. My thought is that with the slope coordinates we would be given an other option to vary the color distribution. (A real life example of this is the brighter colors in fall on the sun-ward side of a hill)

This of course would require the use of functions to build this, but would be possible assuming we are able to somehow get the slope of each object.


Mandrake

Big Ben, I've been following this thread because I have questions that very closely follow your work, but on a much smaller scale, or so I hope.
http://www.ashundar.com/pfs.php?m=view&v=1418-021407a.jpg
I've been asking about how to lay this forest (or not so much) of pines and at the same time use object constraints.
It seems your the only one that could answer this.
I've done this ter. in World Machine and have the bmp output.
Is this what I use to limit the PINES, ? Do I inverse the bmp in photoshop and work from there? Any help you have on Object Constraints would be greatly appreciated

Oshyan

Mandrake, this thread is generally referring to adjusting textures of objects (potentially in a population), not object distribution. But what you want to do is fairly simple. It's off-topic here but since you may look here for the solution I'll post the brief and exact steps. If you want to continue the discussion I'll split the thread.

First of course you want a basic scene. I've loaded the default scene and generated the base heightfield. You also want to add a simple population, of course. I've used one of the XFrog TGO free bundle plants for this example because they're easy to work with and produce good results. By default the population should be set to "Sit on terrain" and be referencing the "Compute terrain" shader. This should make objects sit properly on your terrain unless you perform significant displacement in your Shaders group.

Next you'll want to move your population onto the terrain (I've set position to 5000,0,5000 so it's in the center of my terrain) and then increase size for illustrative purposes - 10,000x10,000 should be good. Now your population should be the same size as your terrain. Finally you'll want to increase spacing so you don't get a huge population - remember this is just for example's sake. So set your object spacing to 50.

Now the actual distribution adjustment steps:

1. Turn on Preview instances and Populate to see what your population distribution is like now. I've moved my camera up to a high vantage point and I can see an even coverage.
2. Go to your Population settings on the Distribution tab. Check the Use Density Shader box at the bottom then click the "..." button on the far right. On the menu that pops up choose "Create New Shader->Colour Shader->Distribution shader v4". It will fill in the name of the new shader in the box to the left.
3. Now click the same "..." button again and select "Go to Distribution Shader v4 01". This will bring up a settings box for the new Distribution Shader.
4. Go to the Altitude Constraints tab. Turn on Limit maximum altitude and set it to 500 (meters).
5. Go back to your Populator settings and click Populate again. If you have maintained your high camera view you should now see the peaks of mountains are bare, without populated objects. Your Density shader is now controlling placement of your objects!

From there you should be able to do just about anything you want. You can turn on slope constraints, adjust the height constraints, or even attach an Image Map or Default shader instead of the Distribution Shader v4 used in this example. But for basic height and slope constraints this is the way to go and it's quite easy.

I hope that helps.

- Oshyan