Jump to content

3d multi tex projection


itriix

Recommended Posts

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 by itriix
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by itriix
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

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

post-3821-125554797769_thumb.jpg

post-3821-125554798832_thumb.jpg

3d_Multi_Tex.hip

Edited by itriix
Link to comment
Share on other sites

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

post-3821-125554848359_thumb.jpg

Edited by itriix
Link to comment
Share on other sites

  • 6 months 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...