Jump to content

Randomizing texture maps - Question


Barad-Dur

Recommended Posts

Hello all,

I was hoping to get help with the following problem:

I am trying to get H11 to use multiple texture maps in a sprite shader. I have a vopnet describing a simple surface shader. The texture map is being referenced in the surfacecolor node in the vopnet (I could just as easily use a texture node though). I thought I could override the attribute in the surfacecolor node with an attribute create and use - filename`$PT%n`.somefileextension (where n = the number of files to use) - as the string in the attribcreate referencing baseColorMap as the Name in the Attribcreate as that is the name of the parameter for the texture map in the surface color node. I am testing using the butterfly1-5.pic files. This is not working and I could use some help.

Could someone look at this .hipnc and let me know what I am doing wrong? Thank you.

David

TEST_02.hipnc

Link to comment
Share on other sites

you need to do 2 things

1. create Parameter VOP named baseColorMap in VOPs to drive baseColorMap input of surface color VOP. Because only Parameter VOPs serve for importing attributes from geo.

2. include attribute name (baseColorMap) in attributes parameter of sprite shader, so it will inherit it and pass it to the surface shader

TEST_02_fix.hipnc

Link to comment
Share on other sites

Hi,

in Your surface shader You have to add a parameter with the name "baseColorMap" so Your shader gets the baseColorMap attribute, without the shader You it does not catch it. it is not enough to name the parameter like it is called in the texture node and add it in the sprite procedural attributes, like anim already suggested

Martin

Hello all,

I was hoping to get help with the following problem:

I am trying to get H11 to use multiple texture maps in a sprite shader. I have a vopnet describing a simple surface shader. The texture map is being referenced in the surfacecolor node in the vopnet (I could just as easily use a texture node though). I thought I could override the attribute in the surfacecolor node with an attribute create and use - filename`$PT%n`.somefileextension (where n = the number of files to use) - as the string in the attribcreate referencing baseColorMap as the Name in the Attribcreate as that is the name of the parameter for the texture map in the surface color node. I am testing using the butterfly1-5.pic files. This is not working and I could use some help.

Could someone look at this .hipnc and let me know what I am doing wrong? Thank you.

David

Edited by sanostol
Link to comment
Share on other sites

anim,

Thank you very much. This solved the problem.

you need to do 2 things

1. create Parameter VOP named baseColorMap in VOPs to drive baseColorMap input of surface color VOP. Because only Parameter VOPs serve for importing attributes from geo.

2. include attribute name (baseColorMap) in attributes parameter of sprite shader, so it will inherit it and pass it to the surface shader

Link to comment
Share on other sites

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...