Triplanar mapping / stochastic texturing

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

Re: Triplanar mapping / stochastic texturing

Post by lacilaci » Wed Jan 15, 2020 3:43 pm

Dade wrote:
Wed Jan 15, 2020 3:42 pm
juangea wrote:
Wed Jan 15, 2020 12:29 pm
Oh yes there is, it simplifies mixing procedural textures in some situations, like in nature creation (rocks, tree barks...) , you can use different textures to create more variety, I would not disable that option, just simplify it for when you want to use just one texture.
Yes, snow is a classic example: you use snow from the top and grass/terrain from the side.
sure, but also snow from bottom cause z axis will paint it both ways lol :D

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

Re: Triplanar mapping / stochastic texturing

Post by Dade » Wed Jan 15, 2020 3:47 pm

lacilaci wrote:
Wed Jan 15, 2020 3:43 pm
sure, but also snow from bottom cause z axis will paint it both ways lol :D
It is the backface, you don't see them on a terrain.
Support LuxCoreRender project with salts and bounties

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

Re: Triplanar mapping / stochastic texturing

Post by lacilaci » Wed Jan 15, 2020 3:57 pm

Dade wrote:
Wed Jan 15, 2020 3:47 pm
lacilaci wrote:
Wed Jan 15, 2020 3:43 pm
sure, but also snow from bottom cause z axis will paint it both ways lol :D
It is the backface, you don't see them on a terrain.
Yes here and there you can get away with these tricks and example like with rocks which juangea mentioned also sounds ok. But I would be very surprised if someone used multiple textures on triplanar more than 10% of the time and even then you would be probably ok without that.

First of all I'm not saying we shouldn't have the ability.
But having all these inputs and nodes exposed for rare cases is overkill. So I would suggest packing it all into image node (triplanar checkbox that switches 2d mapping input into 3D mapping and you're good... if this is technically doable) and it should also by default disable using uv's in that case.

For cases where you actually want multiple textures, maybe then keep a separate triplanar node..? Not sure. But a basic triplanar usage should be very straightforward without busy nodes all over the place imho.

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

Re: Triplanar mapping / stochastic texturing

Post by Dade » Wed Jan 15, 2020 4:47 pm

lacilaci wrote:
Wed Jan 15, 2020 3:57 pm
First of all I'm not saying we shouldn't have the ability.
But having all these inputs and nodes exposed for rare cases is overkill. So I would suggest packing it all into image node (triplanar checkbox that switches 2d mapping input into 3D mapping and you're good... if this is technically doable) and it should also by default disable using uv's in that case.

For cases where you actually want multiple textures, maybe then keep a separate triplanar node..? Not sure. But a basic triplanar usage should be very straightforward without busy nodes all over the place imho.
The idea proposed by Juangea here (viewtopic.php?f=5&t=1638&start=100#p19403) sounds good to me.
Support LuxCoreRender project with salts and bounties

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

Re: Triplanar mapping / stochastic texturing

Post by juangea » Wed Jan 15, 2020 5:00 pm

Exactly :)

User avatar
B.Y.O.B.
Developer
Posts: 3173
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Triplanar mapping / stochastic texturing

Post by B.Y.O.B. » Thu Jan 16, 2020 1:45 am

This is how it looks now.
Good? Did I forget something?

(You'll have to delete old triplanar nodes and add new ones instead because I renamed some sockets)
Attachments
Capture.PNG

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

Re: Triplanar mapping / stochastic texturing

Post by lacilaci » Thu Jan 16, 2020 5:37 am

B.Y.O.B. wrote:
Thu Jan 16, 2020 1:45 am
This is how it looks now.
Good? Did I forget something?

(You'll have to delete old triplanar nodes and add new ones instead because I renamed some sockets)
hm. looks ok.

btw is there a warning if someone connects triplanar to bump(regular bump), that they need to use triplanar bump?

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

Re: Triplanar mapping / stochastic texturing

Post by juangea » Thu Jan 16, 2020 9:02 am

Looks good to me :)
Better and more clear workflow, no entangled node network required for mapping, easy understanding :)

Thinking about the text, I would out more "multiple textures" or "multiple input" instead of "individual textures", "individual" word drives me to think about it as single one, it’s a minor thing and a totally subjective thing, so it’s not important if you don’t agree and don’t change it, it’s just what I felt when I saw the nodes for the first time :)

User avatar
B.Y.O.B.
Developer
Posts: 3173
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Triplanar mapping / stochastic texturing

Post by B.Y.O.B. » Thu Jan 16, 2020 10:20 am

lacilaci wrote:
Thu Jan 16, 2020 5:37 am
btw is there a warning if someone connects triplanar to bump(regular bump), that they need to use triplanar bump?
There is now:
Captured.PNG
Note, this only covers this exact case, the warning is not shown if there are some other nodes between the bump inputs and the triplanar texture. But if I check all such conditions, it will become a performance problem.
juangea wrote:
Thu Jan 16, 2020 9:02 am
Thinking about the text, I would out more "multiple textures" or "multiple input" instead of "individual textures"
Sounds better, changed.

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

Re: Triplanar mapping / stochastic texturing

Post by Dade » Thu Jan 16, 2020 11:09 am

It may be a good idea to clarify somewhere (description may be) that one requires UV while the other don't :idea:
Support LuxCoreRender project with salts and bounties

Post Reply