Triplanar mapping / stochastic texturing

Discussion related to the LuxCore functionality, implementations and API.
Post Reply
juangea
Donor
Donor
Posts: 332
Joined: Thu Jan 02, 2020 6:23 pm

Re: Triplanar mapping / stochastic texturing

Post by juangea »

I've been testing the latest build and I encountered a bug, since you've been touching things related to UV's and OpenCL I wonder if this bug with the Bricks map is related, because it happens with openCL and it mentions TextureMapping3D, if it's not I will create another thread about it:

Code: Select all

PathOCLBase kernel compilation error:
ERROR clBuildProgram[CL_BUILD_PROGRAM_FAILURE]:
<kernel>:9040:57: error: too few arguments to function call, expected 3, have 2
        const float3 P = TextureMapping3D_Map(mapping, hitPoint);
                         ~~~~                  ^
<kernel>:4936:1: note: 'TextureMapping3D_Map' declared here
OPENCL_FORCE_NOT_INLINE float3 TextureMapping3D_Map(global const TextureMapping3D *mapping,
^
<kernel>:1:33: note: expanded from macro 'OPENCL_FORCE_NOT_INLINE'
#define OPENCL_FORCE_NOT_INLINE attribute__((noinline))
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Triplanar mapping / stochastic texturing

Post by Dade »

I should have already fixed that bug, you just need binaries from the very last sources.
Support LuxCoreRender project with salts and bounties
juangea
Donor
Donor
Posts: 332
Joined: Thu Jan 02, 2020 6:23 pm

Re: Triplanar mapping / stochastic texturing

Post by juangea »

ok, then I imagine tomorrow there will be a new daily build, we are using the one from github from 5 hours ago :)
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Triplanar mapping / stochastic texturing

Post by lacilaci »

Dade wrote: Wed Jan 08, 2020 12:00 am I should have already fixed that bug, you just need binaries from the very last sources.
So the daily build on github either isn't up to date, or the problem(s) still exists.

here's no uv on OCL:
nouv.jpg
and here on cpu:
nouv_cpu.jpg
notice that both objects show a faint seam on top but opencl version is also weirdly stretched (object is parented to empty and animated)

here's object with UV on opencl:
uv.jpg
and here with uv and on cpu
uv_cpu.jpg
having UV's fix the faint seam on both renders now but opencl still stretches the map weirdly. So right now only rendering on cpu while also having uvs work 100%.

here's the testscene:
test.rar
(3.35 MiB) Downloaded 180 times
I tested daily build from github, downloaded this morning. I also wanted to check build from azure but it says build not found.
acasta69
Developer
Developer
Posts: 472
Joined: Tue Jan 09, 2018 3:45 pm
Location: Italy

Re: Triplanar mapping / stochastic texturing

Post by acasta69 »

lacilaci wrote: Wed Jan 08, 2020 6:33 am So the daily build on github either isn't up to date, or the problem(s) still exists.
Apparently the build has been uploaded fine, at least the timestamps of the binaries seem correct.
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87
juangea
Donor
Donor
Posts: 332
Joined: Thu Jan 02, 2020 6:23 pm

Re: Triplanar mapping / stochastic texturing

Post by juangea »

Awesome, we’ll try it in less than an hour :)

Thanks!

EDIT: the build has 14 hours, so theoretically is the same we were using, we are going to re-update it just in case something went wrong with our previous update.

I’ll tell you how it goes and if it works correctly, thanks :)
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Triplanar mapping / stochastic texturing

Post by Dade »

lacilaci wrote: Wed Jan 08, 2020 6:33 am
Dade wrote: Wed Jan 08, 2020 12:00 am I should have already fixed that bug, you just need binaries from the very last sources.
So the daily build on github either isn't up to date, or the problem(s) still exists.
I should have now fixed this problem too: it was related to using a transformation in triplanar node (it was already working fine without transformation like in my test).
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Triplanar mapping / stochastic texturing

Post by lacilaci »

Dade wrote: Wed Jan 08, 2020 10:37 am
lacilaci wrote: Wed Jan 08, 2020 6:33 am
Dade wrote: Wed Jan 08, 2020 12:00 am I should have already fixed that bug, you just need binaries from the very last sources.
So the daily build on github either isn't up to date, or the problem(s) still exists.
I should have now fixed this problem too: it was related to using a transformation in triplanar node (it was already working fine without transformation like in my test).
hm. and if you compare my tests cpu with uv VS cpu without uv... is that also affected by transformation? Cause I understand the stretching but there is clearly a difference even on cpu (uv-no uv)
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Triplanar mapping / stochastic texturing

Post by lacilaci »

Aaand I even ran into an opposite problem.

object that has some uv(although bad one)
objwithuv.jpg
object has no uv(deleted uv's)
objwithoutuv.jpg
this is another pretty bad issue cause what If I want to use UV's for diffuse texture, but my roughness texture I want to have use triplanar.

How can I make sure my triplanar isn't affected by uv's or it's quality.
juangea
Donor
Donor
Posts: 332
Joined: Thu Jan 02, 2020 6:23 pm

Re: Triplanar mapping / stochastic texturing

Post by juangea »

We just updated the build and the bug I told you is not present anymore :)
Post Reply