https://gyazo.com/598d823f88baec5a1b48c4d484432e37 [gyazo.com]
as shown in the network(just for demo), in branch A i set point attribute "unreal_instance", in brance B i generate some mesh with polyextrude. so all the point from branch A will have attribute 'unreal_instance' but points in branch B will not. after merging two branch, in the geo sheets, some points will have 'unreal_instance' attribute but some left empty. this will cause problem when used in Unreal. those points with empty 'unreal_instance' will be replaced with a place holder box.
this situations also apply to some other attributes like normal/orient, etc...
so, how can i properly merge these branch in a better way? since it's in a for each loop, i have to merge them first then connect to end block.
Found 6 posts.
Search results Show results as topic list.
Technical Discussion » How to properly merge geo with different attributes?
- leibao
- 6 posts
- Offline
Technical Discussion » read detail attribute(string type) to file path notworking.
- leibao
- 6 posts
- Offline
i am trying to read detail attribute(where i store a file path) to the file sop with
and this is the value i got
'D:/Houdini Projects/SimpleBuildingGenerator/geo/BuildingAssets/1/1/Building_a.fbx'
the file node wont load file and seems to be the reason of the begining and ending, if i get rid of them manually in file sop, it works perfect.
i am not sure if it's because my stored value has extra '
if that is the reason, how do i get rid of the begining and ending ' in vex
i find it annoying when it comes to string that involve with slash/back-slashes, the \ and / always driving me crazy.
if not, maybe it's the hscript problem?
https://gyazo.com/2d082df03413c0f1d7f2ddcdb0895a66 [gyazo.com]
all i want to do is to send file path string to a file sop so that i could loading different models.
how do you guys deal string that involves path/slash/back-slash stuffs?
any help would be appreciate!
`details('../attribwrangle8/', 'p')`
'D:/Houdini Projects/SimpleBuildingGenerator/geo/BuildingAssets/1/1/Building_a.fbx'
the file node wont load file and seems to be the reason of the begining and ending
'
i am not sure if it's because my stored value has extra '
if that is the reason, how do i get rid of the begining and ending ' in vex
i find it annoying when it comes to string that involve with slash/back-slashes, the \ and / always driving me crazy.
if not, maybe it's the hscript problem?
https://gyazo.com/2d082df03413c0f1d7f2ddcdb0895a66 [gyazo.com]
all i want to do is to send file path string to a file sop so that i could loading different models.
how do you guys deal string that involves path/slash/back-slash stuffs?
any help would be appreciate!
Technical Discussion » Get point/primitive/detail attribs from any sop using python
- leibao
- 6 posts
- Offline
New to python scripting,
i was wondering how can i access point/primitive/detail attribs from any sops with python scripting?
image url: https://gyazo.com/ba7c3b65a24c9c103065f08225aeeac6 [gyazo.com]
like here, i need to get detail or point attrib(string type) from attribWrangler8 sop to my python script sop 'python2'
i was wondering how can i access point/primitive/detail attribs from any sops with python scripting?
image url: https://gyazo.com/ba7c3b65a24c9c103065f08225aeeac6 [gyazo.com]
like here, i need to get detail or point attrib(string type) from attribWrangler8 sop to my python script sop 'python2'
Edited by leibao - Jan. 16, 2023 05:50:37
Technical Discussion » How do i send data from Pyhton script to vex?
- leibao
- 6 posts
- Offline
beka
Hey,
I tell you my way.
Send list as a string to a parameter of attribute wrangle with something like that node.attribwrangle.parm("vex_par_array").set(str(python_array))
Then filter this. It would be with brackets and commas, but you need clean 1 4 5 7 to use as a vex array; so remove those with the code for instance:
string P_array = chs("vex_par_array");
string fix_targets = re_replace(",", "", P_array);
fix_targets = strip(fix_targets, "[");
fix_targets = strip(fix_targets, "]");
string array = split(fix_targets);
I hope that helps you,
Beka
Thanks! it works like a charm!!
Technical Discussion » How do i send data from Pyhton script to vex?
- leibao
- 6 posts
- Offline
say i created a list var in pyhton, then how do i send it to vex and using it in the following sops?
and do i need to convert list to array first in python?
any doc/reference would be aprreciate!
and do i need to convert list to array first in python?
any doc/reference would be aprreciate!
Technical Discussion » How can i generate middle line/spline of a road mesh polygon
- leibao
- 6 posts
- Offline
Like i draw in the pic, how can i get the middle spline of the road polygon which describe the direction of the road and sits in the center of road?
-
- Quick Links