Jump to content

My material


ilmpixar

Recommended Posts

Looking forward picking this apart and learning from it.

One thing i noticed in the screenshot is the Layers for you textures. I find there is no other way to add extra layers/textures? I tried using the Multiparm list but i cant get it to work. I wonder if anyone else has. There are workaround if your textures are sequential but you still chose whether to switch a texture on/off without "hard coding" it into the shader.

Thanks for contributing.

Link to comment
Share on other sites

simp_tex_layer

Thank you for the example. However this is something i know :(.

What i meant was how are you able to add texture Layers dynamically. Click on enable Layer 1 and a Layer 2 tab will appear. This is something i have tried to do for a while but have not succeeded.

Thank you for your help.

Link to comment
Share on other sites

Did some more diving, the ability to add extra texture layers is not dynamic :( (I didnt see them at first since they are invisible parameters and it was hard looking at the code, for some reason Houdini got really sluggish).

There are 7 Layers predefined and by choosing to add an image will reveal the next one and so on. Does anyone know how to truly make this process fully dynamic giving the user control to add/remove texture layers. I know a way to automate via clever naming convention but the user will not have a way to switch them on/off as easy (which is needed when you want to save memory)

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Looking forward picking this apart and learning from it.

One thing i noticed in the screenshot is the Layers for you textures. I find there is no other way to add extra layers/textures? I tried using the Multiparm list but i cant get it to work. I wonder if anyone else has. There are workaround if your textures are sequential but you still chose whether to switch a texture on/off without "hard coding" it into the shader.

Thanks for contributing.

I believe I have succeeded in getting this to work at a fundamental level. Attached is a file that just has one material SHOP, and you'll notice it has an addNoise button. If you click the button, a turbulent noise node is added inside the shader, and the ui elements are promoted and linked to that node. Currently it's not hooked up to anything but this was my proof of concept as I really want to have a clean modular way of adding things with a single button press. This is all done via Python module of the digital asset. If you are good at coding please tear apart the code in here to make it better, as I will be adding stuff/making it better throughout the week.

Ultimate goal here is to have a shader similar to how Max and V-Ray materials work, with maps created with the click of a button. Anyway, let me know what you think.

-S :)

layers1.hip

layers.otl

Edited by stevegh
  • Like 2
Link to comment
Share on other sites

Hey there Stephen,

Yep, this rocks. The only thing i would need to make sure i get right is the connections and promotions. I think for my uses i will create a custom texture map vop otl and use python to add them accordingly. I only had a brief look at the code, i imagine deletion and parameter cleanup is fairly straightforward?

This is the way forward i think for my needs. Thanks a lot. I too will try to get a version going. I will look forward to your results.

-andrew

edit:// typo

Edited by phrenzy84
Link to comment
Share on other sites

Hey Andrew,

Yea I am currently breaking everything out to be flexible enough to handle any vop node, and I should have an example of this working with the mantra surface shader (hopefully) tomorrow. Have a look at the unifiednoise vop's scripts, along with the pyro2 module (C:\Program Files\Side Effects Software\Houdini 12.5.533\houdini\python2.6libs) for examples of how SESI is handling it currently. That's where I'm getting most of this from and while it is fairly straightforward it's taking me some time to get it right.

Look forward to seeing where you end up!

-S

Link to comment
Share on other sites

Yea, im no python whizz so it might take me longer, but the custom texture vop wont take a minute. I already have a version in my shaders that is duplicated for each uv tile i require.

I never thought to look into the pyro2 noise vop nodes, makes perfect sense, i remember how well it handled all those parm promotions.

Link to comment
Share on other sites

So here is an update, I took the (almost) factory Mantra Surface shader and got this working. Right now if you plop down this node, go to the settings tab and hit add map buttons, it will go through and add buttons for a predefined set of parameters (shown at the very top of the python module script on the HDA). You can click to add a (for now still turbnoise) node, it'll populate with the added node parms and link them. You can also remove it which will obviously delete the node.

Next up will be hooking these newly created nodes up, followed by creating an 'uber' map that will have a bunch of maps in it instead of just this turbnoise. Also not sure why the first parameter comes in as a string field instead of a dropdown but w/e. Still a good bit of clean-up to be done on the code as well but it's not terribly difficult to read at this point.

My next post will probably be in a new thread as I feel we have hijacked this one - sorry!

-S

edit: I guess that first 'Signature' parameter isn't promote-able which is why it's coming in that way. Oh well it will be changed anyway. Also there is a stupid OGL env map error so just ignore that.

mantraSurface_maps_01.otl

Edited by stevegh
Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...