Full-procedural ceramic tiles material

General discussion about Indigo Materials - material requests, material developement, feedback, etc..
User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: Full-procedural ceramic tiles material

Post by galinette » Tue Feb 16, 2010 11:40 am

Likely yes, but how to remove it?

Here is my subdivision settings:

Code: Select all

<normal_smoothing>true</normal_smoothing>
<max_num_subdivisions>11</max_num_subdivisions>
<view_dependent_subdivision>true</view_dependent_subdivision>
<subdivide_pixel_threshold>0.2</subdivide_pixel_threshold>
<subdivide_curvature_threshold>0.1</subdivide_curvature_threshold>
<subdivision_smoothing>false</subdivision_smoothing>
<displacement_error_threshold>0.0001</displacement_error_threshold>
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: Full-procedural ceramic tiles material

Post by fused » Tue Feb 16, 2010 3:39 pm

hm.... try a smaller curvature threshold?

that will produce heaps more tris tho :)

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: Full-procedural ceramic tiles material

Post by galinette » Tue Feb 16, 2010 9:14 pm

I think I have understood... The angle at the edge of the tile is sharp due to random tile generation and Indigo smooths the top facet (the large triangle you can see) with a quasi vertical facet generated on the side of the tile. Hence the gradient we can observe.

So that means, there should be an option to smooth normals after subdivision only if below a curvature threshold. Currently, the smoothing after subdivision can only be set true or false.

I can tweak the material & subdivision to solve this but the previous method would be, I think, the only way to solve it in a reliable and generic way.

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: Full-procedural ceramic tiles material

Post by CTZn » Thu Feb 18, 2010 7:12 pm

Curvature and error threshold can produce inesthetical features on noisy surfaces. Actually I never use error th., and reserve curvature for converted-to-polys, parametric (smooth) surfaces, like glasses and plates. Subdivision level and pixel ratio works well together.

