Search the Community
Showing results for tags 'packed geometry'.
-
Hi, I'm pretty new to Houdini and I have to export some assets with vertex color, and later import them in Unreal Engine 5. The assets are made of packed instances, and there is color assigned to them through the Attribute from Map node. I would like to get the color information in UE (I created a material that takes vertex color as base color), but it only works with unpacked geometry. My question is if it's actually possible to export packed geometry with vertex color. Thank you in advance for any reply!
- 1 reply
-
- vertex color
- packed geometry
-
(and 1 more)
Tagged with:
-
Hello ! I'm trying to get an animation transfer from packed geometry to bone to work. It works when transferring the animation to a geometry (there is no visible problem in the viewport), but in the Animation Editor, the keys are not very clean. See below Here is the nice and tidy one, the source : Here is the result from the script, the baked one : As I said, in the viewport it works, but these keys are not very clean. Why do they look like that ? How to make them cleaner ? (See script and scene below) BUT ! What I really want is to bake the animation on a bone, not on a box. The previous problem still apply to this situation. The position works, but the rotation just fails miserably (with the same code !). The very same rotation is applied to the bone as the previous one that was applied to the test box, but the result in the viewport is not the same at all. The red is the source and the blue is the skinned box (to the visible bone). Why is that ? What am I missing ? Here's the code : node = hou.pwd() obj = hou.node("/obj") def extractEulerRotates(self, rotate_order="xyz"): # Thanks to the Houdini help page for that. But there is a problem here though return hou.Matrix4(self.extractRotationMatrix3()).explode(rotate_order=rotate_order)["rotate"] # The extracted rotation from this function is incorrect. def bakePackedAnim(): # Saving out some time-related variables intialFrame = hou.intFrame() startFrame = int(hou.hscriptExpression("$RFSTART")) # Don't know how to do it in Python endFrame = int(hou.hscriptExpression("$RFEND")) # Don't know how to do it in Python hou.setFrame(startFrame) # ''' # Initial setup : Creates a bone and a box, and then skins the box to the bone with a Capture Proximity. theBone = obj.createNode("bone", "tranformed_bone") # Create only one bone. Would put it in a loop to create multiple. # theBone.moveToGoodPosition() # Easier to work without it. Will uncomment in the end # TO REMOVE... But weirdly with -not a bone- it's working. Hmmm. testGeo = obj.createNode("geo", "test_geo") fileNode = testGeo.allSubChildren()[0] testTransform = testGeo.createNode("xform") testTransform.setFirstInput(fileNode) testTransform.moveToGoodPosition() testTransform.setDisplayFlag(True) testTransform.setRenderFlag(True) # Remove up to here skinnedGeo = obj.createNode("geo", "skinned_geo") # skinnedGeo.moveToGoodPosition() # Easier to work without it. Will uncomment in the end skinnedGeo.deleteItems(skinnedGeo.allSubChildren()) # Removes the file node boxNode = skinnedGeo.createNode("box") captureProximNode = skinnedGeo.createNode("captureproximity") captureProximNode.setFirstInput(boxNode) captureProximNode.moveToGoodPosition() captureProximNode.parm("rootpath").set(str(theBone.path())) deformNode = skinnedGeo.createNode("deform") deformNode.setFirstInput(captureProximNode) deformNode.moveToGoodPosition() #deformNode.setDisplayFlag(True) #deformNode.setRenderFlag(True) # Applying some color to the skinned box attribWrangle = skinnedGeo.createNode("attribwrangle", "color") attribWrangle.setFirstInput(deformNode) attribWrangle.parm("snippet").set("@Cd = {0,0,1};") attribWrangle.moveToGoodPosition() attribWrangle.setDisplayFlag(True) attribWrangle.setRenderFlag(True) # ''' # Transfers the animation from the specified geometry to the bone workingNode = hou.node("/obj/animated_box/OUT_script").geometry() # Gets the geometry of my test scenario for i in xrange(startFrame, endFrame+1): # For some reasons, xrange goes from the correct start value to the end value, minus 1. Strange. hou.setFrame(i) theFullTransform = workingNode.prims()[0].fullTransform() thePosition = workingNode.points()[0].attribValue("P") # This code works only for one object. Would do a loop here through all the pack geo. theRotation = extractEulerRotates(theFullTransform) # Got a problem with how this function extracts the rotation # Position key = hou.Keyframe(thePosition[0]) theBone.parm("tx").setKeyframe(key) testTransform.parm("tx").setKeyframe(key) key = hou.Keyframe(thePosition[1]) theBone.parm("ty").setKeyframe(key) testTransform.parm("ty").setKeyframe(key) key = hou.Keyframe(thePosition[2]) theBone.parm("tz").setKeyframe(key) testTransform.parm("tz").setKeyframe(key) # Rotation key = hou.Keyframe(theRotation[0]) theBone.parm("rx").setKeyframe(key) testTransform.parm("rx").setKeyframe(key) key = hou.Keyframe(theRotation[1]) theBone.parm("ry").setKeyframe(key) testTransform.parm("ry").setKeyframe(key) key = hou.Keyframe(theRotation[2]) theBone.parm("rz").setKeyframe(key) testTransform.parm("rz").setKeyframe(key) hou.setFrame(intialFrame) bakePackedAnim() # Would need to create a UI or a button for convenience, calling this out. And the scene : packed_anim_baker.hip Thanks ! EDIT : P.S. If I copy and paste relative reference from the source's rotation to the bone's rotation, the result is the same : obviously wrong rotation.
- 6 replies
-
- packed geometry
- rotation
-
(and 1 more)
Tagged with:
-
After packing geometry, if I use this VEX snippet to edit the pivots I get predictable results: vector pivotOffset = chv("manual_pivot_offset"); vector pivotCentroid = primintrinsic(0, "pivot", @ptnum); vector newPivot = pivotCentroid + pivotOffset; setprimintrinsic(0, "pivot", @ptnum, newPivot); @P += pivotOffset; If I check "transform using point orientations" in the copy to points SOP and pack the copied geometry, the pivot will move according to the custom offset, but the object moves in a different direction. How can I solve this?
- 5 replies
-
- pivot
- packed geometry
-
(and 2 more)
Tagged with:
-
If you're interested, be sure to check out the course right here: http://bit.ly/2tEhWFN L-systems offer a great way of procedurally modeling geometry, and with these skills, you'll be able to create a wide variety of complex objects. If you've ever wanted to create foliage, complex fractal geometry, or spline-based models from scratch, then L-systems offers you a procedural way of doing so. Unlike many other tutorials, this course aims to address the topic in an easy-to-follow, technical, and artistic way. In addition to L-systems, you'll learn more about instancing and how to work efficiently with Houdini. We'll be rendering out millions of polygons with both Mantra and Redshift while aiming to optimize render times as much as possible. These optimizations are applicable across a wide variety of 3D topics. Large scale environment creation, destruction, crowds, and real-time render engines are all examples of other 3D topics which will benefit from this course. Thank you for watching!
-
- 3
-
- redshift instance
- redshift proxy
- (and 10 more)
-
Hello How can I use the Cd parameter from a crowd packed geometry to override the basecolor parameter of a shader. I would like to use a attribute Binding override but accessing the Cd parameter with a script does not work neither. I just manage to access the id parameter. Thanks randomColorOnCrowd.hip
-
Hi, I have an rbd simulation with packed geometry that is practically finished but I would like to tweak the motion of a few "hero" objects. I've tried using the Dynamic CHOP node to extract the keyframes but this doesn't work with packed geometry. So then I tried unpacking the geometry after the simulation and decided to use a Geometry CHOP node instead. This works great but only extracts the translation values and doesn't extract the rotation values which are quite important. Does anyone have ideas how I could extract both translation and rotation values from my packed geometry? Any advice is helpful, Thanks! Sophie
- 4 replies
-
- dynamic chop
- geometry chop
-
(and 1 more)
Tagged with:
-
Hi! I have a RBD question. I have a sculpture covered with a thin plaster layer, and this layer has to fall. I have a sculpture as a concave collider, and the plaster layer as a concave fractured object. The problem is, during the simulation, some plaster pieces interpenetrating the sculpture. In the initial state, the geometries (sculpture and plaster layer) don't overlap, but it seems that some plaster pieces don't respect the collision geometry. I tried to subdivide all and increase substeps until 10 without solution. Any ideas to fix this problem? Thanks in advance! PD: I attach a simplified example. Prova_01.hip
- 6 replies
-
- RBD
- packed geometry
-
(and 4 more)
Tagged with:
-
Hi, Not really sure on how to formulate this question, as I'm new to Houdini, but I will try my best. I'm trying to work out a UV projection on packed geometry that I have animated to fracture. I need to get the primitive faces that are facing the camera into one group for the UV projection, and the "inside" in one to get materials there. I was told by a more experienced Houdini user that it should be possible to scatter (a huge amount of) points on the surface of the geometry and create a surface group from that. I don't know how that could be done however. Do I somehow tell the geometry that the faces scattered with points is one group? Or do I somehow attach those points to the geometry and project the texture on them? If anyone have other suggestions to how I could UV project on packed primitives I'm open to suggestions, as you can see from the attached images, the projection stretches as soon as the geo starts breaking. Kine