Jump to content

xTools - xStudio Light Rig for Houdini


Recommended Posts

Hi all,

I'm trying to put the finishing touches on xStudio a studio lighting rig for Houdini. So I've run into a few issues that I'm trying to figure out, and I'll post additional questions to this thread as they I run into them.

If anyone can help me with the follow, that would be great and xStudio is going to be free (as motivation to get some community help). :)

First Question:

Including shelf tools with digital assets. I know this has been discussed before as not automate, but was this resolved in Houdini12? Can we now package shelf tools inside assets somehow?

Second Question:

I'm referencing two commercial studio lighting rigs as an example of what a rig should be able to do. Greyscalegorilla's Light Kit Pro for Cinema4D and A & G Tool's Studio Light Rig for 3ds Max. Both products look very good if you use those 3D packages be sure to try out their demos or buy them. Having started this project I've learned how much work was involved to create them.

So my problem is related to this promotional image from one of those products (credit to those guys that made it).

3013ryw.jpg

Now, when you see the light source. They are not blown out solid white, but that's what happens when I render a light source in Mentra with an image source.

Here's a sample image from xStudio Light.

nug7l.jpg

So if you look at that image. There are two image viewer windows. The smaller one is the source gradient used as the light source, and the larger one is a rendered sample. The light source is blown out white, but the gradient is still there. If I turn down the brightness/contract of the image to something like 0.001 then the gradient shows up. Problem is that the rest of the image turns black.

How come the other 3D packages render their light sources nicely but Mantra blows a light panel out to solid white?

Link to comment
Share on other sites

I want to allow people to create multiple layers of masks for the texture used as the light source. For example, there could be a hexagon pattern, plus a paper pattern and then an umbrella pattern.

Right now, I just have one set of parameters for the mask (that's I'm calling Gobo Options). If I change them to a paramlist folder, then I have the problem having to create new comp nodes to create the light mask. That I assume has to be done via Python, but will I have to unlock the comp node inside the asset to add new nodes? I assume so.

Has anyone done something like this before? What's the Python code to listen to paramlist changes, and how do I link all the params to the new nodes in the comp?

Link to comment
Share on other sites

You can easily embed multiple shelf tool definitions inside a digital asset, however there is no way to have them show up on a shelf automatically. You could create an OnLoaded event handler that could add the tools to an existing shelf tab, create a new one, etc.

Link to comment
Share on other sites

You can easily embed multiple shelf tool definitions inside a digital asset, however there is no way to have them show up on a shelf automatically. You could create an onloaded event handler that could add the tools to an existing shelf tab, create a new one, etc.

Thanks, I guess I just use the op:// path to the extra files of an asset to install the shelf tool from.

I'm going to have an "About" tab on all the assets, so maybe I'll just add a button called "Install Shelf Tools" that will create the shelf if it doesn't already exist (or update it). More work for me to finish before Aug 1, so much fun!

Link to comment
Share on other sites

You don't even need to do that. On the Tools tab of the Type Properties window, you can just simple create new tools. These new tools will be saved in the asset definition and Houdini will automatically load them when the asset is loaded. All you would have to do is to find them in the list of tools (hou.shelves.tools()) and add them to shelves.

Edited by graham
Link to comment
Share on other sites

Can someone advise me on how to store images in the asset for the studio light.

For example; I have a HDR image of an umbrella light (downloaded from here) that I want to store in the asset. I resized the image to 1024x1024 and saved the HDR (1.69megs) then loaded it into Houdini and resaved it as a RAT image (6.27megs). As you can see the RAT file is significantly larger. I've read that for performance reasons you should always use RAT files, but would this larger image file cause issues being embedded in the asset?

Which should file should I use? the HDR or the RAT?

Link to comment
Share on other sites

Just about to call it quits for tonight.

Here's the first sample image. Nothing to impressive as it only has one light. At this stage I can't create more copies of the studio light (some Python code isn't working). So I have to unlock to edit parameters. Anyway tomorrow I'll have it fixed and will do something better.

2evxfo6.jpg

Link to comment
Share on other sites

Ok, I'm stuck again.

The xStudioLight asset has a multiparam block that has the same parameters copied from another asset called xStudioGobo. Each block of parameters is going to represent an instance of a xStudioGobo object inside an editable subnetwork of xStudioLight. So there is a button called "Update Network" that will create xStudioGobo nodes, and then map those parameters to the parameters in the xStudioLight.

So if I have 3 parameter blocks on xStudioLight, then 3 xStudioGobo nodes will be created. Each parameter in xStudioGobo will have an expression assigned to it, something like, ch("../../../../paramname")

Here's the Python code that is called by the button.

#
# Updates the inner network, creating xStudioGobo nodes
#
def updateGobo(node):
 up = '../../../../'
 net = hou.node('comp/gobo_network/do_not_edit')
 count = node.evalParm('goboFolder')
 for x in range(count):
 gobo = net.createNode('xstudiogobo')
 # Reverse map parameters from the xStudioGobo node to
 # parameters in the multiparam list on xStudioLight
 map = gobo.parms()
 for m in map:
 print m.name()
 m.setExpression('ch("'+up+m.name()+str(x+1)+'")')

It works ok for the regular parameters, but there is a Color Ramp parameter on xStudioGobo and it's not working right. While the two default points have expressions set, when I add more points on xStudioLight those points aren't added to xStudioGobo. I think my problem is that I'm not really linking the parameters together, but just simply setting an expression.

Can anyone tell me how to link two parameters together in Python?

Thanks

EDIT: Maybe what I'll do is add a callback to the color ramp on the xStudioLight, and then update the xStudioGobo with the number of color points when they change. That seems to be the only part that's not working.

Edited by hopbin9
Link to comment
Share on other sites

How do you add a node to a subnet and connect the first subnet input to the input of the new node? (in Python)

I tried hou.Node.createNode, hou.Node.createInputNode and hou.Node.createOutputNode but only createNode added the new child inside the subnet.

EDIT: It took some figuring out in the Python Shell, but I got it working.

subnetnode.node("child").setInput(0,subnetnode.indirectInputs()[0])

Edited by hopbin9
Link to comment
Share on other sites

It would be cool to have a setup with reflector cards like this maybe: http://polygonspixel...ost/16524379750

That beer can is awesome. xStudio will include xStudioReflector but I'm not completely sure what it's feature set should be. I have one week left to finish in time for the release date. So I don't know how many samples scenes there will be, but I definitely will add some to the next release.

I've attached a screen grab of a xStudioReflector. Any feature requests or ideas would be great. There are a few options to customize the material, but I think it's missing the option to make the material glow without illuminating the scene.

jzy5vq.jpg

Link to comment
Share on other sites

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...