Triplanar mapping / stochastic texturing

Discussion related to the Engine functionality, implementations and API.
User avatar
lacilaci
Donor
Posts: 1806
Joined: Fri May 04, 2018 5:16 am

Re: Triplanar mapping / stochastic texturing

Post by lacilaci » Thu Jan 09, 2020 2:28 pm

By the way, your example on my testscene looks very good. I hope to see most of my meshes as non-problemaic,this issue regarding.

User avatar
Dade
Developer
Posts: 3585
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Triplanar mapping / stochastic texturing

Post by Dade » Thu Jan 09, 2020 2:41 pm

lacilaci wrote:
Thu Jan 09, 2020 2:16 pm
This only makes sense thought for the bump mapping problem, seam. How can you make sure a randomized texture won't end up at projection seam and then another one will be sampled from different projection creating a seam?
They are blended, there is no sudden transition. The seams are a consequence of lack of surface parametrization (i.e. UV-less) as I have explained before. It is something just shown by the usage of triplanar mapping (it is not a consequence of triplanar texture).

Anyway stick to the current problem, does the new UV-less rendering look right: posting.php?mode=quote&f=5&p=19285#pr19280
Support LuxCoreRender project with salts and bounties

juangea
Donor
Posts: 43
Joined: Thu Jan 02, 2020 6:23 pm

Re: Triplanar mapping / stochastic texturing

Post by juangea » Thu Jan 09, 2020 3:02 pm

Personally I think it looks ok :)

But @lacilaci should know better how it should look :)

User avatar
lacilaci
Donor
Posts: 1806
Joined: Fri May 04, 2018 5:16 am

Re: Triplanar mapping / stochastic texturing

Post by lacilaci » Thu Jan 09, 2020 3:14 pm

You need to make a build Dade. In the morning I'll test it on few objects and see if it's a non-issue

User avatar
lacilaci
Donor
Posts: 1806
Joined: Fri May 04, 2018 5:16 am

Re: Triplanar mapping / stochastic texturing

Post by lacilaci » Fri Jan 10, 2020 12:26 pm

Are there some issues with this? There's no new build aside some fixes by Simon I think.

User avatar
Dade
Developer
Posts: 3585
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Triplanar mapping / stochastic texturing

Post by Dade » Fri Jan 10, 2020 12:55 pm

lacilaci wrote:
Fri Jan 10, 2020 12:26 pm
Are there some issues with this? There's no new build aside some fixes by Simon I think.
I had to write the OpenCL code.

I pushed the source with UV-less bump map support for triplanar texture. It is enabled by default so you can try it with the current version of BlendLuxCore. However you need to use a specific node setup:

uvless.jpg

You must:

1) set the bump height to 100cm so BlendLuxCore will use a scale of 1 (to neutralize the node BlendLuxCore add under the hood);

2) than you must use a Multiply node to really scale the bump map intensity. Values are similar to usual bump map, something like 0.01 will work however the bump mapping is a bit stronger so you may have to adjust the value.

This is a test, we can than implement this support as a flag in BlendLuxCore "Bump" node (and BlendLuxCore can take care of the above stuff): something like "Enable UV-less".
Support LuxCoreRender project with salts and bounties

User avatar
lacilaci
Donor
Posts: 1806
Joined: Fri May 04, 2018 5:16 am

Re: Triplanar mapping / stochastic texturing

Post by lacilaci » Fri Jan 10, 2020 1:08 pm

Dade wrote:
Fri Jan 10, 2020 12:55 pm
lacilaci wrote:
Fri Jan 10, 2020 12:26 pm
Are there some issues with this? There's no new build aside some fixes by Simon I think.
I had to write the OpenCL code.

I pushed the source with UV-less bump map support for triplanar texture. It is enabled by default so you can try it with the current version of BlendLuxCore. However you need to use a specific node setup:


uvless.jpg


You must:

1) set the bump height to 100cm so BlendLuxCore will use a scale of 1 (to neutralize the node BlendLuxCore add under the hood);

2) than you must use a Multiply node to really scale the bump map intensity. Values are similar to usual bump map, something like 0.01 will work however the bump mapping is a bit stronger so you may have to adjust the value.

This is a test, we can than implement this support as a flag in BlendLuxCore "Bump" node (and BlendLuxCore can take care of the above stuff): something like "Enable UV-less".
Ok, thanks for this. But it needs to be much more straightforward. This even more emphasizes the need to have this embedded in image node. Like an UV/check (user input check for cases where uv exists but is shit - "has proper UV's = boolean yes/not check) and then auto enable scaling and maybe even enable multiplier for basic scaling and add tooltip that for advanced scaling a proper uv's are needed and a separate 3Dmapping node...

User avatar
Dade
Developer
Posts: 3585
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Triplanar mapping / stochastic texturing

Post by Dade » Tue Jan 14, 2020 3:44 pm

So, does it work ?
Support LuxCoreRender project with salts and bounties

kintuX
Posts: 505
Joined: Wed Jan 10, 2018 2:37 am

Re: Triplanar mapping / stochastic texturing

Post by kintuX » Tue Jan 14, 2020 4:56 pm

Dade wrote:
Tue Jan 14, 2020 3:44 pm
So, does it work ?
Suzanne looks OK.
Triplanar.jpg

Q: Is there any control to manipulate the overlay blending like it can be done with Cycles (Blend value)?
ie
Image

-----------------------------------------------------------------------------------------------------------------------------------------------

Edit
Ah, the Bump seems to have no effect where textures blend.

- Bump only
Triplanar_Bump.jpg

- Bump + Diffuse
Triplanar_Bump+Diffuse.jpg
-----------------------------------------------------------------------------------------------------------------------------------------------

Edit2
Used another, different set of textures from CC0textures & well, this time everything looks OK.
e.g.
- Bump only
Triplanar_test-OK_LC.jpg
Attachments
Triplanar_test_LC.7z
(4.78 MiB) Downloaded 4 times
Last edited by kintuX on Tue Jan 14, 2020 5:44 pm, edited 2 times in total.

User avatar
lacilaci
Donor
Posts: 1806
Joined: Fri May 04, 2018 5:16 am

Re: Triplanar mapping / stochastic texturing

Post by lacilaci » Tue Jan 14, 2020 5:34 pm

So far I've been trying to keep main models with UV to avoid errors. Will test few things and how they look with deleted uvs afterwards tomorrow and report back

Post Reply