placing lable on a glass bottle?

   5789   8   2
User Avatar
Member
7 posts
Joined: July 2005
Offline
Hi, I'm a student new to Houdini and I'm trying to model a glass bottle with lable for a project. What I want to do is place a lable to my glass surface.

Thanks, Dimon.
User Avatar
Member
330 posts
Joined: July 2005
Offline
Hi Dimon. A wise man helped me with much the same problem recently

In VEX builder make a new surface shader. made a lighting model.

place a Colour Mix VOP. in the primary channel put your glass material.

place a texture VOP, and add your alpha image to it, and assign type to RGBA instead of RGB. then convert that output with vector4 to vector. wire the resulting vector output into the secondary colour of the colour mix VOP, and the resulting float output into the Colour Mix VOP's bias. then finally the colour mix output into the diffuse of the lighting model. this overlays the alpha part of the image onto the glass.

so you are colour mixing the glass and the label, but using the bias value which defines where the label is located.

when you place an image, you need to wire into it the S and T so it is mapped correctly. So, place a shading layer, then vector to float, the first 2 values are S and T respectively which you can wire into the image S and T fields.

it may or not be what you need, but if you wanted to make the glass and label seperate textures, lay down multiple UV Projects in SOPs with a shader and layer SOP in between, and reference them with different shading layer VOPS. e.g.

OBJECT -> UVproject -> shader -> Layer (2) .> UVproject -> shader

then just make 2 seperate shaders, with the shading layer VOP in one assigned to 1 and in the other 2.

hope that helps fire away with any more questions.
User Avatar
Member
7 posts
Joined: July 2005
Offline
Thanks, Mark.
User Avatar
Member
7 posts
Joined: July 2005
Offline
Thanks, Mark.
User Avatar
Member
7 posts
Joined: July 2005
Offline
Thanks, Mark.
User Avatar
Member
1631 posts
Joined: July 2005
Offline
You're very grateful there, Dimon, which is a good thing.
User Avatar
Member
7 posts
Joined: July 2005
Offline
oops, how can I edit shadinglayer UV Coordinates for my image.
When I use UVProject and make changes, my glass change too and bottle black.
User Avatar
Member
330 posts
Joined: July 2005
Offline
hi again you can append a UV Edit SOP to the UV Project SOP, then press SPACE + 5 to see the UV layout, which you can then edit like any geometry.

i dont really have another answer, this is something i need to learn more about myself - for example how to make 1 “sheet” of textures (1 image) for multiple objects. is this required for anything other than games? it would make managing texture maps easier
User Avatar
Member
412 posts
Joined: July 2005
Offline
to do you 1 big sheet, there are a couple of ways to do it (like always in houdini)…

first, do all your uv's locally in each object.

then depending on how those uv's look for each object, do one of the following:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
If each of your object's uv's are connected as one unit and not spread out everywhere:

1. Create a new object and do an object merge of all your other objects. This will merge all of their uv's as well and they will overlap.
2. Throw down a UVUnwrap sop. This will take all of those overlapping uv's and move and scale them down so they all fit nice and good. The reason i asked if each object was a single “unit” of UV's is because if you do this method and throw down a UVUnwrap, they will nicely be put around your layout.. If each object has a bunch of different sections, they will get thrown where ever and you might lose where each thing is after the unwrap.
3. Export your UV as a texture map.. Do your deal in image editor.
4. Put down a shader sop and make a shader that uses your texture.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
If each of your objects has uv's all over or even if you just want complete control over where what object goes on the uv layout do the following:

1. When doing each object's UV's locally, put one object in the 0-1 range square, another object in the 1-2 range square, another in 3-4 and so on and so on.
2. Create a new object and do an object merge of all your other objects. This will merge all of their uv's as well and instead of overlapping eachother all in the 0-1 range, they will each have their own seperate section living happilly.
3. Throw down a UVEdit and scale down each section and place them where ever you wish so that they all fit within the 0-1 range square.
4. Export your UV as a texture map.. Do your deal in image editor.
5. Put down a shader sop and make a shader that uses your texture.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


hth,
dave
Dave Quirus
  • Quick Links