After stumbling upon something similar i found another thread that helped me set my conda environment inside houdini.
The thread doesnt have a solution for the problem that user is asking for but if you check the attached images you can see how they setup the environmentedit node and the subsequent Python Script node correctly, you just need to make the file addresses according to your session:
https://www.sidefx.com/forum/topic/86588/ [www.sidefx.com]
In my case i used this to run the H20 ML terrain training example in H19 and it works.
Found 10 posts.
Search results Show results as topic list.
Technical Discussion » How to use a virtual environment's python instead of the one that ships with houdini?
-
- lobachevscki
- 10 posts
- Offline
Houdini Engine API » Different geo inputs to a group of HDA's EU Python
-
- lobachevscki
- 10 posts
- Offline
Hi! hope you are fine.
Im trying to use the Houdini Python API inside Unreal Engine to set up and cook a number of HDA's. The idea is that from a selection of static meshes i assign one of those static meshes to each HDA. This is part of the code that does the work:
===============
def run():
api = unreal.HoudiniPublicAPIBlueprintLib.get_api()
global _g_wrapper
global obj
selected_assets = get_geo_asset_path()
for i in range(len(selected_assets)):
obj = unreal.load_object(None, selected_assets.get_path_name())
_g_wrapper = api.instantiate_asset(get_test_hda(), unreal.Transform())
_g_wrapper.on_post_instantiation_delegate.add_callable(set_inputs)
_g_wrapper = None
===============
The code (which is basically taken from the examples):
Gets selected assets into a list.
Calls the Houdini API.
Instantiate those assets in a for loop based on the list.
Set inputs in post instantiation to those HDA's.
The problem is that because post instantiation occurs as a whole process after instantiation then only the last object in the list of selection is assigned, that is, all the HDA's end up with the same object assigned to them (the last one).
I have tried everything, mostly based on the idea of creating a list of HDA's to try to set up the input in later loop but the result is always the same.
Im a bit stuck here.
Any suggestions?
Thanks!
Im trying to use the Houdini Python API inside Unreal Engine to set up and cook a number of HDA's. The idea is that from a selection of static meshes i assign one of those static meshes to each HDA. This is part of the code that does the work:
===============
def run():
api = unreal.HoudiniPublicAPIBlueprintLib.get_api()
global _g_wrapper
global obj
selected_assets = get_geo_asset_path()
for i in range(len(selected_assets)):
obj = unreal.load_object(None, selected_assets.get_path_name())
_g_wrapper = api.instantiate_asset(get_test_hda(), unreal.Transform())
_g_wrapper.on_post_instantiation_delegate.add_callable(set_inputs)
_g_wrapper = None
===============
The code (which is basically taken from the examples):
Gets selected assets into a list.
Calls the Houdini API.
Instantiate those assets in a for loop based on the list.
Set inputs in post instantiation to those HDA's.
The problem is that because post instantiation occurs as a whole process after instantiation then only the last object in the list of selection is assigned, that is, all the HDA's end up with the same object assigned to them (the last one).
I have tried everything, mostly based on the idea of creating a list of HDA's to try to set up the input in later loop but the result is always the same.
Im a bit stuck here.
Any suggestions?
Thanks!
Edited by lobachevscki - 2022年8月3日 04:48:24
PDG/TOPs » FBX from HDAprocessor saves as ascii instead of binary
-
- lobachevscki
- 10 posts
- Offline
colinsennerlobachevscki
Hi!
I consulted the Everything Procedural Discord...
I couldn't find this discord community, I did find this one though, is this the one you were referring to?
https://twitter.com/thinkprocedural [twitter.com]
Yeah, that one, I actually misnamed it, my bad. That's the one
colinsenner
@lobachevscki, Thanks so much for your replies.
In the future for support, like this, I figured a forum post would be more ideal than contacting via email so it could help future users.
I didn't know about the discord either, so thanks for that reference. I'll try this out later today and see if it works for my pipeline setup.
Best,
Colin
This is true, but as much as the forum is indeed an official channel and it gets checked by the developers and the community, SideFX's direct support is just too good. You will think that an email might be a weird or inconvenient way to offer support, but in the case of SideFX it isnt, they are just way too effective. They really are. See that I got to the same problem as you, I found your post that had two months without answer, wrote SideFX with all the details and an example, they answered the next day. In my case I wrote from the email of the company I work for, but it is the same for me indie license (that is from my personal email).
Also, the Think Procedural Discord is very active so I complemented with it.
That's how I usually solve my problems when Im really lost like it was in this case. The forum is more like an archive to me.
What I would recommend is to do both: publish the problem in the forum and write to support, if you find the solution through support first then share it like I did. I have done that myself before (and of course this time).
Again, this might sound like a weird system to you, but in my case I would go to support and not risk waiting two months for an answer from the community, and go the extra step to share to the community when I found the answer.
And yes, that naming part is what I meant you needed to take care of the attribute name, I wasnt sure of the solution when I wrote because Im working in Houdini 18 and it is not straightforward there, but the solution is exactly the one you published for Houdini 18.5
Edited by lobachevscki - 2021年9月27日 13:26:13
PDG/TOPs » FBX from HDAprocessor saves as ascii instead of binary
-
- lobachevscki
- 10 posts
- Offline
Hi!
I consulted the Think Procedural Discord (Edit on the name of the Discord, I misnamed it originally), that you might want to check out if you dont know about it, it is a good forum for questions and consultation.
Find attached a very barebones example of a workaround for this problem.
Im attaching only the HIP file out of simplicity, but the HDA the TOP network requires is just a simple Cube SOP where you change the scale, nothing else.
This approach shown here can be scaled and adapted to other more complex workflows, which is my case, but in fact if you are just only exporting stuff this might be enough (mind you the attributes name can be a problem).
Without getting into much detail (the HIP is here for that), what you do is to write to a cache using the hdaprocessor or even the very ROP Geometry node (if you instead of using and HDA are directly batch editing from the a geo environment) and then recast that cache with a ropfetch. The ropfetch node will write to disk with whatever options you have in the ROP FBX Output if you correctly set up the parameter references (again, in the HIP).
If this is not enough it probably will help you anyway.
I consulted the Think Procedural Discord (Edit on the name of the Discord, I misnamed it originally), that you might want to check out if you dont know about it, it is a good forum for questions and consultation.
Find attached a very barebones example of a workaround for this problem.
Im attaching only the HIP file out of simplicity, but the HDA the TOP network requires is just a simple Cube SOP where you change the scale, nothing else.
This approach shown here can be scaled and adapted to other more complex workflows, which is my case, but in fact if you are just only exporting stuff this might be enough (mind you the attributes name can be a problem).
Without getting into much detail (the HIP is here for that), what you do is to write to a cache using the hdaprocessor or even the very ROP Geometry node (if you instead of using and HDA are directly batch editing from the a geo environment) and then recast that cache with a ropfetch. The ropfetch node will write to disk with whatever options you have in the ROP FBX Output if you correctly set up the parameter references (again, in the HIP).
If this is not enough it probably will help you anyway.
Edited by lobachevscki - 2021年9月27日 11:11:21
PDG/TOPs » FBX from HDAprocessor saves as ascii instead of binary
-
- lobachevscki
- 10 posts
- Offline
Hi!
I'm facing this problem and I contacted directly SideFX support at support@sidefx.com, which specially if you have any kind of proper license you are able to do as well. They will answer.
They got back to me with this response:
This means that for a batch process like the one I and probably you need, we have to end up with the FBX ROP in a way that is convenient for our purposes.
I see this as a huge limitation. I will be sharing what we I ended up doing as I need to solve this.
Hope this helps.
I'm facing this problem and I contacted directly SideFX support at support@sidefx.com, which specially if you have any kind of proper license you are able to do as well. They will answer.
They got back to me with this response:
The HDA Processor TOP doesn't explicitly handle any geometry file types. It just calls`hou.Geometry.saveToFile(path)` on the geometry produced by cooking the SOP, using the path specified on the TOP node. Unfortunately that approach does not allow for any customization out of the output file format, and uses the default behavior of the GEO IO module for the file type (e.g. bgeo, fbx, obj, etc). The same behavior can be seen using a File Cache SOP that's configured to write to an .fbx file. You'll have to use an FBX ROP to customize the settings used to write out an .fbx file, such as choosing binary over ASCII.
As an RFE, we can look into extending the HDA Processor so that its worker script internally creates an FBX ROP and uses that to write out the output file. However that's not supported out of the box right now.
This means that for a batch process like the one I and probably you need, we have to end up with the FBX ROP in a way that is convenient for our purposes.
I see this as a huge limitation. I will be sharing what we I ended up doing as I need to solve this.
Hope this helps.
Edited by lobachevscki - 2021年9月21日 18:25:05
Houdini Engine for Unreal » PDG cooking is expecting files to be under UE install?
-
- lobachevscki
- 10 posts
- Offline
Hi.
For those having a hard time, I followed dpernuit suggestions and it worked for me, but what he wrote might not be as clear so Im gonna detail it here.
- You have to create and set a new project, it is easier for testing purposes. Create said project with an hda and geo folder as the default has.
- Make all your HDA processors point to $PDG_DIR. That is, select both the 'HDA File' and if you have Asset Output then select 'Output File Name' and then change the prefix to $PDG_DIR (Just overwrite it by hand). I'm kind of new to PDG so I don't know if any other nodes have to be set this way but I'm imagining they have to.
- You have to make (of course) your TOP network an HDA. Go to the scheduler and make 'Working Director' a parameter of said HDA. You can do this by opening your Type Properties of your TOP HDA, then going to the Scheduler and Alt + MMB over the name Working Directory. It will add it directly to your parameters (or add a File Directory parameter and link them, whatever you want). Make sure the default value is empty.
- Make sure your output HDA processor is prefixed as HE_OUT_ as that is what HE needs to know what is the output HDA.
- Save all your needed HDA in your project hda folder. Get them to Unreal.
- Drop you TOP and the details should contain the Working Directory parameter. Link this directly to your project file folder. In my case as you can see in the image is 'D:/Houdini/HoudiniProjects/PDG_intro', that is my project with all my folders like the hda and geo folders. This needs to be an absolute path as you can see there, the HE convention of relative paths wont work. This is what HE tries to resort to when the token $PDG_DIR is used (and what dpernuit tried to convey by using that phrasing). Inside your HIP file Houdini understands, but that's not necessarily the case for HE as this needs a ENV VAR to be set.
- This should make everything work.
- Inside your HIP you can either use $HIP, $JOB or $PDG_DIR as Working Directory parameter in your HDA and it should work as well. In this Houdini will (or should) understand any of the tokens.
I agree with dpernuit, this is probably the best way to work for PDG in your personal or small projects. Read again his suggestions to follow the rest I'm not covering here.
For bigger projects this probably won't do tho, a more robust setup of ENV VAR should be in place, you can see something like that in the Indie Pixel PDG terrain intro https://www.youtube.com/playlist?list=PLXNFA1EysfYnCqXOWZIiPNeukPT-thmGd [www.youtube.com] (although this is for Unity).
Hope this helps.
For those having a hard time, I followed dpernuit suggestions and it worked for me, but what he wrote might not be as clear so Im gonna detail it here.
- You have to create and set a new project, it is easier for testing purposes. Create said project with an hda and geo folder as the default has.
- Make all your HDA processors point to $PDG_DIR. That is, select both the 'HDA File' and if you have Asset Output then select 'Output File Name' and then change the prefix to $PDG_DIR (Just overwrite it by hand). I'm kind of new to PDG so I don't know if any other nodes have to be set this way but I'm imagining they have to.
- You have to make (of course) your TOP network an HDA. Go to the scheduler and make 'Working Director' a parameter of said HDA. You can do this by opening your Type Properties of your TOP HDA, then going to the Scheduler and Alt + MMB over the name Working Directory. It will add it directly to your parameters (or add a File Directory parameter and link them, whatever you want). Make sure the default value is empty.
- Make sure your output HDA processor is prefixed as HE_OUT_ as that is what HE needs to know what is the output HDA.
- Save all your needed HDA in your project hda folder. Get them to Unreal.
- Drop you TOP and the details should contain the Working Directory parameter. Link this directly to your project file folder. In my case as you can see in the image is 'D:/Houdini/HoudiniProjects/PDG_intro', that is my project with all my folders like the hda and geo folders. This needs to be an absolute path as you can see there, the HE convention of relative paths wont work. This is what HE tries to resort to when the token $PDG_DIR is used (and what dpernuit tried to convey by using that phrasing). Inside your HIP file Houdini understands, but that's not necessarily the case for HE as this needs a ENV VAR to be set.
- This should make everything work.
- Inside your HIP you can either use $HIP, $JOB or $PDG_DIR as Working Directory parameter in your HDA and it should work as well. In this Houdini will (or should) understand any of the tokens.
I agree with dpernuit, this is probably the best way to work for PDG in your personal or small projects. Read again his suggestions to follow the rest I'm not covering here.
For bigger projects this probably won't do tho, a more robust setup of ENV VAR should be in place, you can see something like that in the Indie Pixel PDG terrain intro https://www.youtube.com/playlist?list=PLXNFA1EysfYnCqXOWZIiPNeukPT-thmGd [www.youtube.com] (although this is for Unity).
Hope this helps.
Edited by lobachevscki - 2021年11月22日 11:23:08
Houdini Jobs » Lead Tech Artist for Open World game, Paris Based. Relocation. AAA veterans team.
-
- lobachevscki
- 10 posts
- Offline
Hi people!
We're growing our team and seeking Lead Tech Artist experienced in Real Time Houdini workflows specially for UE4. Competitive salary, visa sponsorship, relocation assistance - plus living in Paris and working with a stellar team.
In any case, if you feel you can fit the task wherever your background is, just hit us in the webpage or message me.
Interested? We'd love to hear from you. Apply on our website!
http://www.darewise.com/ [www.darewise.com]
We're growing our team and seeking Lead Tech Artist experienced in Real Time Houdini workflows specially for UE4. Competitive salary, visa sponsorship, relocation assistance - plus living in Paris and working with a stellar team.
In any case, if you feel you can fit the task wherever your background is, just hit us in the webpage or message me.
Interested? We'd love to hear from you. Apply on our website!
http://www.darewise.com/ [www.darewise.com]
Edited by lobachevscki - 2018年10月9日 09:23:41
Houdini Engine for Unreal » UE4 HDA landscape workflow
-
- lobachevscki
- 10 posts
- Offline
Thanks!
Thats the answer i received from a lot of people, so we are adjusting our workflow in terms of that.
I would like to ask two more questions, maybe looking at least for suggestions. These are workflow related stuff that i dont picture quite well at the moment.
Because, among other things, we are trying to build a multiplayer experience, it wont be possible to take one big landscape and use it to stream all the time, we need to slice it in smaller chunks. We are doing all our testing in relatively small example of a terrain 8km2 sliced in 1km2 chunks (100% playable area), but we are aiming to quite larger terrains. You probably see the problems that could arise:
1 - How do you update the slices in their supposed position with the Houdini/UE workflow you suggested? without doing it by hand. Im trying to create a BP that keeps track of the general grid based on landscape naming convention, but we are trying to learn ways in which houdini can help us in that regard, tool or workflowise. What would you suggest to explore?
2 - How do we deal with the borders of each chunk?. Let me explain in the following example:
2a- I have two pieces of terrain i created inside unreal. Flat terrains, move one just besides the other to create a larger space.
2b- I created a HDA that carves inside a terrain by using a polywire surface and a editable curve. The carving has the option to add noise to it. Nothing fancy.
2c- Import and drop the HDA, assigned it to both terrains.
2d- Edit the curve such it runs across both terrains, over where they meet.
2e - Recook everything, obtain the new landscapes.
In this example, depending on how steep and how much noise i add, the line in which the landscapes meet could break, which is to expect. If i add no noise and the carving is not to steep, they work fine, but otherwise it will probably break.
I've done another example, following the same steps, but the HDA just add noise. If the noise follows the same seed for each terrain slice, there is no breakup.
In this kind of situations, what workflow or tool inside houdini you would recommend to start exploring to match the borders?
Thanks in advance!
Thats the answer i received from a lot of people, so we are adjusting our workflow in terms of that.
I would like to ask two more questions, maybe looking at least for suggestions. These are workflow related stuff that i dont picture quite well at the moment.
Because, among other things, we are trying to build a multiplayer experience, it wont be possible to take one big landscape and use it to stream all the time, we need to slice it in smaller chunks. We are doing all our testing in relatively small example of a terrain 8km2 sliced in 1km2 chunks (100% playable area), but we are aiming to quite larger terrains. You probably see the problems that could arise:
1 - How do you update the slices in their supposed position with the Houdini/UE workflow you suggested? without doing it by hand. Im trying to create a BP that keeps track of the general grid based on landscape naming convention, but we are trying to learn ways in which houdini can help us in that regard, tool or workflowise. What would you suggest to explore?
2 - How do we deal with the borders of each chunk?. Let me explain in the following example:
2a- I have two pieces of terrain i created inside unreal. Flat terrains, move one just besides the other to create a larger space.
2b- I created a HDA that carves inside a terrain by using a polywire surface and a editable curve. The carving has the option to add noise to it. Nothing fancy.
2c- Import and drop the HDA, assigned it to both terrains.
2d- Edit the curve such it runs across both terrains, over where they meet.
2e - Recook everything, obtain the new landscapes.
In this example, depending on how steep and how much noise i add, the line in which the landscapes meet could break, which is to expect. If i add no noise and the carving is not to steep, they work fine, but otherwise it will probably break.
I've done another example, following the same steps, but the HDA just add noise. If the noise follows the same seed for each terrain slice, there is no breakup.
In this kind of situations, what workflow or tool inside houdini you would recommend to start exploring to match the borders?
Thanks in advance!
Houdini Engine for Unreal » UE4 HDA landscape workflow
-
- lobachevscki
- 10 posts
- Offline
Hi!
Hope all you are well and creating awesome stuff!.
I would like to post a question to obtain as many insights as i can. Im new to Houdini, so we are probably not understanding the whole picture, and i would to understand as much as possible. I researched the situation i will exposed and havent found an answer.
Our goal is to create a landscape workflow based mostly in HDA's, the idea is to get most of our landscape editing inside Unreal. For scattering stuff and related tasks our HDA's work really great, but when it comes to modify the actual landscape, we have some pesky workflow troubles. Let me expose the situation with the simplest of example:
1- I create a HDA inside Houdini. The only thing that it does is to receive a Landscape input and add noise to it. Thats it.
2- Once in Unreal, I create a new scene and add a landscape to it. Just a simple landscape and hit the Create button. No editing, no nothing, as simple as it gets.
3- I then import and drop the HDA into the scene, assign the landscape to the HDA.
4 - HDA creates a new landscape with the result. The scene ends up having 2 landscapes, the original and the result of the HDA.
I didnt expect that to happen.
In my mind, if im using a landscape as input, the HDA would modify the given asset, not create a new one. I do understand this could create problems down the road, as if you add the HDA multiple times, how do they combine the result? (i would expect them to just overwrite) but for the simple example explained above i would like to understand what im missing.
In this case, what would be the right approach to have a ‘as non destructive as possible’ approach to edit stuff inside Unreal?, is that possible?.
Any suggestion or comment on the matter is welcome.
Thanks!
Hope all you are well and creating awesome stuff!.
I would like to post a question to obtain as many insights as i can. Im new to Houdini, so we are probably not understanding the whole picture, and i would to understand as much as possible. I researched the situation i will exposed and havent found an answer.
Our goal is to create a landscape workflow based mostly in HDA's, the idea is to get most of our landscape editing inside Unreal. For scattering stuff and related tasks our HDA's work really great, but when it comes to modify the actual landscape, we have some pesky workflow troubles. Let me expose the situation with the simplest of example:
1- I create a HDA inside Houdini. The only thing that it does is to receive a Landscape input and add noise to it. Thats it.
2- Once in Unreal, I create a new scene and add a landscape to it. Just a simple landscape and hit the Create button. No editing, no nothing, as simple as it gets.
3- I then import and drop the HDA into the scene, assign the landscape to the HDA.
4 - HDA creates a new landscape with the result. The scene ends up having 2 landscapes, the original and the result of the HDA.
I didnt expect that to happen.
In my mind, if im using a landscape as input, the HDA would modify the given asset, not create a new one. I do understand this could create problems down the road, as if you add the HDA multiple times, how do they combine the result? (i would expect them to just overwrite) but for the simple example explained above i would like to understand what im missing.
In this case, what would be the right approach to have a ‘as non destructive as possible’ approach to edit stuff inside Unreal?, is that possible?.
Any suggestion or comment on the matter is welcome.
Thanks!
Technical Discussion » Scattering tool for Unreal terrain. Basic questions.
-
- lobachevscki
- 10 posts
- Offline
Hi! first post here. Starting with Houdini as well.
Im creating a scattering tool for Unreal using an HDA. I would like to know some recommendations for the following two questions.
Im using the mask_by_feature node to get the area i will scatter the geo onto, but i was wondering what kind of image processing nodes Houdini has to create more options to edit the mask. For example, is there like a “contract” selection node or something (as in PS)? so i can make the mask thinner.
I would like to know how we can be more specific in the scattering. For now, i think the node follows a uniform distribution algorithm, but i would like to for example, have more control over the scattering (im using the heightfield_scatter node).
Thanks.
Im creating a scattering tool for Unreal using an HDA. I would like to know some recommendations for the following two questions.
Im using the mask_by_feature node to get the area i will scatter the geo onto, but i was wondering what kind of image processing nodes Houdini has to create more options to edit the mask. For example, is there like a “contract” selection node or something (as in PS)? so i can make the mask thinner.
I would like to know how we can be more specific in the scattering. For now, i think the node follows a uniform distribution algorithm, but i would like to for example, have more control over the scattering (im using the heightfield_scatter node).
Thanks.
-
- Quick Links