PDA

View Full Version : Renderman Bark Shader


visartz
12-16-2008, 11:47 AM
Hi,
i'm hardly trying to write a nice tree bark shader in renderman.
At the point, the shader looks ok at the main trunk, but the problem is the shader on the limb of the tree.
First the shader doesn't wrap correctly on the change of the main trunk and the limbs. The other problem is, that the shader's displacement intensity value should be a little bit lower, depending on the thickness of the limb.
For example on the root of a trunk the displacement intensity value should be 1 (maximum displacement). On the top of the trunk, where the thickness is nearly 0, the displacement value should also be nearly 0.

I made a pic of the problem, so you can better see, what I mean.

http://e.imagehost.org/0099/bark.jpg

Where is the trick to reach a shader like the one from "Open Season"?
Could you help me?

Thanks
Chris

soulburn3d
12-16-2008, 03:33 PM
I don't know how Open Season did their tree bark, but it's quite possible it just got painted on, instead of using a procedural shader. Trees are notoriously difficult no matter how you choose to do them, especially when branches head out at non-right angles, having a procedural follow the flow of the tree is especially difficult. Anyways, I guess I wasn't much help, but good luck with your project, maybe someone here can be more helpful in finding a good way to write this procedurally.

- Neil

lordofuo
12-21-2008, 06:15 AM
oh yeah dude, i totally agree with soulburn, painting would be tons easier. i cant imagine the frustration of trying to actually write this in a RM renderer.... :banghead:

playmesumch00ns
12-21-2008, 02:05 PM
As has already been said, this sort of thing is a bastard to do programatically.

As for changing the strength of the displacement based on the thickness of the limb, again you really need to do some painting, either texture maps or per-vertex values, to define a 'thickness' value that you can use in the shader to define the modify the displacement strength.

visartz
12-24-2008, 08:08 PM
okay guys i'll try it over the holidays to paint a texture for my tree...and after that i'll show u the result ;)

el diablo
12-27-2008, 11:47 PM
As has already been said, this sort of thing is a bastard to do programatically.

As for changing the strength of the displacement based on the thickness of the limb, again you really need to do some painting, either texture maps or per-vertex values, to define a 'thickness' value that you can use in the shader to define the modify the displacement strength.

Open Season used nurbs for the trees. One for the trunk, one for the branch and another called the weld. The weld was a fillet between the branch and trunk. I don't believe we had varying displacement distances but piping the arc length of the surfaces U or V as a displacement multiplier seems doable. The welds UV coords were in 2 spaces. The first space is that of the trunk and the other was in the branches space. I believe the shader let you dial in the blend location 0.25, 0.5, 0.75 etc. Also the surface had attributes fed to them that had the start and end U an V range. This let you use one map for everything and the shader adjusted per shape by the shapes attributes. BTW the image posted above from what I remeber had a matte painting projection onto the beauty pass....

CGTalk Moderation
12-27-2008, 11:47 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.