Substance materials

Node-based Shader Editor

Substance materials

Postby joelrowney » Thu Aug 03, 2017 7:42 am

ive found the implementation of substances to be quite problematic when it comes to multi material substances. having the substance material specifically chosen in the shader means different instances of the shader cant be used for sub materials of the same substance. (unngghhh, my brain hurts) Also having to also assign the input textures (which may or may not actually show in the selection dialogue) which are already implicitly assigned in the shader. Would maybe having a dialogue option on a texture node that allows you to assign the usage of the texture "IF" the shader were to be assigned to a substance, work better? would this make the usability similar to the default unity shader that fills in the substance output textures as expected when its used in whatever substance material its been assigned to?
joelrowney
 
Posts: 8
Joined: Wed Jul 26, 2017 7:20 pm

Re: Substance materials

Postby Amplify_Borba » Thu Aug 03, 2017 10:04 am

Hello Joel, thank you for getting in touch and for using Amplify Shader Editor!

joelrowney wrote:ive found the implementation of substances to be quite problematic when it comes to multi material substances. having the substance material specifically chosen in the shader means different instances of the shader cant be used for sub materials of the same substance. (unngghhh, my brain hurts)


Unfortunately, that is the current implementation we have at the moment, it's aimed at single substance material use.
We are, however, open to any and all suggestions.

In order to avoid any possible misunderstanding, can you provide us a sample of the substance setup that you intended to use?

joelrowney wrote:Also having to also assign the input textures (which may or may not actually show in the selection dialogue) which are already implicitly assigned in the shader. Would maybe having a dialogue option on a texture node that allows you to assign the usage of the texture "IF" the shader were to be assigned to a substance, work better? would this make the usability similar to the default unity shader that fills in the substance output textures as expected when its used in whatever substance material its been assigned to?


Since we can't predict how shaders are going to be constructed, it could be a bit tricky. The user could simultaneously use the shader in a substance and a standard material. There's currently no way to control how that could be used.

In what circumstances were you unable to access the substance textures?

Looking forward to your reply!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Substance materials

Postby joelrowney » Thu Aug 03, 2017 1:40 pm

Thanks for your response.
i`m creating a planet generator from a spherised cube and using 6 materials in the substance to map to map images on each "face"
https://drive.google.com/open?id=0B6pMRD0-wflvOFBUcWpheVZsZjQ

i have a script to transfer settings between each sub materials substance settings. the default shader finds the correct substance maps for each material and works as expected. i am looking to replace the standard shader used in this with a amplify shader that would allow me to add further effects and access maps in alternative ways (for this i need to set the substance to generate all outputs).
i havent had much time to fault find this process, but once i add a newly made amplify shader to any material and add the reference in the shader, when i compile it and return to the unity editor to add the textures into the texture slots, the textures specified in the shader itself (and only those textures) are not available in the texture dialogue. i was wondering if i should consider making either specific shader functions for each substance material that can be accessed and switched between in a single shader, or duplicate the whole shader with duplicate substances (rather than sub materials)?
joelrowney
 
Posts: 8
Joined: Wed Jul 26, 2017 7:20 pm

Re: Substance materials

Postby Ricardo Teixeira » Thu Aug 03, 2017 2:47 pm

joelrowney wrote:Thanks for your response.
i`m creating a planet generator from a spherised cube and using 6 materials in the substance to map to map images on each "face"
https://drive.google.com/open?id=0B6pMRD0-wflvOFBUcWpheVZsZjQ

i have a script to transfer settings between each sub materials substance settings. the default shader finds the correct substance maps for each material and works as expected. i am looking to replace the standard shader used in this with a amplify shader that would allow me to add further effects and access maps in alternative ways (for this i need to set the substance to generate all outputs). i havent had much time to fault find this process, but once i add a newly made amplify shader to any material and add the reference in the shader, when i compile it and return to the unity editor to add the textures into the texture slots, the textures specified in the shader itself (and only those textures) are not available in the texture dialogue. i was wondering if i should consider making either specific shader functions for each substance material that can be accessed and switched between in a single shader, or duplicate the whole shader with duplicate substances (rather than sub materials)?



No problem, thank you for the sample.

Generating Outputs is a requirement, else they wont be visible. You can think of the editor has a sort of helper, you can build shaders but they depend on the available data. Unfortunately, I don't think that the type of automation that you are looking for is currently possible.

In your case it might be simple and more efficient to duplicate the substance and shader, Shader Functions would not be ideal for this particular case.

Can you walk us through your process? We would love to know more about your requirements and your 4 Substances setup, we might be able to provide some additional tips, not necessarily related to ASE.

Thanks!
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Substance materials

Postby joelrowney » Fri Aug 04, 2017 9:24 am

