Found 183 posts.
Search results Show results as topic list.
Technical Discussion » duplicatePointSource() and generating new geometry [SOLVED]
- NFX
- 183 posts
- Offline
So you're saying that it allows you to read input geometry without forcing it to recook? Does that mean you don't need to lock the inputs?
Technical Discussion » HDK - Increment similar parameter names
- NFX
- 183 posts
- Offline
Hmm. I think I may have a vague idea of how your suggestion works. I'll have to take a look at those example files you suggested. Thanks for the tip guys!
Technical Discussion » HDK - Increment similar parameter names
- NFX
- 183 posts
- Offline
So after some fiddling I have come to the conclusion that this might not be possible since PRM_Name() is required to be static and only accepts static char strings. Guess I will have to just type it all out.
Technical Discussion » duplicatePointSource() and generating new geometry [SOLVED]
- NFX
- 183 posts
- Offline
The node is for building the base skeleton of tree branches given parent branches as input, so as you can imagine, it's pretty common to end up working with close to a million points. Unfortunately since the geometry generated is open primitives and since it needs to have several point attributes (like pscale, material paths, and such) I don't think using either polygon soups or packed geometry can be used to speed up the process.
So it seems to me that the best way to optimize it would be to avoid recooking all the child branches every time their parent branches are tweaked, unless specific attributes change. That's my guess anyway, as I said I am still rather new to this so any pointers here would be great.
Thanks for the tip about stashing! I will definitely look into how to use it.
I did figure out how to reference geometry from my node's input without copying it into my gdp. Sorry about the vagueness there.
I kind of figured that bumping was for updating changed attributes. What do you mean by managing data IDs? Is this something that is not needed when you are just creating new geometry?
So it seems to me that the best way to optimize it would be to avoid recooking all the child branches every time their parent branches are tweaked, unless specific attributes change. That's my guess anyway, as I said I am still rather new to this so any pointers here would be great.
Thanks for the tip about stashing! I will definitely look into how to use it.
I did figure out how to reference geometry from my node's input without copying it into my gdp. Sorry about the vagueness there.
I kind of figured that bumping was for updating changed attributes. What do you mean by managing data IDs? Is this something that is not needed when you are just creating new geometry?
Technical Discussion » HDK - Increment similar parameter names
- NFX
- 183 posts
- Offline
So I am writing a node which has quite a few parameters, several of which share similar custom token names. Rather than having to define a unique PRM_Name for each one, I was wondering if there was a way I could create one and increment it's suffix number for each instance of the parameter?
I noticed that the PRM_Name class has a instance() and instanceToken() methods as well as a setToken() method, but I can't seem to figure out how to properly use them. Any tips on how to do this?
I noticed that the PRM_Name class has a instance() and instanceToken() methods as well as a setToken() method, but I can't seem to figure out how to properly use them. Any tips on how to do this?
Technical Discussion » duplicatePointSource() and generating new geometry [SOLVED]
- NFX
- 183 posts
- Offline
Never mind, I've figured it out and it is working like a charm. Thanks for all your help!
Technical Discussion » duplicatePointSource() and generating new geometry [SOLVED]
- NFX
- 183 posts
- Offline
Thanks for the excellent reply ndickson! So if I understand correctly all I need to do is to lock the input and then just read the data from the points? Interesting.
As for keeping geometry instead of recooking every time, unfortunately that seems like something I will eventually have to do in order to optimize the node since it will be used to create large amounts of geometry. For now I will just program it so it recooks every time. Thanks for the note about the SOP_CopRaster though, I'll have to check it out.
For now my only question is, how do I read the input point's attributes without copying them into my node's gdp? Also, what does it mean to ‘bump’ stuff, like “->bumpDataId()”?
As for keeping geometry instead of recooking every time, unfortunately that seems like something I will eventually have to do in order to optimize the node since it will be used to create large amounts of geometry. For now I will just program it so it recooks every time. Thanks for the note about the SOP_CopRaster though, I'll have to check it out.
For now my only question is, how do I read the input point's attributes without copying them into my node's gdp? Also, what does it mean to ‘bump’ stuff, like “->bumpDataId()”?
Technical Discussion » duplicatePointSource() and generating new geometry [SOLVED]
- NFX
- 183 posts
- Offline
So I am currently trying to teach myself HDK so sorry for my noobishness in advance. I am writing a node that takes input points and reads attributes from them to generate an entirely new piece of geometry. At the end of the cook process all input geometry is discarded rather than passed on. My question is if I should be using duplicatePointSource() in this sort of scenario?
Edited by - Feb. 5, 2015 10:46:11
Technical Discussion » How to implement Operation Controls Toolbar in shelf tool
- NFX
- 183 posts
- Offline
Technical Discussion » How to implement Operation Controls Toolbar in shelf tool
- NFX
- 183 posts
- Offline
Thanks for the reply edward. So I have seen that you can put HDA parameters onto the toolbox, unfortunately my tool just runs some code to make bones from multiple curves, so it doesn't have a physical HDA I can attach parameters to.
However Houdini's built in ‘bones from curve’ tool seems to do just fine without an HDA node and somehow keeps the tool active until you change from the tool cursor. I tried hunting down the tool's code and so far haven't found anything useful.
However Houdini's built in ‘bones from curve’ tool seems to do just fine without an HDA node and somehow keeps the tool active until you change from the tool cursor. I tried hunting down the tool's code and so far haven't found anything useful.
Technical Discussion » How to implement Operation Controls Toolbar in shelf tool
- NFX
- 183 posts
- Offline
Technical Discussion » How to implement Operation Controls Toolbar in shelf tool
- NFX
- 183 posts
- Offline
So I am building a custom shelf tool and would really like to have some controls pop up in the little tool bar at the top of the scene view much like the ‘bones from curve’ tool does, but after a lot of searching I haven't found anything about how to do this. Anyone know how to or can point me in the right direction?
Thanks!
Thanks!
Technical Discussion » Measure Nurb Curve Length in Python [SOLVED]
- NFX
- 183 posts
- Offline
I have it figured out now. Turns out you need to use hou.hscriptExpression() with arclen() and can use string formatting to pass in python variables. Here is the test code that worked for me.
Thanks for your help guys!
nodePath = “/obj/geo1/line1”
primNum = 0
myExpression = ‘arclen(“{0}”,{1},0,1)’.format(nodePath,primNum)
print hou.hscriptExpression(myExpression)
Thanks for your help guys!
Technical Discussion » Measure Nurb Curve Length in Python [SOLVED]
- NFX
- 183 posts
- Offline
Excellent. I was originally considering having the shelf tool I'm making throw down a temporary measure sop before evaluating the curves, but that seemed a little hacky to me. hou.hscript seems like the solution.
One last question though, how do you pass in python variables to the hscript?
One last question though, how do you pass in python variables to the hscript?
Technical Discussion » Measure Nurb Curve Length in Python [SOLVED]
- NFX
- 183 posts
- Offline
I like the hscript idea. Is there a way to run a block of hscript in a python function?
Technical Discussion » how to create boneCapture attribute via python
- NFX
- 183 posts
- Offline
Technical Discussion » how to create boneCapture attribute via python
- NFX
- 183 posts
- Offline
Hi GrayOlorin, I am struggling with this same issue and was wondering if you've figured out this problem?
Technical Discussion » Measure Nurb Curve Length in Python [SOLVED]
- NFX
- 183 posts
- Offline
So I feel like I am probably overlooking something, but for the longest time I have been trying to find a way to calculate the length of a NURBs curve using python. Any ideas?
Edited by - Jan. 6, 2015 12:11:12
Technical Discussion » Ptex error with imported geometry
- NFX
- 183 posts
- Offline
pezetko is correct. Here is an updated version of my ptex in Houdini tutorial. It now uses the texture node. Also remember that ptex does not work well with non-quad geometry, so if you have issues make sure to check your mesh.
Technical Discussion » Trouble geo lighting instanced pyro
- NFX
- 183 posts
- Offline
Hi. So I have a looping flame sequence which I have cached out and am instancing to points which play back the loop starting at a random point in time. I would like to use a geo light to emit from the instanced flames, but when I render, while the pyro shader and instancing seem to be working fine, I don't get any light being emitted from the fire onto nearby objects. I set up the geo light using the volume light shortcut and selected my instance points as the reference.
Any ideas as to what I may be doing wrong?
Any ideas as to what I may be doing wrong?
-
- Quick Links