Author Topic: substance designer using geometry  (Read 4111 times)

noob question probably but i am having trouble finding the answer.
how does one author a designer material such that when it is used in painter it will incorporate the normal, height and curvature information that painter has generated from an arbitrary mesh.

-j

I figured this out not long ago.

I can give a better answer when I get to my fun computer in a couple hours (maybe comeone esle will chime in before then), but what I remember is:
a) Drag in a normal/curvature/whatever map, easiest of course if it matches the mesh you're working on
b) Naming conventions matter
c) Then you need to "unhook" the maps from Step A before you publish the SBSAR file

Yeah,  I know, that's pretty vague, but it's only a preliminary answer.



A couple hours later...


STEPS:
A) Simply add an "Input Color" node - be sure it is Input, not Uniform Color
B) Near the bottom of the parameters panel, ADD a "Usage"
C) See this page for handy notes:  https://support.allegorithmic.com/documentation/display/SPDOC/Additional+Map

TIPS:
D) Be sure to look over the whole list of usages.  "Normal" and "NormalWS" are not near each other in the list.
E) When developing your substance, use an interesting piece of geometry, not just a cube, and drag in some baked maps from that geometry.  Later, just unhook those baked maps and hook in the node(s) from Step A.  I leave my baked maps in my graph in case I need to work on it again later.  They just sit there, and I'm pretty sure they do not make your exported sbsar file larger since they are not connected to the graph, so they get ignored when doing the export.

NOTES:
F) If your naming convention is wrong, you'll need to manually apply the maps in Painter, but if you follow them correctly, Painter will automagically make the right connections.

PICTURE:
1) The World Space Normal bitmap I used during development.  Notice it is not connected.
2) The "Input Color" node that actually gets used
3) This is a "dust" node that requires Ambient Occlusion and World Space Normal input maps
4) Here is where you add an input.  In this picture, I already set it to World Space Normal
5) You can see the Identifier I used is consistent with the naming convention per "B," above.
6) My display is black.  I think that's because it is now lacking some required inputs, but in Painter it will be fine.

I hope this helps.  :)


Last Edit: April 03, 2018, 01:15:55 am
Hobbyist
----------
Common "Help" suggestions:
- LOG FILE tips - https://forum.allegorithmic.com/index.php/topic,22451.0.html
- LICENSING issues https://www.allegorithmic.com/contact
- ATTACH files and pictures to posts: https://forum.allegorithmic.com/index.php/topic,23670.0.html

thank you for the reply. i appreciate the "A couple hours later..." section with the screens and detailed explanation.

while this works, i truly hope this isn't what allegorithmic expects a developer to do.
forcing us to do some rewiring of inputs just to export the material and then rewire those same inputs again to make changes in designer feels more than a little lame. especially if files get worked on by many people.
its a sloppy workflow just asking for user introduced bugs.

a flag or "debug/editor switch" or "generate from current mesh" node has to exist right?
here is hoping that someone can set me straight.
-j





Last Edit: April 08, 2018, 10:57:27 am

Fair comment.  There might be a more elegant solution, but this worked for me.

I think, though, it is simply the nature of the task.  You are constructing a substance, and if you want it to utilize a curvature map, somehow you need to make that happen, and tell it what to do with that map, and to what degree.


a flag or "debug/editor switch" or "generate from current mesh" node has to exist right?

I think that is, in essence, what the naming convention will do for you, assuming you use the substance in Painter.  If you want to do all the work in Designer-only, several of the steps could be omitted, but it will take a bit more work to apply it to another model.

The good thing is once you are aligned with the correct naming convention, it is now a "universal" substance and can work in any Painter project where you have baked the additional maps.  Start a new Painter project with a mesh, bake the maps, and then you simply drag your spiffy material onto it and viola, instance awesomeness.
Last Edit: April 09, 2018, 12:29:03 am
Hobbyist
----------
Common "Help" suggestions:
- LOG FILE tips - https://forum.allegorithmic.com/index.php/topic,22451.0.html
- LICENSING issues https://www.allegorithmic.com/contact
- ATTACH files and pictures to posts: https://forum.allegorithmic.com/index.php/topic,23670.0.html

so the inputs i have been able to successfully set up seem to only be the grayscale ones.
i have curvature, ambient, and thickness all showing up in painter.
however the color images, world space normal, position, and normal, are not working.
i used your image for the world space normal map (thanks again for that)and set it identically but it does not show up as a map in painter. i even tried setting it to match the 16 bit format and still nothing.

any ideas what i or designer is doing wrong?


as a bit of a side note i have been using switch nodes connecting the input and the pre-baked maps, with all of them controlled by a single bool that i can toggle in designer or painter. i feel like its still less than ideal but its working. at least no need to rewire before testing.
Last Edit: April 09, 2018, 09:37:20 am

EDIT:  See next post instead.



I have an idea...

Is your "color image node" 8-bit (grayscale)?

