Author Topic: few basic questions  (Read 5623 times)

Hello there,

I managed to load a basic substance with the following outputs: base color, roughness, normal, metallic and displacement (instead of height which is not recognized).
The substance is displayed correctly onto the object (a basic grid-plane), also the displacement shows up.

Few  questions:
 
  • how can I access the displacement amount? Is there anywhere in houdini a multiplier for the displacement?
  • how can I access the individual channel outputs of the substance? For example, I need to use the displacement map output of the substance in a attribute vop to drive some calculations, or spawn some particles from the white area. What would be the workflow to access any output of the substance?
  • When the substance is loaded, viewport performance gets really poor with low fps. I guess it has to do with two 4k 16bit bitmap embedded in the substance, making it 26MB in size. Is there any way I can link those bitmap inside houdini into the substance?
  • Also, I get black renders with mantra. Console report the following error:
    Quote
    mantra: Unable to load texture
    'C:/Users/User1/AppData/Local/Temp/hfsF034_cracks_displacement.png'

thanks for any help

Hi Andr,

1. If you look into the folder where the plugin was installed (my documents/houdini15.5/dso/substance) you will find SubstanceToPrincipled.cfg . This is a JSON file that maps houdini render commands to the substance attributes. You will notice a displacement field at the bottom, you should be able to add the displacement strength under "enableDispTexture"

2. This might not be possible at the moment? or if it is, perhaps I'm not sure how you would go about grabbing the texture data

3. You can expose images as Substance Inputs in Designer, and then replace those large images in the substance with smaller versions in houdini, if you wish.

4. How consistent are the black renders? If you clear out your Temp folder do the problems persist?

Hello there Josh,
thanks for caring!

1) I tried to play with "dispTexScale" and "dispTexOffset", but nothing really changed. Note: I edited the cfg with the Notepad, also I made sure to restart Houdini in order to reload the cfg.

2) As you say it seems impossible to do it, but I expected this feature to be already present in the plugin. Would be so useful :(

3) For testing purposes, I tried to load a super basic substance, only one node ( a checker) and no bitmaps. The viewport is way smoother, but still have some slight  stutters from time to time.

4) I tried to clear my temp folder. Problem is that that file doesn't even exist in the temp folder. Also with the super basic substance (without bitmap images) I get the same error.
I might be doing something wrong in my houdini project (I'm new to the software)

I attached the files I'm using, in case you want to have a clear view of what's going on.

Thanks again for the help!



I attached the file I'm using

Last Edit: July 27, 2016, 07:33:34 pm

Hi Andr1,

1) did you try vm_displacebound as a parameter to see if that would produce any useful changes?

4) This is perplexing indeed. Can you try running Houdini in administrator mode to see if this fixes the problem?

hi Josh, thanks again!

1) I tried the parameter you mentioned, but it still produces no result.
At this point if anyone is able to share a simple working Houdini project utilizing the Substance Plugin with displacement (along with substancetopricipled.cfg and .sbar files) would be great!

2) Still the same error with Mantra


This is my scene setup

Last Edit: August 01, 2016, 12:53:15 pm

Andr1,

For the parameter issue, could you do me a favor? could you output the ifd when the substance is bound to the geometry? And could you then create a principled shader, using the substances and parameters you want, and create an ifd from that? I should be able to get us an updated substanceprincipled.cfg from that. Please email this to josh.coyne@allegorithmic.com

As for mantra, I can make some local code changes and send you a plugin build or two via email to see if we can't fix this problem!


2 - how can I access the individual channel outputs of the substance? For example, I need to use the displacement map output of the substance in a attribute vop to drive some calculations, or spawn some particles from the white area. What would be the workflow to access any output of the substance?

you can actually accomplish this in a sop network (with cooking)  by using a python SOP to force the substance material to write the textures to disk, then have your attribute VOP read them in via a texture VOP.   Having a COP node would indeed be great as it would open more uses for the substance plug in Such as being able to directly access the COP data into any context.  At that point, you could be using substances to make audio if you wanted to :)  But this workaround should get you working in the meantime

Andr1,

For the parameter issue, could you do me a favor? could you output the ifd when the substance is bound to the geometry? And could you then create a principled shader, using the substances and parameters you want, and create an ifd from that? I should be able to get us an updated substanceprincipled.cfg from that. Please email this to josh.coyne@allegorithmic.com

As for mantra, I can make some local code changes and send you a plugin build or two via email to see if we can't fix this problem!

Hi Josh,
after some researching on this ifd matter, I realized that apprentice/indie license are not allowed to output ifds. Unfortunately I can't help you with your request  :-\

Let me add a couple of notes that might help to understand the problem:
I managed somehow to extend the problem to all the outputs of the substance. Now console says that mantra is unable to load basecolor.png , metallic.png, etc etc

I've also notice that there's something going on with the distance of the camera from the mesh. When camera is far away I'm able to see "something", on the contrary as the camera approaches the geometry it starts to clip it, eventually resulting in black image. See the screenshot for reference, here the camera is starting to clip the geo.











you can actually accomplish this in a sop network (with cooking)  by using a python SOP to force the substance material to write the textures to disk, then have your attribute VOP read them in via a texture VOP.   Having a COP node would indeed be great as it would open more uses for the substance plug in Such as being able to directly access the COP data into any context.  At that point, you could be using substances to make audio if you wanted to :)  But this workaround should get you working in the meantime

Thanks for tip grayolorin!
I'll try to study houdini-python too (atm I'm getting my hands dirty with vex).
Yes a fully integrated substance plugin would be 360° useful!  (-:

The python should be super simple... drop a python SOP in your network and add the following line:

hou.node("../somePathToYourSubstance").parm("theSubstanceMaterialButton").pressButton()

Hi Andr1,

Would it be possible to send the .hip and related assets to josh.coyne@allegorithmic.com ? I'm wondering if graylorin and I could try running it on our machines and see how we fare . It's possible the apprentice/indie licensing is part of the issue.

Thanks a lot Josh,
I've just sent you the files.

One more thing, I after converting the maps to jpgs, now I get this result:





The python should be super simple... drop a python SOP in your network and add the following line:

hou.node("../somePathToYourSubstance").parm("theSubstanceMaterialButton").pressButton()

Thanks a lot grayolorin!

I ran your project in Houdini 15.5.480 and got this:

https://www.dropbox.com/s/wr0xdy47vbw58m6/HoudiniJpg.png

Does this appear to be more in line with your expectations ? What version of Houdini are you running?

Hey thanks for checking it out!
I'm pretty sure at the time of the first post I had the version you used for your test

Now I'm in 15.5.565:  I have no more warnings in console about Mantra unable to load textures..
But still present the problem of distant vs close camera.

With the very same close camera you're using in the screenshot I get this:


while with a more distant camera the scene is rendered but it seems that still some artifacts on the outline are occurring:



I can't understand what kind of artifact is being produced..

Interesting. In these cases it looks like it might be more of a near clip plane issue or something with the renderer.