whats the best way to UV texture map an L-System?

   19138   9   2
User Avatar
Member
63 posts
Joined: Sept. 2009
Offline
Hi,
I'm trying to UV texture map an L-system tree I've created in Houdini so that I can export it as an obj and paint it in mudbox. I've tried “add tube texture coordinates” within the L-System's node but that didn't seem to do the trick. From my understanding (or lack of…), the uv projection uv maps the one side of the tree that I'm facing in the viewer… is that correct? UV unwrap seems to be somewhat stretched out when I paint in mudbox. Thanks for your help

Nick
User Avatar
Member
63 posts
Joined: Sept. 2009
Offline
to rephrase my question… what is the best way to create a uv texture map on a l-system so that the texture map wraps the l-system in a seamless manner? Does someone have an example of a seamlessly and uniformly uv mapped l-system? Am I making any sense? thanks for your help!

Nick
User Avatar
Member
2199 posts
Joined: July 2005
Offline
The “add tube texture coordinates” will apply row and column uv's to each tube, if you look at you lsystem in the uv viewport (5) you will see that the whole thing is flatten out into a grid. The vertical increment defines how each tube is offset in v space so you need to set that value correctly to get the whole thing to fit in 0-1 space.
The trick is finding just the right hammer for every screw
User Avatar
Member
63 posts
Joined: Sept. 2009
Offline
Simon
The vertical increment defines how each tube is offset in v space so you need to set that value correctly to get the whole thing to fit in 0-1 space.

Hi Simon,
How do I calculate what value to give the “vertical increments”?

I did some experiments and for some reason when I import my obj into mudbox, the brush doesn't allow me to paint on certain columns. Other then that it seems to be working. Could this just be the fault of translating my obj into mudbox or is it a matter of not having the correct “vertical increments” value?
Thanks so much for your help!
Nick
User Avatar
Member
2199 posts
Joined: July 2005
Offline
It could be that if the values is not set right the uv's that fall outside of 0-1 won't be paintable.

2 ways to try and fix this

1. Set the value to 1 divided by the number of primitives in your lsystem.
2. Set it manually by looking at the uv's in the uv viewport and making sure they fit inside 1 of the grid squares.
The trick is finding just the right hammer for every screw
User Avatar
Member
63 posts
Joined: Sept. 2009
Offline
Simon
1. Set the value to 1 divided by the number of primitives in your lsystem.
2. Set it manually by looking at the uv's in the uv viewport and making sure they fit inside 1 of the grid squares.

Simon,

I tried many experiments with both of your suggestions and there definitely appears to be improvement. Especially with your 2nd suggestion. Now when I paint the tree using “projection” in mudbox with a texture image it doesn't skip certain columns anymore but the problem I'm now facing is that on many areas of the tree, the projection smears in a comb like manner on the more complex curves (possibly on the l-system's “generations”). I've uploaded the Houdini file to this post. If you have a moment to take a look at it I'd be very grateful.

It's possible mudbox could be fouling this up as well. What do you think? I'm using their trial version. I'm very interested in z-brush but they don't currently have a trial for mac. What do you use to paint and/or project textures on your models? I'd also like to ask you, what do most modeler's use to create complex/organic trees? I'm new to all of this and am fascinated by Houdini's L-system but maybe it's not possible to do this type of modelinig/texturing with it yet.
Thanks!!!

Nick

Attachments:
tree_for_UV.hipnc (47.1 KB)

User Avatar
Member
63 posts
Joined: Sept. 2009
Offline
When I add a complex material such as “wood” it seems to cover the tree uniformly within Houdini but when I try to add a color map, it gets smeared. Could adding a uv node (such as a uv fuse node) to the L-System's built in UV help out at all?
User Avatar
Member
63 posts
Joined: Sept. 2009
Offline
hi,
does anyone have any ideas on how to correctly UV map this particular l-system or is it not possible?
thanks,
Nick
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
The uv viewport looks just fine for a uv textured l-system tree.

With your Vertical Increment set the way it is, you have stretched the u out so that you only have a single map with no repetitions up the tree.

When I add a complex material such as “wood” it seems to cover the tree uniformly within Houdini but when I try to add a color map, it gets smeared.

I take it this is where you are having issues. First the wood material uses object space P position to place the wood texture and doesn't use your uv's by default.

Given the way the u component is stretched way out, if you try to apply a square texture map to this tree, you will get a tremendous amount of stretching in the map and that is to be expected.

You can increase the Vertical Increment slider in the L-system SOP and get more repeats going up the tree then make a bark map that tiles in both the u and v direction (you should do that anyway to avoid seams running vertically up the tree).

You need to create a rectangular texture map that is narrow and very tall. Again make it repeat at least in the width and preferably in the height.

Having repeating texture maps that are narrow and tall are called for when texturing trees.
There's at least one school like the old school!
User Avatar
Member
63 posts
Joined: Sept. 2009
Offline
Jeff,

I can't thank you enough for helping me with this. I was struggling with this for days. Your solution worked perfectly and I'm surprised how easy of a fix it was. I raised the Vertical Increment slider all the way up to 10 and added a “uv texture” node set to cylinders on the y axis and then was able to successfully add my color map.

By the way, would you have any suggestions for adding roots to the bottom of my L-System? I tried creating an upside down short trunk L-system underneath the one I have and it seams to look pretty cool but I have to figure out how to experiment with uv mapping the two together. Is this a good way to do it or do you have any other suggestions?

Thanks again for your help!!!!!!!!!
Nick
  • Quick Links