Thank you for your interest.

the goal of the part of the the project i`m working on is to be able to generate a procedural solar system. this will be attached to a procedural star generator and Galaxy system for the game "Galaxy in Flames" by Mjolnir Software http://mjolnirsoftware.com/

the planets are currently cube mapped cubes that have been deform to spheres.
Image
this is to fix various mapping problems caused by deforming uv`s to a sphere.

Each "face" has its own material id and is has planar 0,1 uv`s like a standard cube (but of course now the mesh is a sphere)
The substance for rocky planets (and a separate one for gas giants) has a switch which tells the substance which projection to generate. this switch is incremented on each material face (cubeframe value in the below image)
Image

I use a script to set the values in each of these materials so they match and can be edited in 1 place.
Image
i have a mapping issue at the seams between each material that i believe is due to a problem with the mesh tangent normals
Image
i am looking into either generating better tangent normals on the imported model from 3dsmax, or generating the sphere its self in code and generating all the mapping and normal data in code (top image).

I am using the standard shader at the moment. It works fine for the rocky planet, but i would love to use ASE to give the jovian planets a more "gassy" look. layered and voluminous.
Image
Re your advice i will try using a shader per face. i am thinking putting the main part of the shader into a function put the substance node reference in the face specific shaders. this i think will allow me to make develop the shader in a single place and then just recompile each shader to update them all, rather than editing each or copying code. your recently implemented shader tabs should make this fairly painless :D thank you.

you may also be interested in my current galaxy setup which uses ASE to produce a voluminous galaxy using geometry to create slices.
Image

and the internal galaxy which also uses ASE exclusively Image
joelrowney
 
Posts: 8
Joined: Wed Jul 26, 2017 7:20 pm

Re: Substance materials

Postby Ricardo Teixeira » Fri Aug 04, 2017 11:06 am

joelrowney wrote:Thank you for your interest.

the goal of the part of the the project i`m working on is to be able to generate a procedural solar system. this will be attached to a procedural star generator and Galaxy system for the game "Galaxy in Flames" by Mjolnir Software http://mjolnirsoftware.com/

the planets are currently cube mapped cubes that have been deform to spheres.
Image
this is to fix various mapping problems caused by deforming uv`s to a sphere.

Each "face" has its own material id and is has planar 0,1 uv`s like a standard cube (but of course now the mesh is a sphere)
The substance for rocky planets (and a separate one for gas giants) has a switch which tells the substance which projection to generate. this switch is incremented on each material face (cubeframe value in the below image)
Image

I use a script to set the values in each of these materials so they match and can be edited in 1 place.
Image
i have a mapping issue at the seams between each material that i believe is due to a problem with the mesh tangent normals
Image
i am looking into either generating better tangent normals on the imported model from 3dsmax, or generating the sphere its self in code and generating all the mapping and normal data in code (top image).

I am using the standard shader at the moment. It works fine for the rocky planet, but i would love to use ASE to give the jovian planets a more "gassy" look. layered and voluminous.
Image
Re your advice i will try using a shader per face. i am thinking putting the main part of the shader into a function put the substance node reference in the face specific shaders. this i think will allow me to make develop the shader in a single place and then just recompile each shader to update them all, rather than editing each or copying code. your recently implemented shader tabs should make this fairly painless :D thank you.

you may also be interested in my current galaxy setup which uses ASE to produce a voluminous galaxy using geometry to create slices.
Image

and the internal galaxy which also uses ASE exclusively Image



Thank you for the additional information, it's seems to be an amazing project! I wish that we had some tips for you but we are not entirely sure what else to recommend. Do keep us posted, we would be happy to help if you have any questions or if you run into any issues.

The galaxy looks awesome, we would love to promote your project as soon as you are ready to make it public.

Thanks!
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Substance materials

Postby joelrowney » Fri Aug 04, 2017 7:06 pm

:D Ha, no worries. i`m sure i`ll be back with more questions as we go. its a big project for a small team. Would you be happy for us to advertise the usage of ASE and other Amplify assets on this project?
joelrowney
 
Posts: 8
Joined: Wed Jul 26, 2017 7:20 pm

Re: Substance materials

Postby Ricardo Teixeira » Mon Aug 07, 2017 11:19 am

joelrowney wrote::D Ha, no worries. i`m sure i`ll be back with more questions as we go. its a big project for a small team. Would you be happy for us to advertise the usage of ASE and other Amplify assets on this project?


Sounds like a good challenge, we really look forward to seeing what you create. Any promotion on your side would be very welcome, let us know if we can do the same on our side when your project(s) is available to the public.

Be sure to also post your questions in the official ASE Unity forum thread, the community is very responsive.

Thanks!
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 0 guests

cron