UV Mapping in Houdini?

   47531   16   5
User Avatar
Member
40 posts
Joined: May 2010
Offline
Hello, I've tried out the tutorial about texturing, but it only covers the very most basics and doesn't really help me solve my questions.

Is it really true, that UV Mapping in Houdini is done by choosing a background image for the UV-view (space+5). If it is, how can one texture different objects - will you have to rechoose your background image every time you select a new object? :shock:

Let alone procedural materials - do you have to rebake them to file every time you want to make an adjustment PLUS rechoose them as a background-image for your UV-view.

I kind of can't believe that.
User Avatar
Member
710 posts
Joined: July 2005
Online
No…. that is not true. :shock:
User Avatar
Member
40 posts
Joined: May 2010
Offline
:shock: Glad to hear that! Would you be as kind as telling me how UVs are conveniently mapped?
User Avatar
Member
40 posts
Joined: May 2010
Offline
I'm serious. I'm not lazy. I've found no hint whatsoever on how to do this.
User Avatar
Member
710 posts
Joined: July 2005
Online
When working on UVs I will usually split the viewport in two (ctrl+4), have the UV viewport on one side and perspective in another. Helps to keep better tabs on what the UV layout actually corresponds to on the model. You've got a bunch of SOPs that start with UV*, for example UVPelt, UVProject, UVEdit etc. Select the parts that you want to apply UVs to in the regular viewport and apply one of the UV SOPs.

UVPelt is nice for some stuff, but I just use UVProject for everything now, I find it more straightforward. When you apply one of the UV operations your layout will appear in the UV viewport. Use UVEdit to tweak it. You can use the Layer SOP to create multiple sets of UVs for your model. The AttributeMirror SOP is extremely useful for doing UVs, as it can mirror the uv attributes across your geometry. If there's a lot of tweaking on a symmetrical model that can make your life a lot easier.

In the surface and displacement contexts of VOPs you've got the UVcoords, Shading Layer Parameter, and then plain old Parameter VOP that can be used to import your uvs.

Hope this helps a bit.
User Avatar
Member
40 posts
Joined: May 2010
Offline
Hey Juice, thanks for these tips. Maybe I wasn't too clear on my problem. When you use one of the UV-mapping OPs, how do you anticipate your changes? Do you blindly edit the layout in the UV-pane (5) and check the effects in the viewport? Say in Maya and Max when I map UV I got the UV-mapper window (which is the UV-pane in Houdini, as I understand it) and I see the texture with the grid ontop of it, so I can scuplt my grind in UV-view. How do I do that in Houdini?

Say I have a material which is procedual, no texture involved, how would I UV map that without blindly adjusting the UVs and re-render every other second?
User Avatar
Member
2199 posts
Joined: July 2005
Online
So are you saying you have a procedural texture that is driven by uv coordinates and you want to see the effect of changing the uv's on the procedural texture?

I think the only way to do that would be to texture a grid with the same material having set it's uv's to 0-1 then render that out to an image and apply the image to the final object. You can then use that texture to see your uv adjustments and when you are happy switch back to the fully procedural version.
The trick is finding just the right hammer for every screw
User Avatar
Member
40 posts
Joined: May 2010
Offline
You say that as if it was a the weirdest thing in world to have UV based procedural textures.

Okay, let's confine this to a pure textural problem. I still haven't understood how to properly UV map that without “blindly” guessing.

How can I display different textures in the UV-pane for different objects so I don't have to guess what effect moving a vertex in the UV-pane has on the object? I mean, isn't the whole idea of laying out UVs in an UV editor that you can then have a graphical representation of them?

I've never seen it done any differently! See attached (source, google images). Maybe a user of another package better understands what I'm looking for although it should be kind of obvious.

Attachments:
rodax_uv_800.jpg (100.6 KB)

User Avatar
Member
710 posts
Joined: July 2005
Online
You can display images in the UV viewport background just like any other viewport, but there is no automatic way to have it display a specific image per object or anything. Might be able to do it with an expression though.

For seeing the texture applied to the geo in the regular viewports, the UVQuickshade SOP is handy. For procedural shaders the best way would be to set up an IPR render which will automatically update as you modify the UVs/change settings of the procedural pattern.
User Avatar
Member
2199 posts
Joined: July 2005
Online
I wasn't saying it was weird just that your question was confusing. One minute you seemed to be talking about regular texture mapping the next procedural textures. I can see why it is tricky to visualise procedural textures in the viewports since they have to be calculated on the fly first, hence the need to bake them out.

To display an image in the UV viewport as in your screen grab just open up the display options - shortcut “d” and go to the background tab to set the image and the uv range required.

If you want that to automatically change for each object you select then I think you might have to create a toolshelf script to swap the image dependent on the selected object. As far as I know there is no built in method to do that. However that image you posted doesn't show that it shows only one object but with different parts of that object having different uv coordinates. That's the same thing you would do in houdini using the pelt sop and groups.

