Found 6 posts.
Search results Show results as topic list.
PDG/TOPs » Command line run tops wont work with mantra or ropfetch
-
- PeterHam
- 6 posts
- Offline
PDG/TOPs » Command line run tops wont work with mantra or ropfetch
-
- PeterHam
- 6 posts
- Offline
So my setup work if I dont use mantra node or ropfetch node in tops. I have verified that as you can se in the pictures. What is the correct setup to have mantra and ropfetch work?
Edited by PeterHam - 2022年11月15日 11:27:46
Technical Discussion » Export multiple fbx files unstable
-
- PeterHam
- 6 posts
- Offline
So I solved it by make file->new asset and make it python type and write like

and then use boolean to export selection.

worked like a charm!

script like this

and then use boolean to export selection.

worked like a charm!

script like this
def onButtonPress(): node = hou.pwd() geo = node.geometry() #group Node Box = hou.node('/obj/Dressing/box1') BoxSize = 100 BoxX = -100 BoxZ = 350 #fbx node fbxNode = hou.node('/obj/Dressing/fbx_out2') exportPathBase = hou.parm('/obj/Dressing/exportLevel1/exportPath').eval() Index =1 Level = "Level2" exportButton = hou.parm('/obj/Dressing/fbx_out2/execute') #looping and exporting for x in range(0, 6): for z in range(0, 6): #update group selection Box.setParms({"tx":BoxX+x*BoxSize,"ty":0,"tz":BoxZ-z*BoxSize,}) #update fbx node and export newExportPath = exportPathBase+str(Index)+".fbx" fbxNode.setParms({"sopoutput": newExportPath}) exportButton.pressButton() print newExportPath Index +=1 hou.ui.displayMessage("------------------->Export Finished<-------------------")
Edited by PeterHam - 2018年5月30日 06:41:21
Technical Discussion » Export multiple fbx files unstable
-
- PeterHam
- 6 posts
- Offline
Hi!

Here you can se empty fbx files in Unity. Its supposed to be a complete square!
I have a big mesh I need to slice up and export multiple fbx files instead of one. I have a solution but it is not stable. Often fbx files are empty! This is my solution to export multiple fbx files. I press Animate frames same amount as I have fbx files to export. If you have som light to spread on this matter, then I am very grateful! Example scene is able for download. thanks!
Using Houdini 16.5.439
Here you can se empty fbx files in Unity. Its supposed to be a complete square!
I have a big mesh I need to slice up and export multiple fbx files instead of one. I have a solution but it is not stable. Often fbx files are empty! This is my solution to export multiple fbx files. I press Animate frames same amount as I have fbx files to export. If you have som light to spread on this matter, then I am very grateful! Example scene is able for download. thanks!
Using Houdini 16.5.439

Edited by PeterHam - 2018年5月17日 09:32:44
Houdini Engine for Unity » Smart way to populate Unity GameObjects to Inputs on HoudiniAssetOTL (DigitalAsset)
-
- PeterHam
- 6 posts
- Offline
So I solved it to tag all the collider objects and with this code populate the list “prUpStreamGeoObjects”
static void PlaceColliderToScene()
{
//get all colliders in scene
sceneGameObjects = GameObject.FindGameObjectsWithTag(“Collider”);
curObj = Selection.activeObject as GameObject;
curOTL = curObj.GetComponent<HoudiniAssetOTL>();
for (int i = 0; i < sceneGameObjects.Length; i++)
{
curOTL.prUpStreamGeoObjects = sceneGameObjects;
}
Selection.activeObject = curObj;
}
static void PlaceColliderToScene()
{
//get all colliders in scene
sceneGameObjects = GameObject.FindGameObjectsWithTag(“Collider”);
curObj = Selection.activeObject as GameObject;
curOTL = curObj.GetComponent<HoudiniAssetOTL>();
for (int i = 0; i < sceneGameObjects.Length; i++)
{
curOTL.prUpStreamGeoObjects = sceneGameObjects;
}
Selection.activeObject = curObj;
}
Houdini Engine for Unity » Smart way to populate Unity GameObjects to Inputs on HoudiniAssetOTL (DigitalAsset)
-
- PeterHam
- 6 posts
- Offline
Hi!
(100 is just a random number, it need to be dynamic)
So I got 100 GameObjects in Unity Editor Scene with tag “Collider”. I have made a Digital Asset where there is a merge inside and 100 inputs for all of them.

Instead of drag and drop 100 times that also will happen multiple times I want to populate it with code. I'm almost there I think. It seems like I need to convert my GameObject to HAPI_Transform. I'm stuck.
Does anyone have any idea please? :-D
this is c# code in Unity
(100 is just a random number, it need to be dynamic)
So I got 100 GameObjects in Unity Editor Scene with tag “Collider”. I have made a Digital Asset where there is a merge inside and 100 inputs for all of them.

Instead of drag and drop 100 times that also will happen multiple times I want to populate it with code. I'm almost there I think. It seems like I need to convert my GameObject to HAPI_Transform. I'm stuck.
Does anyone have any idea please? :-D
this is c# code in Unity
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using Houdini; public class CollectTagColliders : EditorWindow { public static CollectTagColliders curColliderWindow; // public static GameObject curDGA_ColliderAsset; public GameObject curColliderParent; public static GameObject[] sceneGameObjects; public static GameObject curObj; public static HoudiniApiAssetAccessor curAccessor = null; public static HoudiniAssetOTL asset; public static HoudiniAssetOTL curOTL; public static HoudiniParms curParms; public static HAPI_ParmInfo[] parmInfos; [MenuItem("Spelprojekt 8/CollectColliders",false,7)] public static void InitWindow () { curColliderWindow = (CollectTagColliders)EditorWindow.GetWindow<CollectTagColliders>(); GUIContent titelcontent = new GUIContent("ColliderTool"); //get all scene GameObjects with tag Collider sceneGameObjects = GameObject.FindGameObjectsWithTag("Collider"); } private void OnGUI() { if (sceneGameObjects.Length == 0) { GUILayout.Label("There is no Collider Tags in scene"); } else { if (GUILayout.Button("Print All Colliders in Debug", GUILayout.Height(40f))) { for (int i = 0; i < sceneGameObjects.Length; i++) { Debug.Log(sceneGameObjects[i].name + " index--> " + i); } } if (GUILayout.Button("Print All DGA params", GUILayout.Height(40f))) { PlaceColliderToScene(); } } } static void PlaceColliderToScene() { string assetPath = Application.dataPath + "Assets/DigitalAssets/B_addon_Collider_Parent.otl"; curObj = new GameObject("B_addon_Collider_Parent"); asset = curObj.AddComponent<HoudiniAssetOTL>(); curAccessor = HoudiniApiAssetAccessor.getAssetAccessor(curObj); asset.prAssetType = HoudiniAsset.AssetType.TYPE_OTL; // asset.prAssetType = HoudiniAsset.AssetType.TYPE_INPUT; asset.prAssetPath = assetPath; asset.buildAll(); curOTL = (HoudiniAssetOTL)asset.GetComponent<HoudiniAssetOTL>(); Debug.Log(curOTL.prObjectTransforms.Length + " geo count!! "); Debug.Log(curOTL.prGeoInputCount + " geo total slot count!! "); curParms = asset.prParms; parmInfos = curParms.prParms; for (int i = 0; i < sceneGameObjects.Length; i++) { curOTL.prObjectTransforms[i] = sceneGameObjects[i]; } Selection.activeObject = curObj; } }
-
- Quick Links