itriix Posted August 20, 2009 Share Posted August 20, 2009 (edited) Hello everyone... Has anyone played around with getting a 3d multi texture projection working? Example: A 3D model of a building. I would like to say project some brick texture onto the building. However, I would like it to be seemless at the edges, all the way around the building, as it should for this example. In renderman, we used a custom 3d multi texture node that would project the texture from each axis and then correctly fade between the projections when needed based on the angles of the geometry. I'm not very sure how in houdini to do something like this. thanks! Jonathan Edited August 20, 2009 by itriix Quote Link to comment Share on other sites More sharing options...
sam.h Posted August 21, 2009 Share Posted August 21, 2009 Hello everyone... Has anyone played around with getting a 3d multi texture projection working? Example: A 3D model of a building. I would like to say project some brick texture onto the building. However, I would like it to be seemless at the edges, all the way around the building, as it should for this example. In renderman, we used a custom 3d multi texture node that would project the texture from each axis and then correctly fade between the projections when needed based on the angles of the geometry. I'm not very sure how in houdini to do something like this. thanks! Jonathan multiple UV sets, one from each angle in SOPs. make a vector attribute which is the projected direction in SOPs. (or a parameter on the shader) in the shader look up each texture for each uv set. mix between them with the dot product of the normal and projection direction. Never done it before, but that might work? Quote Link to comment Share on other sites More sharing options...
eetu Posted August 24, 2009 Share Posted August 24, 2009 Hiya, my perpetually work-in-progress ubermaterial has a "triplanar/implicit cube map" mapping option, which does pretty much what you describe, but does not do the blending. In fact, that's a nice idea, I think I'll steal it sam.h: a SOP solution is not as good in a general case, doing it "per-pixel" in the shader works better (but of course uses a few more cycles..) eetu. Quote Link to comment Share on other sites More sharing options...
mrice Posted August 24, 2009 Share Posted August 24, 2009 that's a nice idea, I think I'll steal it Not if I can steal from you first! This is lifted from eetu's shader, with the blend idea from Niel Blevins' blendedBoxMap script for 3dsmax. You could change it to use multiple textures and add some control for the projection axes. blended_boxmap.hipnc Quote Link to comment Share on other sites More sharing options...
itriix Posted August 27, 2009 Author Share Posted August 27, 2009 (edited) hello everyone, thanks for all of your help! sam.h, thank you so much for your suggestion. i'd have to agree with eetu however that this should be done in the shader eetu, awesome! i can't wait until you implement it into your ubershader mrice, thanks so much for the example. i'll give it a look tomorrow when i wake up thanks one more time, Jonathan Edited August 27, 2009 by itriix Quote Link to comment Share on other sites More sharing options...
itriix Posted October 6, 2009 Author Share Posted October 6, 2009 was just curious if you have had time to implement this into you're ubershader yet Eetu? Jonathan Quote Link to comment Share on other sites More sharing options...
itriix Posted October 14, 2009 Author Share Posted October 14, 2009 (edited) Hi everyone, i've been revamping the "blended_boxmap* hip file from mrice... There were a few things that seemed to need some fixing It was missing a "y_dir" dotproduct... section in the network, which would then be mixed in with another colormix node. another thing... right out of the box, if I applied it to a cube... with a brick texture. the bricks on the x and z plane were not the same... instead the x and y plane bricks matched up... if you are doing a wall however, this won't work. and so, the ability for the user to "rotate" the x, y and z, texture, was added also a scale param... to scale the texture up and down *uniformly* lastly i discussed the idea with a friend of mine *who has a lot more experience with this than i*, and he said there were a few things that could be trimmed out... so i did that too. I'm also in the process of finding out if I am doing the "transform matrix" correctly. Then, once this is all working, i'm going to hook it up with displacement Here is a test on a sphere and cube... On the Vop Vex Surface Shop, just change the texture map to a repeating texture *brick* Tweak the Edge blend param, to get a different falloff Rotate the Texture around a particular axis if you need to Scale it also if you need to do that Jonathan **EDIT** The pic of the sphere is in fact the wrong pic, look at the next post for a better one of that 3d_Multi_Tex.hip Edited October 14, 2009 by itriix Quote Link to comment Share on other sites More sharing options...
itriix Posted October 14, 2009 Author Share Posted October 14, 2009 (edited) ehhh, can't wait till the "full editor" is up and working again... noticed I uploaded the wrong sphere.... here is a better one (anyways, this is a good time to point out, that's what happens when you change the edge blending ramp) on the vop vex surface shop node! It also shows, that i think there can be a bit more tweaking to fix it perfectly up.... And, if anyone could look at the hip file and let me know if they see anything wrong in there that would be awesome too Edited October 14, 2009 by itriix Quote Link to comment Share on other sites More sharing options...
itriix Posted October 14, 2009 Author Share Posted October 14, 2009 Okay, so i've completely fixed this thing up... i'll post a new hip file, and the otls soon... A LOT has been changed! Mixing works great now *imho* here are some test pics Quote Link to comment Share on other sites More sharing options...
Ponge Posted April 27, 2010 Share Posted April 27, 2010 Hey Itriix, that looks awesome! Did you ever manage to create an otl or hip file of the most recent version? It looks incredibly useful. Cheers, Gary 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.