Planetside Software Forums

Support => Terragen Support => Topic started by: gasbutan on November 11, 2019, 01:13:43 PM

Title: Image map on population
Post by: gasbutan on November 11, 2019, 01:13:43 PM
I wonder if it is possible to map an imagemap over a population of objects.
If I connect the imagemap shader to the population, each object shows the same pattern. I would like to have the pattern distributed over all objects of the population.
Any idea ?
Thx!
Title: Re: Image map on population
Post by: Matt on November 11, 2019, 04:05:52 PM
You can do this with a Transform Input Shader and enabling the checkbox "Use world space (final position)".

You can connect it anywhere between the shader and the connection to the object. The transform affects all shaders feeding into its main input.

Some more info here, although it doesn't specifically mention the world space option:

https://planetside.co.uk/wiki/index.php?title=Transform_Input_Shader
Title: Re: Image map on population
Post by: Matt on November 11, 2019, 04:09:11 PM
Another option, if you want each object to receive just one colour then you can use the population tinting controls:

https://planetside.co.uk/wiki/index.php?title=Population_Colour_Tinting_Techniques
Title: Re: Image map on population
Post by: Dune on November 12, 2019, 03:25:02 AM
The only 'problem' being that it will be Y stretched, whereas PF's work in 3D.
Title: Re: Image map on population
Post by: gasbutan on November 12, 2019, 09:26:58 AM
Thank you for the hints. I will try it....
Title: Re: Image map on population
Post by: gasbutan on November 13, 2019, 06:05:22 PM
Here is the first test render:
Caustic effects using an image map on a population of objects.
Thanks for helping!

test021.jpg
Title: Re: Image map on population
Post by: Dune on November 14, 2019, 01:37:07 AM
That looks really good. The stretching doesn't seem to be a real problem.
Title: Re: Image map on population
Post by: WAS on November 14, 2019, 12:51:09 PM
If some sun rays could match the caustics I think it'd be almost perfect. As Ulco said not sure the stretching matters since the shape of the object, looks real.
Title: Re: Image map on population
Post by: gasbutan on November 16, 2019, 08:10:33 AM
Another approach:

thanks to the proposal made by WAS I tried to put a card object on top o the surface and mapped the caustics image on it.
Now the lights are distributed automatically over the ground and the fish population. I think ths looks a bit more realistic.
Only the light rays could be stronger.

test021d.jpg
Title: Re: Image map on population
Post by: Dune on November 16, 2019, 10:47:43 AM
That looks even better, but can you explain a bit more about where you put the card object? On top of what surface did you put it, water? As an opacity shadow map?
Title: Re: Image map on population
Post by: gasbutan on November 16, 2019, 11:30:58 AM
Yes, exactly.
The card is an opacity shadow map slightly above the water surface.
The water surface itself is a plane with a water shader.
Title: Re: Image map on population
Post by: WAS on November 16, 2019, 01:14:24 PM
Well the effect and water surface looks great. This is something we have struggled with..what renderer are you using?
Title: Re: Image map on population
Post by: gasbutan on November 16, 2019, 06:50:59 PM
Just the standard renderer. No path tracing.
Title: Re: Image map on population
Post by: Dune on November 17, 2019, 01:46:10 AM
Thanks. Good to have you on board, you have a totally different 'niche' than others, interesting. I once experimented with caustics as well and used three suns slightly moved apart and in different colors, for a faked prism-like shift in colors on the lake bottom: caustics (https://planetside.co.uk/forums/index.php/topic,22787.msg230598.html#msg230598)
Title: Re: Image map on population
Post by: gasbutan on November 17, 2019, 12:30:56 PM
Adding chromatic aberration is an interesting idea.
I would keep the center in white and just color the edges in red and blue:

test021e.jpg
Title: Re: Image map on population
Post by: WAS on November 17, 2019, 02:44:59 PM
Quote from: gasbutan on November 17, 2019, 12:30:56 PMAdding chromatic aberration is an interesting idea.
I would keep the center in white and just color the edges in red and blue:

test021e.jpg

It is a cool effect but it's only really suitable for shallows at a certain depth. Super high shallows are too close to the surface for the effect, and as you go deeper, spectrums are entirely blocked out leaving just the blue spectrum. I posted a spectrum chart by depth somewhere around here.  I think the sun also requires a certain inclination on the horizon for best prism effect. Top-down (mid-day) would produce very little if any.
Title: Re: Image map on population
Post by: gasbutan on November 18, 2019, 02:46:39 AM
Look this photo:

https://sdm.scad.edu/faculty/mkesson/vsfx419/wip/best/winter11/megan_stifter/p2_images/caustics2_large.jpg
Title: Re: Image map on population
Post by: WAS on December 05, 2019, 02:16:43 PM
Nice shallow water at about couple feet. It relies again on depth of water, and refraction angle. For example, high son doesn't provide this effect well, as it's not at a sharp angle cutting through the water, a refracting off the back sides of water ripples. Ripple strength is another facter. Rougher waters breakup the nice prism effect. You'll notice these soft prism effects come from pool water, ponds, shore surfaces, etc, areas where it's calm. Water quality also plays a huge role. For example, the heavily teas and silted water of peat-type lakes cuts these effects at the surface.

Here is a nice diagram regarding penetration of wavelengths. For ocean scenes, you will not notice most this effect going much beyond the shallows due to intensity and falloff of spectrums.