Last Edit: April 10, 2018, 02:13:35 am
Hobbyist
----------
Common "Help" suggestions:
- LOG FILE tips - https://forum.allegorithmic.com/index.php/topic,22451.0.html
- LICENSING issues https://www.allegorithmic.com/contact
- ATTACH files and pictures to posts: https://forum.allegorithmic.com/index.php/topic,23670.0.html

I think you can ignore my previous idea... I have a new one...

In an empty area of your substance graph:
Right-click -->  Add Node --> Color Image Input

(Versus "Grayscale Image Input")

It's an idea.  Don't know if it's a good idea or not.
If that's not it, I think I've exhausted anything I can come up with.
Hobbyist
----------
Common "Help" suggestions:
- LOG FILE tips - https://forum.allegorithmic.com/index.php/topic,22451.0.html
- LICENSING issues https://www.allegorithmic.com/contact
- ATTACH files and pictures to posts: https://forum.allegorithmic.com/index.php/topic,23670.0.html

You can also drop a bitmap resource on an input node in order to see the rest of your graph process something else than the default uniform black content. It's not perfect as it does not handle the sizes automatically, but you don't have to rewire the graph before publishing. We are working on improving that workflow.

Thanks, Cyrille.  Improvements are always appreciated.  It will be great to see what you guys can do to make it smoother and easier.

@tripsan - Did you get the "color" ones to work?
Hobbyist
----------
Common "Help" suggestions:
- LOG FILE tips - https://forum.allegorithmic.com/index.php/topic,22451.0.html
- LICENSING issues https://www.allegorithmic.com/contact
- ATTACH files and pictures to posts: https://forum.allegorithmic.com/index.php/topic,23670.0.html

well i got the "color" maps showing up in painter... but i feel like i might be going about it wrong.
first to get WSnormal map and Position map inputs to show up in painter i had to to add outputs for those maps in designer.
which seems odd since i didn't have to add a Thickness map output in designer to get a Thickness map input in painter.

and my Normal map input in painter isn't automagically getting a Normal map however it is showing up as a color picker for a Normal map input. so not sure whats up there.


At this point I don't think I have anything else to suggest... unless you would be willing to share your .sbs file.

You could either attach it to a reply here (open to everyone) or use the email feature (click on my avatar) if you are comfortable with that.  An Allegorithmic staff member *might* be willing to take a look, but I'm pretty sure we are dealing with pilot error (no offense) rather than a bug, so even though they're wonderfully helpful, I'm not sure how motivated they will be to look.

I don't know if anyone else has ideas, but other than looking at your file, I am at a dead end.
Hobbyist
----------
Common "Help" suggestions:
- LOG FILE tips - https://forum.allegorithmic.com/index.php/topic,22451.0.html
- LICENSING issues https://www.allegorithmic.com/contact
- ATTACH files and pictures to posts: https://forum.allegorithmic.com/index.php/topic,23670.0.html

happy to share, this is hardly a material to get worked up about :).
and i have no problem with this being pilot error. you gotta crash some planes to make an omelette.

its lightly commented... lightly.


@Tripsan,

I found two things.

1) The "Identifier" for your Normal map in Designer was simply "normal."  I believe it should be "normal_base."
https://support.allegorithmic.com/documentation/display/SPDOC/Additional+Map

2) I tested it on the MeetMAT sample project, and I had to bake the Normal map.  The pre-baked normal map in the sample project is the World Space Normal.

In the picture below, I did the two things I listed above, and you can see the Normal map did magically appear.  I did not yet bake a Thickness map, so that is understandably not found.

Later (after taking the screenshot) I baked the Thickness map, and re-added the material to Mat, and then it, too, connected as expected.

I hope this helps.




P.S.
Cool substance.  :)
Last Edit: April 13, 2018, 02:01:08 am
Hobbyist
----------
Common "Help" suggestions:
- LOG FILE tips - https://forum.allegorithmic.com/index.php/topic,22451.0.html
- LICENSING issues https://www.allegorithmic.com/contact
- ATTACH files and pictures to posts: https://forum.allegorithmic.com/index.php/topic,23670.0.html

so the maps seem to be working automagically... so i set about doing some comparisons between how it looked in painter and designer only to find it was moderately different looking even on the same mesh.
did some reading about it and saw a suggestion from a company man who said to mess with some "absolute" and or "relative to parent settings" on the input nodes and it made things much worse. i tried setting everything back to the way it was and it still looks awful so im not 100% sure what going on. :)




not only is the resolution way lower, but the height map scratches are in different places and much more pronounced.
while the scratches which are driven by the metallic and roughness maps are lower rez but appear to be in the correct places.

its important to note that the height map scratches are very very subtle on the designer side on purpose, and that the pronounced nicks or gouges you see are driven by the baked normal map.


i am just unclear as to why it would look any different at all between the two programs.
my guess is i have just set a setting someplace to be low rez and have yet to find it, but was wondering if anyone had any hints about where or what it might be.

-j