Page 11 of 13

Re: Triplanar mapping / stochastic texturing

Posted: Tue Jan 14, 2020 5:56 pm
by B.Y.O.B.
kintuX wrote: Tue Jan 14, 2020 4:56 pm Edit
Ah, the Bump seems to have no effect where textures blend.
Your node setup looks wrong, follow the one Dade posted above in this post: viewtopic.php?f=5&t=1638&start=90#p19295

Re: Triplanar mapping / stochastic texturing

Posted: Tue Jan 14, 2020 6:38 pm
by kintuX
B.Y.O.B. wrote: Tue Jan 14, 2020 5:56 pm
kintuX wrote: Tue Jan 14, 2020 4:56 pm Edit
Ah, the Bump seems to have no effect where textures blend.
Your node setup looks wrong, follow the one Dade posted above in this post: viewtopic.php?f=5&t=1638&start=90#p19295
Yup, that works :) Thanks for pointing out the correction.
Triplanar_test-DadeNodeTree_OK_LC.jpg
Also, bump works fine both ways (as Value or Height) utilizing CC0textures - "Edit2" on the previous post. Just didn't dive in, to find out what the difference might be - if any :?

Re: Triplanar mapping / stochastic texturing

Posted: Tue Jan 14, 2020 8:05 pm
by Dade
kintuX wrote: Tue Jan 14, 2020 4:56 pm Q: Is there any control to manipulate the overlay blending like it can be done with Cycles (Blend value)?
At the moment it is a double square blending (i.e. quite fast) but it is easy to add different types of blending if needed.

Re: Triplanar mapping / stochastic texturing

Posted: Tue Jan 14, 2020 9:51 pm
by kintuX
Dade wrote: Tue Jan 14, 2020 8:05 pm
kintuX wrote: Tue Jan 14, 2020 4:56 pm Q: Is there any control to manipulate the overlay blending like it can be done with Cycles (Blend value)?
At the moment it is a double square blending (i.e. quite fast) but it is easy to add different types of blending if needed.
This type is fine. What I meant by Blend value is the influence of it, from 0 (no XYZ blending) to 1 (full XYZ blending). And now when I think about it, blending distance and/or yes, different types or even masking (using texture or a procedural noise, if possible) I'd find quite beneficial 8-)
Especially, since I found out it works really good with displacement :D

Although again, here's incoherence between CPU vs OCL:

- CPU
triplanar_CPU.jpg
- OCL
triplanar_OCL.jpg
Scene attached here.

Re: Triplanar mapping / stochastic texturing

Posted: Wed Jan 15, 2020 6:27 am
by lacilaci
EDIT: had some unknown issues

Anyway, it seems to work I think well on cpu but not opencl(still shows weir seam when no uv's are present)

Re: Triplanar mapping / stochastic texturing

Posted: Wed Jan 15, 2020 11:09 am
by Dade
kintuX wrote: Tue Jan 14, 2020 9:51 pm Although again, here's incoherence between CPU vs OCL:

- CPU
triplanar_CPU.jpg

- OCL
triplanar_OCL.jpg

Scene attached here.
I have investigate the problem and, unfortunately, setting the bump height to 1 is not enough for OpenCL code, the triplanar texture must be really plugged directly into material socket. With OpenCL you are getting the normal bump mapping because of the scale node between the triplanar texture and the material (even if the scale value is 1, this trick to neutralize the node only for CPU code).

@B.Y.O.B.: this requires a support from BlendLuxCore, it could be a new "Bump" node type, something like "UV-less Bump" node. The new node could have directly 3 sockets and 3 scales and should produce different LuxCore scene output with the triplanar texture directly connected to the material and the 3 scale nodes connected to the triplanar texture.

Re: Triplanar mapping / stochastic texturing

Posted: Wed Jan 15, 2020 12:07 pm
by juangea
I would like to make a proposal for a slightly improvement in the triplanar workflow, I think vray works this way.

In case just 1 texture is plugged into the first slot, then that texture will be used for the three inputs, if you have more than one, then it will consider the three inputs separatedly.

This may save some clicks, not a big deal, but could be a good improvement, the first socket could be called "Texture 1 (master)"

Hope you like the idea :)

Re: Triplanar mapping / stochastic texturing

Posted: Wed Jan 15, 2020 12:11 pm
by lacilaci
I would actually like to know if there is a practical reason to use 3 different textures. I never needed 3 different textures to be projected with triplanar node. You need 3 rotations, and scaling etc for some cases, but different textures.. what for?

Re: Triplanar mapping / stochastic texturing

Posted: Wed Jan 15, 2020 12:29 pm
by juangea
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.

Re: Triplanar mapping / stochastic texturing

Posted: Wed Jan 15, 2020 3:42 pm
by Dade
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.