View topic - New Clay Render system proposal

New Clay Render system proposal

Ask here your questions about development and about raytracing theory & implementation. Here you can post your patches for review.

New Clay Render system proposal

Post Thu Apr 09, 2015 6:21 am

Hello,

I've sent a pull request to the Blender exporter to change the entire Clay Render system to make it more powerful and flexible.

https://github.com/YafaRay/Blender-Exporter/pull/20

Some test images attached, based on this example .blend file:
cubos_01b_yafaray_tests.blend.zip
.blend file used to get the example images.
(120.67 KiB) Downloaded 440 times
Attachments
cubos_01b_yafaray_tests - normal render.png
cubos_01b_yafaray_tests - clay render oren nayar with sigma 1.png
cubos_01b_yafaray_tests - clay render normal diffuse shader.png
cubos_01b_yafaray_tests - clay render keeping transparency.png
cubos_01b_yafaray_tests - clay render keeping bump-normal maps.png
cubos_01b_yafaray_tests - clay render keeping bump maps and transparency.png
cubos_01b_yafaray_tests - clay render excluding material.png
Last edited by David Bluecame on Thu Apr 09, 2015 6:43 pm, edited 1 time in total.
User avatar
David Bluecame
 
Posts: 418
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: New Clay Render system proposal

Post Thu Apr 09, 2015 9:30 am

Hi David

Thanks for taking time for implementing this. I would like to throw just one idea to improve on what you are doing. I think that in order to make the "general settings" section less convoluted I think it would be better that all clay render parameters are grouped in its own dedicated section below "general settings", so you could use as well less redundant texts for the "keep transp/translu" and "keep relief mapping" tickboxes. This section could be called "clay render".

PD: I think a better dafault for orent nayar is 0.3 which is not that extreme as 0.5
User avatar
Samo
 
Posts: 3077
Joined: Tue Dec 20, 2005 10:39 am
Location: Spain

Re: New Clay Render system proposal

Post Thu Apr 09, 2015 6:17 pm

Hello, Álvaro.

Done and added to the existing pull request. Some images:
Attachments
cubos_01b_yafaray_tests - normal render (clay settings grouped together).png
cubos_01b_yafaray_tests - clay render keeping bump-normal maps (clay settings grouped together).png
User avatar
David Bluecame
 
Posts: 418
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: New Clay Render system proposal

Post Thu Apr 09, 2015 6:31 pm

awesome thanks !
User avatar
Samo
 
Posts: 3077
Joined: Tue Dec 20, 2005 10:39 am
Location: Spain

Re: New Clay Render system proposal

Post Thu Apr 09, 2015 6:45 pm

Thank you, Álvaro!

Now I hope all these changes do not cause any new issues! If you want I can make new builds for Windows so people can test it?

I have also added the .blend file I used in the original post.
User avatar
David Bluecame
 
Posts: 418
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: New Clay Render system proposal

Post Fri Apr 10, 2015 10:37 am

Hullo David.
I added Clay render material selection combobox like Blender render has. Currently it supports only Shiny Diffuse materials and exporter only copies selected material properties to default Clay.
https://github.com/TynkaTopi/Blender-Ex ... #L294-L316
lines 294-316

You can use it if needed :)
TynkaTopi
 
Posts: 7
Joined: Sat Jun 08, 2013 9:10 am

Re: New Clay Render system proposal

Post Fri Apr 10, 2015 6:20 pm

David Bluecame wrote:Thank you, Álvaro!

Now I hope all these changes do not cause any new issues! If you want I can make new builds for Windows so people can test it?

I have also added the .blend file I used in the original post.


I will wait for when you have builds ready.
User avatar
Samo
 
Posts: 3077
Joined: Tue Dec 20, 2005 10:39 am
Location: Spain

Re: New Clay Render system proposal

Post Sat Apr 11, 2015 3:20 pm

Hello,

I've made an experimental build for Blender 2.74 / Windows 7/8.1 64bits including this fix. Please see:

http://www.yafaray.org/community/forum/ ... 038#p31038

Please test it and let us know if it works for you.
User avatar
David Bluecame
 
Posts: 418
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: New Clay Render system proposal

Post Sat Apr 11, 2015 3:40 pm

Hello, TynkaTopi

About the code you suggested, that's quite nice, thank you! I plan to improve a bit more the Clay material and I will almost for sure include your suggestions.

One of the things I would like to do in the future (but not easy) is to select freely any existing material as Clay material (even glossy, textured, etc). I have an idea about how to do it but there are still some issues (similar to the problem in the Blend material sometimes losing/changing the references! (http://www.yafaray.org/node/546). Another difficulty is to see how to "merge" any freely selectable Clay material with the Existing materials to keep this new functionality that allows to keep transparency/bump, exclude materials from Clay render, etc.

Thanks again and best regards!
User avatar
David Bluecame
 
Posts: 418
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: New Clay Render system proposal

Post Sun Apr 12, 2015 8:14 am

Hello,

I'm also experimenting trying to create Linux builds. Please try this for Linux 64bits:

https://github.com/DavidBluecame/Blender-Exporter/releases/download/v0.1.99-beta1/YafaRay.v0.1.99-beta1.2015-04-11.-.experimental.build.for.Blender.2.74.for.Linux.64bit.zip

I've been working on the dependencies and libraries to avoid the traditional problems with libjpeg, etc, so I've changed the dependency system in the Exporter. To make this build as "distro-independent" as possible, I've tried to optimize it to match the Blender website Linux 64 glib2.11 build.

Please will you test it to see if it works correctly without libpng, libjpeg, etc, issues?

I hope it helps. Please let me know how it goes...
User avatar
David Bluecame
 
Posts: 418
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: New Clay Render system proposal

Post Sun Apr 12, 2015 12:40 pm

Hello,

Builds for Linux 64bit and 32bit of this experimental version here:

http://www.yafaray.org/community/forum/viewtopic.php?p=31050#p31050

I hope you like them.
User avatar
David Bluecame
 
Posts: 418
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: New Clay Render system proposal

Post Wed Apr 15, 2015 8:34 pm

Hi David, all seems working all right. There is an issue though, the clay render pass seems to be keeping Reflection Strength value from materials it replaces. Thanks.
User avatar
Samo
 
Posts: 3077
Joined: Tue Dec 20, 2005 10:39 am
Location: Spain

Re: New Clay Render system proposal

Post Thu Apr 16, 2015 4:09 am

Thank you for your tests, Alvaro!

You are right, I've made a change and it's now part of the pull request against the official YafaRay code:
https://github.com/DavidBluecame/Blende ... b34d5323cc

I will try to make another experimental build asap, or you can just replace for now the file io/yaf_material.py with the one from here to test it:
https://github.com/DavidBluecame/Blende ... aterial.py
User avatar
David Bluecame
 
Posts: 418
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: New Clay Render system proposal

Post Fri Apr 17, 2015 9:35 am

works very well thank you !
User avatar
Samo
 
Posts: 3077
Joined: Tue Dec 20, 2005 10:39 am
Location: Spain


Return to Developers' Corner



Who is online

Users browsing this forum: No registered users and 1 guest

cron