Also in the display options under the misc tab make sure display textures is on so that you can see any results of your changes in the 3d view (again as in your screen grab)
The trick is finding just the right hammer for every screw
User Avatar
Member
40 posts
Joined: May 2010
Offline
Well that's clear now and honetly I'm stunned that there is no way to “automatically load a texture into the UV-plane” (sounds more sophisticated than it is). Do people not texture in Houdini? It must be the first 3D program I've seen or ever heard of which does not have a dedicated UV-Editor. I feel like abusing the UV-Editor of Houdini for trying to do casual UV mapping it it. I think it's weird that such a basic , essential and commonly used feature is missing whereas the rest of the program appears to be top-notch. Thanks anyway, I especially appreciate the replies on how to display textures in the viewport. Would prolly have taken me a time to figure that out on my own.
User Avatar
Member
2199 posts
Joined: July 2005
Online
I think you're probably just over stating the need to do it automatically. Really how long does it take to pick the image to display?

If it were to do it automatically how would it know what image you wanted, your material might have many texture slots in it how would houdini choose automatically which one to display?

Sure I can see how that might be a useful feature if one could find a way to make it work but not having it hardly stops you doing texturing in Houdini. If you are in a studio situation and really need it every day then add a script to do it, it's not such a big deal.

I stopped using other packages years ago but at the time none of them did what you are assuming is standard and yet somehow everyone managed to do texturing.

If I were you I would put in an RFE (request for enhancement) using the link under Support at the top of this site. If enough people feel it is a missing feature Sesi will add it in.
The trick is finding just the right hammer for every screw
User Avatar
Member
40 posts
Joined: May 2010
Offline
I'd like to submit a RFE concerning the “UV-Pane” which in Version 10.0 appears to be rather incomplete and limps behind contemporary standards. Please refer to

http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=19261 [sidefx.com]

for how this came about. My suggestion is that every UV related OP, such as UV-Pelt, UV-Edit and so forth receives an additional parameter which can either take a composing-node or an image as value, as the Background property of the UV-pane viewport can.

The parameter assigned to the first of these OPs is then propagated through the network and serves as the default for UV-related OPs to come.

Editing the UV at any point in the network automatically displays the according image as background in the UV-Pane so one can forgo the hassle to reload and possibly realign an image every time the UVs of a different object are touched.

This, admittedly, sets the UV-Pane apart from other panes which, currently, it is handled coherently with, but to my opinion this should have been the case in the first place. A properly implemented UV-Editor is not just a viewport with backplane. I would even say a UV-editor without such functionality is notably slowing down texturing and makes it cumbersome - contrasted with the relatively little effort to make it autoload I think this should be considered.

That said, I would like to, with less priority, suggest that the functionality to display different viewport backgrounds based on context, meaning, of course, context and viewport, is implemented for all viewports. I can rightfully claim that viewport backplanes are a widely neglected feature, in regard to configurability and usability, throughout many major packages, 3dsmax, maya, blender in their latest versions included.

It would be great if SideFX could tackle this very issue or at least keep up with other packages. I think the effort to implement it consistently for all viewports would be worth it - especially for modelling which, so I think, Houdini still has some things to make up at.

I am new to Houdini, so my suggestion for how to implement this most sensefully might not be the best and you might think of a way which complies more with Houdini's workflow.

Thanks for your time.
User Avatar
Member
1390 posts
Joined: July 2005
Offline
I would have never thought this is so important for uv mapping…

Ok, so I tried to solve your problem in some dirty way which came to me first. This is a shelf tool, wrapped in literally 45 minutes, so beware!

Put the attached file into $HOME/houdinix.x/toolbar folder. Start Houdini. RMB on any shelf -> Edit Shelf…. Find “UV Background” name in a long list that will pop up. Select it and hit Accept. Now you should see new tool on a shelf.

To see how it works change your view into uv viewport (space+5) and select an object or sop node (the tool won't work unless there is at least one uv view currently displayed). Click on a shelf. You should see either:

a) a list of all textures applied to the geometry both on the sop level and the object level.
b) any other image referenced by selected object as listed by Houdini's own “opextern” command.
or
c) you will be asked to point to the image if the tool won't find anything in a) or b) stage

Select the image from generated list and you hopefully should see it in the background of UV viewport . All images from a) b) and c) creates a history which is saved on per object basis in Houdini session (thus disappearing when Houdini closes).

Clicking shelf tool with CTRL modifier forces it to load an image from disk (and append this new selection to images' history). Using SHIFT modifier deletes object's history.

Please, note, this is a quick example, the code is ugly may not work and your computer may even explode!

cheers,
skk.

- though it could be easily aliased by some hotkey like F11
- scoped by a filter you can modify inside: RMB->Edit Tool…

Attachments:
setUVBackground.shelf (4.1 KB)

User Avatar
Member
40 posts
Joined: May 2010
Offline
That sounds great - thanks! I'll try it out and give you feedback on thursday
User Avatar
Member
1390 posts
Joined: July 2005
Offline
ManDay
That sounds great - thanks! I'll try it out and give you feedback on thursday

Sure, give it a try!

Ok, so after rethinking it a bit I have another logic. The tool doesn't have to ask you about image every time I suppose. It assumes you want to use the same background for the same object. Thus:
1) Click -> reapply last used image or as in 2) for a first usage
2) Click+Ctrl -> ask you to reselect it first from a list
3) Click+Alt -> ask for a file from disk
4) Click+Shift -> deletes history

cheers,
skk.

Attachments:
setuvbackground_v02.shelf (4.6 KB)

User Avatar
Member
40 posts
Joined: May 2010
Offline
Sorry I don't want to come across impolite or even as your effort wouldn't matter, I currently just learning houdini at other places. I installed your tool and I'm 100% going to use it with texturing and will then provide feedback. Sorry again.
  • Quick Links