bw5013 Posted July 21, 2010 Share Posted July 21, 2010 I have a obj model. It's UV's are tiled. each taking up a positive zero to one. For each tile there is a texture for that UV space. My problem is Houdini only looks at the first tile when applying textures to the model. No matter the texture I assign to the model the area of the model that gets mapped is the same. *a patch around the eye since that's the UV space of the first tile. Basically I have 39 tiles that aren't being looked at. Any clue on how I can get houdini to look at the other tiles? Quote Link to comment Share on other sites More sharing options...
bw5013 Posted July 23, 2010 Author Share Posted July 23, 2010 A solution to this problem is seems to be in using u-scale and v-scale in the uv project node. Vex super-material has this built in although the render comes up blank even though the textures appear fine in the viewport. O_O Off to solve the next problem. Quote Link to comment Share on other sites More sharing options...
Alanw Posted July 24, 2010 Share Posted July 24, 2010 A solution to this problem is seems to be in using u-scale and v-scale in the uv project node. Vex super-material has this built in although the render comes up blank even though the textures appear fine in the viewport. O_O Off to solve the next problem. What I do is group each tile individually, and they each get their own shader with their own texture maps. You'll use the Material SOP to assign shaders to groups. Mari exports separate texture maps for each tile anyways, so having multiple shaders seems like the way to go. It's very easy to make groups as well since you can make poly selections from the UV viewport. Quote Link to comment Share on other sites More sharing options...
bw5013 Posted July 24, 2010 Author Share Posted July 24, 2010 (edited) What I do is group each tile individually, and they each get their own shader with their own texture maps. You'll use the Material SOP to assign shaders to groups. Mari exports separate texture maps for each tile anyways, so having multiple shaders seems like the way to go. It's very easy to make groups as well since you can make poly selections from the UV viewport. We think alike. That's the exact approach I took. I solved the previous problem mentioned. Seems uv scale and range had nothing to do with the fix I thought I had. It had more to do with the shader I was using. There seems to be a major difference with the way a Vex Surface Shop and A Vex Super Material handle UV's/texture maps. SuperMaterial has it right. But, it seems the VEX Super Materials Vex Vops can't be opened so I can't visually inspect what the difference is to apply it to a custom shader(s) It's looking like learning to write VEX may be my only option to continue? Edited July 25, 2010 by bw5013 Quote Link to comment Share on other sites More sharing options...
bw5013 Posted July 24, 2010 Author Share Posted July 24, 2010 Here's the attached file illustrating the difference between the two shaders in the same set up. Quote Link to comment Share on other sites More sharing options...
LEO-oo- Posted July 25, 2010 Share Posted July 25, 2010 bw5013 - I replaced the material in the OBJ-level (material tab for the head-obj) with a constant color. The result - it renders the two groups, but still no textures Quote Link to comment Share on other sites More sharing options...
petz Posted July 25, 2010 Share Posted July 25, 2010 i don´t know if this helps but attached is an example file. petz uv_map.rar Quote Link to comment Share on other sites More sharing options...
bw5013 Posted July 25, 2010 Author Share Posted July 25, 2010 i don´t know if this helps but attached is an example file. petz This example works on the constant material. On a basic surface shop the colors are inverted. I'm going to try this on a custom material and see how it plays out. Thanks for the help Petz Quote Link to comment Share on other sites More sharing options...
petz Posted July 25, 2010 Share Posted July 25, 2010 (edited) This example works on the constant material. On a basic surface shop the colors are inverted. I'm going to try this on a custom material and see how it plays out. Thanks for the help Petz what do you mean by "inverted"? it should work in the same way with any material since the uvs are modified in sop-context and have no relation to the shaders color. petz Edited July 25, 2010 by petz Quote Link to comment Share on other sites More sharing options...
bw5013 Posted July 25, 2010 Author Share Posted July 25, 2010 what do you mean by "inverted"? it should work in the same way with any material since the uvs are modified in sop-context and have no relation to the shaders color. petz The first is the basic surface. The second is with the constant shader. I've included the hip. uv_map_works-2.hip Quote Link to comment Share on other sites More sharing options...
petz Posted July 25, 2010 Share Posted July 25, 2010 The first is the basic surface. The second is with the constant shader. I've included the hip. everything works like expected but you have to change some settings: - when using just an ambient light you need to adjust the ambient intensity of the basic material. usually its set so zero so the render comes our black - you don´t need groups in this example since you can override the map inside the material-sop before the ifd is send to mantra but you can´t see the correct mappings in the viewport - since the texture-node inside the basic-material is dealing with RGBA the numbers of the map are transparent by reasons of alpha and opacity multiplication. hth. petz uv_map_works-3.hip Quote Link to comment Share on other sites More sharing options...
bw5013 Posted July 28, 2010 Author Share Posted July 28, 2010 (edited) everything works like expected but you have to change some settings: - when using just an ambient light you need to adjust the ambient intensity of the basic material. usually its set so zero so the render comes our black - you don´t need groups in this example since you can override the map inside the material-sop before the ifd is send to mantra but you can´t see the correct mappings in the viewport - since the texture-node inside the basic-material is dealing with RGBA the numbers of the map are transparent by reasons of alpha and opacity multiplication. hth. petz Thanks petz. This works great on the ball example. Going back to the blacksmith asset it's having a issue. It looks like the uv's are present. The textures outside of 0-1 are no longer showing in the render now though. Sorry for being such a noob. lol. *edit* something is telling me that expression in the add texture in the foreach node is the ticket i'm looking for. I'll play with it some more. uv_test_7.rar Edited July 29, 2010 by bw5013 Quote Link to comment Share on other sites More sharing options...
petz Posted July 28, 2010 Share Posted July 28, 2010 Thanks petz. This works great on the ball example. Going back to the blacksmith asset it's having a issue. It looks like the uv's are present. The textures outside of 0-1 are no longer showing in the render now though. Sorry for being such a noob. lol. there are some issues in your example how you are using the previous setup. i have uploded a slightly modified and annotated file that should do the trick. hth. petz uv_map.rar Quote Link to comment Share on other sites More sharing options...
bw5013 Posted July 29, 2010 Author Share Posted July 29, 2010 there are some issues in your example how you are using the previous setup. i have uploded a slightly modified and annotated file that should do the trick. hth. petz Thanks you much. I've learned so much from these examples you have provided. There is just one thing left for me to wonder about. I'd like to do this with one material. So in the groups name I have "uv_group_*" to select all groups. In a overide to basecolormap would a expression be able to tell the texture maps which uv_group to map to? For instance: if the texture file is color.1001.tif I'd want the U collumn to be whatever the 3rd digit is (in this case 0" and the V row to be whatever the 4th digit is minus one. (in this case it is 1. so 1 minus 1 = 0. This would be useful for auto assigning up to 99 textures. assuming it's even possible. I'll keep at it. Thanks again for all the help thus far. Quote Link to comment Share on other sites More sharing options...
petz Posted July 30, 2010 Share Posted July 30, 2010 I'd like to do this with one material. So in the groups name I have "uv_group_*" to select all groups. if you don´t fill in any group than automatically all groups are used For instance: if the texture file is color.1001.tif I'd want the U collumn to be whatever the 3rd digit is (in this case 0" and the V row to be whatever the 4th digit is minus one. (in this case it is 1. so 1 minus 1 = 0. This would be useful for auto assigning up to 99 textures. assuming it's even possible. I'll keep at it. Thanks again for all the help thus far. in the example file you can use the "uv_pos" attribute to override the map. therefore color.10'$UV_POS1''$UV_POS2-1'.tif is what you want. Quote Link to comment Share on other sites More sharing options...
bw5013 Posted July 30, 2010 Author Share Posted July 30, 2010 (edited) if you don´t fill in any group than automatically all groups are used in the example file you can use the "uv_pos" attribute to override the map. therefore color.10'$UV_POS1''$UV_POS2-1'.tif is what you want. That's what I thought too. I used that exact string at a point last night. It returns a constant color in my case instead of a desired image. It was jarring to say the least when it didn't work. Here's a pic of the string I'm using now. It does the exact same thing with a constant color unfortunately. uv_map_test_9.hip Edited July 30, 2010 by bw5013 Quote Link to comment Share on other sites More sharing options...
petz Posted July 30, 2010 Share Posted July 30, 2010 (edited) make sure to use the right quotation marks. looking at your screenshot it seems that you are using the wrong ones. to see if and how the parameters were overridden by the material_sop use the details view or hold RMB over the node and have a look at the spreadsheed window. you´ll find an primitive attribute called material_override that shows the new string which is going to be used by mantra. btw. in the screenshot you haven´t checked "override use local variables" EDIT: there is one more thing to take care of. since uv_pos is starting at 0 you can´t allways subtract 1 in the filename override. Edited July 30, 2010 by petz Quote Link to comment Share on other sites More sharing options...
bw5013 Posted July 30, 2010 Author Share Posted July 30, 2010 (edited) EDIT: there is one more thing to take care of. since uv_pos is starting at 0 you can´t allways subtract 1 in the filename override. an IF expression could take care of that i'm assuming? I want 0 to always equal 9 instead of -1 Edited July 31, 2010 by bw5013 Quote Link to comment Share on other sites More sharing options...
Alanw Posted August 10, 2010 Share Posted August 10, 2010 an IF expression could take care of that i'm assuming? I want 0 to always equal 9 instead of -1 You are probably long past this, but incase it helps anyone. Note the use of `ifs` instead of `if` `ifs($UV_POS1 > 9, $UV_POS1+1, padzero(2, $UV_POS1+1))` Quote Link to comment Share on other sites More sharing options...
bw5013 Posted August 10, 2010 Author Share Posted August 10, 2010 You are probably long past this, but incase it helps anyone. Note the use of `ifs` instead of `if` `ifs($UV_POS1 > 9, $UV_POS1+1, padzero(2, $UV_POS1+1))` $HIP/blacksmith_color.10`$UV_POS1``ifs($UV_POS2== -1 , $UV_POS2==9, $UV_POS2 - 1)`.tif this is what i ended up with. I was pretty sure this was correct but obviously it isn't. lol. this snippet is saying if uvpos2 = -1 then uvpos2 = 9, otherwise uvpos2 minus 1 right? or am i missing something. *thanks for the patience everyone * Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.