Planetside Software Forums

General => Terragen Discussion => Topic started by: Hannes on October 21, 2019, 03:13:33 AM

Title: Subsurface scattering density colour
Post by: Hannes on October 21, 2019, 03:13:33 AM
In our SSS tests we found, that if you plug in an image map to the "volume 1 colour function" slot, the density is completely black unless you check "repeat x" and "repeat y", but then the UV mapping doesn't match. So KyL had the idea to plug the image map shader into the "volume 1 density function" slot. The UV mapping seems OK, but after numerous tests, I found, that it only reads the black and white information of the image map, but no colour information at all. I tested it by setting the decay to 0 to see, if there is any colour. The volume 1 color was set to grey, and for testing I applied an image map shader with an exaggerated green tinted texture map of my object to the volume density function slot, but the rendered head remained grey. Of course it seems logical, that for density TG only reads b/w information, but so I assume, it's not possible at the moment to apply a correctly placed colour texture to a glass shader, that's set to subsurface scattering?
Title: Re: Subsurface scattering density colour
Post by: Matt on October 21, 2019, 03:26:19 AM
I realized what causes this. In build 4.4.39 the colour function is evaluated volumetrically, which makes it quite powerful but it forces it to lose the UVs. This week I'll add an option to choose between surface texture coords and volumetric world space.

The density function is evaluated at the surface so it is able to use the UVs. The greyscale behaviour is a current limitation, but I intend to support RGB density functions in future.
Title: Re: Subsurface scattering density colour
Post by: Hannes on October 21, 2019, 03:42:29 AM
Great to hear! Thanks, Matt!!
Title: Re: Subsurface scattering density colour
Post by: Dune on October 21, 2019, 05:15:31 AM
Ah, another riddle solved. Thanks Matt.
Title: Re: Subsurface scattering density colour
Post by: Hannes on October 22, 2019, 05:15:45 AM
OK, here we go!! Latest version (4.4.40) makes it perfect. And additionally: using an image map for the density colour instead for the density function is even a lot faster! This image here renderd in only half of the time. Cool!!
I have to say, that I'm really impressed by the quality of the TG subsurface scattering. I have seen renders made by other apps using SSS, that looked a lot worse and more unnatural.
Title: Re: Subsurface scattering density colour
Post by: Dune on October 22, 2019, 08:48:42 AM
4.4.40?
Title: Re: Subsurface scattering density colour
Post by: Hannes on October 22, 2019, 10:58:36 AM
Check for updates!  ;D
Title: Re: Subsurface scattering density colour
Post by: Dune on October 22, 2019, 11:39:16 AM
Can't. Offline with my 4.4...
Title: Re: Subsurface scattering density colour
Post by: Hannes on October 22, 2019, 12:15:21 PM
Too bad! No other way?
Title: Re: Subsurface scattering density colour
Post by: Matt on October 22, 2019, 12:28:29 PM
Bookmark these:

Frontier:

https://planetside.co.uk/downloads/permanent/latest/tg/latest-frontier.php

Release:

https://planetside.co.uk/downloads/permanent/latest/tg/latest-release.php
Title: Re: Subsurface scattering density colour
Post by: Dune on October 23, 2019, 02:55:20 AM
Great. Thanks Matt!