And the curvature threshold you used is probably too high anyways (about 6° if I'm correct), 0.2 for pixel ratio is much lower than necessary (by 3 or 4x).
obsolete asset

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: Full-procedural ceramic tiles material

Post by galinette » Sat Feb 20, 2010 2:11 am

Here is the final version! I have uploaded the material

http://www.indigorenderer.com/materials/materials/327

Etienne
Attachments
ceramic-test.jpg
ceramic-test.jpg (116.03 KiB) Viewed 6292 times
ceramic-test-zoom.jpg
good for close-ups!
ceramic-test-zoom.jpg (124.34 KiB) Viewed 6359 times
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
Whaat
Developer
Posts: 1827
Joined: Fri Dec 22, 2006 6:15 am
Location: Canada
Contact:

Re: Full-procedural ceramic tiles material

Post by Whaat » Sat Feb 20, 2010 2:40 am

incredible usage of the ISL :shock:

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: Full-procedural ceramic tiles material

Post by galinette » Sat Feb 20, 2010 4:50 am

CTZn wrote:0.2 for pixel ratio is much lower than necessary (by 3 or 4x).

From a theoritical point of view, I'd say yes. But here, I have to use very low values (such as 0.01 or lower) to get rid of the post-subdiv smoothing bug.

The bug comes from subdivided facets having a curvature too big. But the curvature parameter was not in cause here, since the subdivision rule is a logical AND of all conditions. So I had to reduce pixel ratio a lot in order to achieve correct edge angles.

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
fenerolina
Posts: 141
Joined: Sun Mar 15, 2009 12:27 pm
Location: Pyrenees

Re: Full-procedural ceramic tiles material

Post by fenerolina » Sat Feb 20, 2010 5:02 am

Awesome work Galinette! Congrats!
So, what's the next challenge?! :)

Sorry to bother you again with this but I don't know how to add the color gradient png. I seems to be missing even if I re-add it in the material editor.
Thank you.
Attachments
choco.jpg
choco.jpg (49.72 KiB) Viewed 6266 times

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: Full-procedural ceramic tiles material

Post by galinette » Sat Feb 20, 2010 5:25 am

The gradient is missing again???

That means there is definitely a bug in the material packer of both the material editor and the renderer. And I really don't know why it's not working if you add it manually. I do everything with the material editor, and it works quite well.

You say it's not working, but you manage to get a test render of correct color in the editor?

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
fenerolina
Posts: 141
Joined: Sun Mar 15, 2009 12:27 pm
Location: Pyrenees

Re: Full-procedural ceramic tiles material

Post by fenerolina » Sat Feb 20, 2010 7:31 am

Yes, It works on the material editor but the colour seems to be monocromatic. I'm not shure if the gradient should be visible in my material preview because tiles are big. But one thing is shure: when I apply this material in skUp the shader texture is ignored/not applied and indigo crashes. Whaat to do?
Thank you.
Attachments
choco.png
choco.png (415.79 KiB) Viewed 6241 times

User avatar
Whaat
Developer
Posts: 1827
Joined: Fri Dec 22, 2006 6:15 am
Location: Canada
Contact:

Re: Full-procedural ceramic tiles material

Post by Whaat » Sat Feb 20, 2010 8:53 am

fenerolina wrote: Whaat to do?
Shader textures are not supported by the SkIndigo UI. To use this material, you need to use a Linked IGM/PIGM material. Be sure to apply a texture to the SU material so you can control the UV coordinates.

User avatar
fenerolina
Posts: 141
Joined: Sun Mar 15, 2009 12:27 pm
Location: Pyrenees

Re: Full-procedural ceramic tiles material

Post by fenerolina » Sat Feb 20, 2010 9:32 am

Thanks Whaat! It works now. :D :D

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: Full-procedural ceramic tiles material

Post by CTZn » Tue Feb 23, 2010 9:29 am

I'm wondering if my last post was pruned or perhaps I did just not send it...

Here's the shader nearly in situation... I'm not sure I used the DB version because it looks different. In another of my tests the displacement was obvious (tiles use displacement instead of bump mapping... I think), maybe I overwrote that.

Code: Select all

deleted image, see below
oh I'm abusing lens shift, the film center is off the image so there's a lot of distortion.

The floor (20x20) mesh parameters:

Code: Select all

	<normal_smoothing>false</normal_smoothing>
	<merge_vertices_with_same_pos_and_normal>true</merge_vertices_with_same_pos_and_normal>
	<wrap_u>false</wrap_u>
	<wrap_v>false</wrap_v>
	<max_num_subdivisions>7</max_num_subdivisions>
	<subdivision_smoothing>false</subdivision_smoothing>
	<displacement_error_threshold>0</displacement_error_threshold>
	<view_dependent_subdivision>true</view_dependent_subdivision>
	<subdivide_pixel_threshold>2</subdivide_pixel_threshold>
Pixel threshold is 2 since the final image is half the frame buffer. 1px sized triangles make surfaces vibrant I'm finding, and decent displacement.

I'll redo that because I feel like there's only bump used.
Last edited by CTZn on Tue Feb 23, 2010 10:25 pm, edited 1 time in total.
obsolete asset

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: Full-procedural ceramic tiles material

Post by galinette » Tue Feb 23, 2010 10:09 am

I'd say there is only bump in these pictures. In some "draft" versions I have posted, sometimes you may see some code in the displacement shader, but in fact it always return 0.0 if you look into the code.

Last version (DB) should be much nicer, but you will probably have to increase much subdivision...

I agree that 1px threshold for subdivision is theoritically enough. But in difficult cases you then end up with smoothing issues (discussed in other threads). Then you need to decrease the threshold.

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: Full-procedural ceramic tiles material

Post by CTZn » Tue Feb 23, 2010 10:22 pm

Yes, that's how I named the file, a draft ! My mistake, I was more involved in smooting the workflow with IGMs than actually looking into the shader. Same mesh settings than above, only CRF/whitepoint changed.
MarxDo_06_shaders.jpg
1563474 triangles for the floor.
MarxDo_06_shaders.jpg (360.73 KiB) Viewed 6034 times
I can nothing but insist on that not using curvature threshold bypasses the issue. 9 times on 10 I don't, precisely because I'm not happy with its results :) I'll now compare the triangles counts and results with curvature threshold and see what gives.

Should I add: awesome shader !? If you want me to fall in love now you must do a worley tiling :lol: Awesome.

edit: adding a curvature threshold of 0.1° (0.001745329026 radians) has no impact, it's too low. No change with 1° either, I'll try higher values...

I nuked my next post, it was off...
obsolete asset

Post Reply
72 posts

Who is online

Users browsing this forum: No registered users and 19 guests