(Open)Subdiv and Displacement shapes

Discussion related to the LuxCore functionality, implementations and API.
User avatar
B.Y.O.B.
Developer
Posts: 3611
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: (Open)Subdiv and Displacement shapes

Post by B.Y.O.B. » Tue Jan 21, 2020 1:57 pm

Sharlybg wrote:
Tue Jan 21, 2020 1:34 pm
Please guys what is the correct node tree and file format for Vector displacement ?
Node tree is here: viewtopic.php?f=3&t=1489&start=10#p18641
You can find an example file in the first post of that thread.
Not sure which software is able to generate vector displacement maps.

User avatar
Sharlybg
Donor
Posts: 2077
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: (Open)Subdiv and Displacement shapes

Post by Sharlybg » Tue Jan 21, 2020 3:42 pm

So i was right in my setting but my result look weird.
vector.jpg
Map from here : https://docs.arnoldrenderer.com/downloa ... 000&api=v2
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA

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

Re: (Open)Subdiv and Displacement shapes

Post by Dade » Tue Jan 21, 2020 4:04 pm

Sharlybg wrote:
Tue Jan 21, 2020 3:42 pm
So i was right in my setting but my result look weird.

vector.jpg

Map from here : https://docs.arnoldrenderer.com/downloa ... 000&api=v2
Unfortunately, there isn't a standard for displacement maps and different programs use different +/-X +/-Y +/-Z orders (it is literally a mess). LuxCore supports map channel remapping and it is configured by default to work with Blender displacement maps.

Arnold/Mudbox have a different order than Blender and they require a re-map: https://github.com/LuxCoreRender/LuxCor ... s.cpp#L294

Code: Select all

		// Blender standard: R is an offset along
		// the tangent, G along the normal and B along the bitangent.
		// So map.channels = 2 0 1
		//
		// Mudbox standard: map.channels = 0 2 1
I assume BlendLuxCore is not exposing this setting and just using the default (i.e. Blender way) :?:
Support LuxCoreRender project with salts and bounties

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

Re: (Open)Subdiv and Displacement shapes

Post by B.Y.O.B. » Tue Jan 21, 2020 4:06 pm

Ah yes, exposing map.channels is still on my Todo list.
https://github.com/LuxCoreRender/BlendL ... ent.py#L31

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

Re: (Open)Subdiv and Displacement shapes

Post by B.Y.O.B. » Sun Jan 26, 2020 3:18 pm

Sharlybg wrote:
Tue Jan 21, 2020 3:42 pm
So i was right in my setting but my result look weird.
I have added support for all map channel permutations to the vector displacement node.

User avatar
Sharlybg
Donor
Posts: 2077
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: (Open)Subdiv and Displacement shapes

Post by Sharlybg » Sun Jan 26, 2020 4:04 pm

B.Y.O.B. wrote:
Sun Jan 26, 2020 3:18 pm
Sharlybg wrote:
Tue Jan 21, 2020 3:42 pm
So i was right in my setting but my result look weird.
I have added support for all map channel permutations to the vector displacement node.
Thanks you matte for this fast update. Really appreciated.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA

Fox
Posts: 435
Joined: Sat Mar 31, 2018 11:17 am

Re: (Open)Subdiv and Displacement shapes

Post by Fox » Tue May 26, 2020 11:01 am

Both displacement types have disconnect from faces, is this normal?
displacement.jpg

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

Re: (Open)Subdiv and Displacement shapes

Post by Dade » Tue May 26, 2020 2:27 pm

Fox wrote:
Tue May 26, 2020 11:01 am
Both displacement types have disconnect from faces, is this normal?
Are you sure the original object had connected faces ? It doesn't look like.
Support LuxCoreRender project with salts and bounties

Fox
Posts: 435
Joined: Sat Mar 31, 2018 11:17 am

Re: (Open)Subdiv and Displacement shapes

Post by Fox » Tue May 26, 2020 2:54 pm

Dade wrote:
Tue May 26, 2020 2:27 pm
Are you sure the original object had connected faces ? It doesn't look like.
It's defalt blender cylinder. I also tested ctrl+t and mesh -> clean up -> merge by distance.

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

Re: (Open)Subdiv and Displacement shapes

Post by Dade » Tue May 26, 2020 3:14 pm

Fox wrote:
Tue May 26, 2020 2:54 pm
Dade wrote:
Tue May 26, 2020 2:27 pm
Are you sure the original object had connected faces ? It doesn't look like.
It's defalt blender cylinder. I also tested ctrl+t and mesh -> clean up -> merge by distance.
As far as I remember, BlendLuxCore has to export disconnected faces if the vertices do not share normals, etc.
Support LuxCoreRender project with salts and bounties

Post Reply