Julián Rojas Millán

lobachevscki

About Me

Unreal/Houdini Tech Artist
EXPERTISE
Gamedev
INDUSTRY
Gamedev

Connect

LOCATION
United Kingdom

Houdini Skills

Availability

Not Specified

Recent Forum Posts

How to use a virtual environment's python instead of the one that ships with houdini? Dec. 15, 2023, 8:32 a.m.

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.

Different geo inputs to a group of HDA's EU Python Aug. 3, 2022, 4:27 a.m.

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!

FBX from HDAprocessor saves as ascii instead of binary Sept. 27, 2021, 9:56 a.m.

colinsenner
lobachevscki
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