Forgot your password?   Click here   •   No account yet?   Please Register    •   Or login using  
EN Login
SideFX Homepage
  • Products
    • What's New in H20.5
      • Overview
      • VFX
      • Copernicus
      • Animation
      • Rigging
      • Lookdev
    • Houdini
      • Overview
      • FX Features
      • CORE Features
      • Solaris
      • PDG
    • Houdini Engine
      • Overview
      • Engine Plug-Ins
      • Batch
    • Karma Renderer
    • Compare
    • SideFX Labs
    • Partners
  • Industries
    • Film & TV
    • Game Development
    • Motion Graphics
    • Virtual Reality
    • Synthetic Data for AI/ML
  • Community
    • Forum
    • News Feed
      • Overview
      • Project Profiles
      • Houdini HIVE Events
      • Contests & Jams
    • Gallery
    • Event Calendar
    • User Groups
    • Artist Directory
  • Learn
    • Tutorials
      • Overview
      • My Learning
      • Learning Paths
      • Tutorial Library
    • Content Library
    • Tech Demos
    • Talks & Webinars
    • Education Programs
      • Overview
      • Students
      • Instructors
      • Administrators
      • List of Schools
      • Resources
  • Support
    • Customer Support
    • Licensing
      • Overview
      • Commercial
      • Indie
      • Education
    • Help Desk | FAQ
    • System Requirements
    • Documentation
    • Changelog / Journal
    • Report a Bug/RFE
  • Try | Buy
    • Try
    • Buy
    • Download
    • Contact Info
 
Advanced Search
Forums Search
Found 392 posts.

Search results Show results as topic list.

Technical Discussion » Matrix formatting difference between VEX and OpenCL

User Avatar
jlait
6696 posts
Offline
 Jan. 6, 2025 11:17:30
A float4 in OpenCL is laid out in memory as xyzw.
.lo refers to the front half of the vector, so xy, and .hi to the back half, or zw.

The same is with float16, so .lo is the first 8 floats in memory, and .hi the next 8 floats.

The second .hi / .lo then further grabs the first 4 floats or last 4 floats of those setups.

Thus .lo.lo refers to the FIRST four floats in memory. This is what would normally be called the "top row", row zero and columns zero through three. So I think OpenCL is already doing what you expected in VEX.
See full post 

Technical Discussion » Copernicus: How to do fisheye distortion?

User Avatar
jlait
6696 posts
Offline
 Aug. 9, 2024 11:33:53
The problem is we did too good a job making VEX easy to write :>

We've done a lot to make OpenCL less painful, so hopefully you can start to transition for Copernicus nodes.

Here's your code transformed to OpenCL, starting from the default OpenCL node...

#bind layer src? val=0 float
#bind layer !&dst float

@KERNEL
{
    float ang = fit01(@src,0,M_PI/2);

    float result = @src * sin(ang);

    @dst.set(result);
}

Note the use of M_PI rather than PI. VEX also supports M_PI, and I'd recommend you get in the habit of M_PI as it is a lot more portable outside of VEX.

There is a lot more explicit boilerplate in OpenCL, thus the #bind commands to define your interface to the code.

One change you can make in both VEX and OpenCL is to use sinpi(). sinpi() is in 20.5 VEX and allows you to avoid needing to work with Pi. This isn't just an improvement in typing, but also is useful mathematically as PI/2 isn't an exact number, while sin(PI/2) is an exact number.


#bind layer src? val=0 float
#bind layer !&dst float

@KERNEL
{
    float ang = fit01(@src,0,0.5);

    float result = @src * sinpi(ang);

    @dst.set(result);
}


We are definitely missing all the nice helper functions that VEX has... You often have to go down to mix() or similar. fit01 is luckily present from interpolate.h, but a lot of your other gotos will be missing :<

This is my go-to for references for raw OpenCL functions.
https://www.khronos.org/files/opencl-1-2-quick-reference-card.pdf [www.khronos.org]
See full post 

Houdini Lounge » Houdini Color Schemes

User Avatar
jlait
6696 posts
Offline
 Oct. 19, 2023 11:20:06
It is very nice to see cool colour schemes being built despite the clunkiness of the current system.

As for the green line, I'm afraid I must report that colour isn't actually part of the schema :cry:

    if(myViewport->manager()->getViewportBorders())
    {
        if(myViewport->manager()->isCurrentPort(myViewport->getPortIndex()))
            r->setColor(UI_Color(UT_RGB, 0.0F, 0.6F, 0.0F));
        else
            r->setColor(UI_GREY20);

        r->rect2DS(x, y, x+w-1, y+h-1);
    }

I've submitted Bug: 132255 regarding this, as we do not like such hard coded colours.
See full post 

Technical Discussion » Expression Short Circuiting

User Avatar
jlait
6696 posts
Offline
 Dec. 26, 2022 14:23:44
You are correct that VEX doesn't short circuit. I can't say we are happy with that, as it is very useful and expected to short circuit. I'd say we want to reserve the right to fix this some day, so please do not write code that requires us to not short circuit in the meantime.
See full post 

Technical Discussion » Houdini recalculating every node when just pressing "save"

User Avatar
jlait
6696 posts
Offline
 Nov. 28, 2022 21:18:55
Thank you for the file. We can reproduce that, and it does seem very suspicious.

I've submitted a bug with internal tracking number 125726.

Thank you for reporting this!
See full post 

Houdini Lounge » Houdini 19 Visualize SOP

User Avatar
jlait
6696 posts
Offline
 Oct. 28, 2021 16:50:15
OdFotan
What's up with the Visualize SOP tho?

It's become more focused on setting up the various magic attributes to control visualization, rather than being a node to add visualizers.

Gear icon on the Top Right, Add Visualizer, Add Color Visualizer. This will get you the node-level visualizer it had by default before.

For the visualization to pass down-stream from the SOP you can click the "Update Visualizers" toggle. This will bake the visualizer into an attribute so any node down-stream will also visualize, useful if you are exporting this as another View Output from an HDA.

The actual code has stayed the same, it is the defaults we've changed.
See full post 

Technical Discussion » How to get JSON formatted strings from Ramps

User Avatar
jlait
6696 posts
Offline
 June 10, 2021 09:36:37
Ah, good point, the spline docs have not been updated. It uses the same underlying code as the Ramp, so thus in practice they will remain in sync.

18.5.605 will have ramp_lookup() working as expected, and adds ramp_pack to do the to-string operation if you need it.
See full post 

Technical Discussion » How to get JSON formatted strings from Ramps

User Avatar
jlait
6696 posts
Offline
 June 7, 2021 11:35:03
The ramp_lookup() for arrays is a wrapper around what used to be ramp_lookup in pyro_aaramp. That did a linear warp of the sample position into a uniform key distribution, and then sampled the ramp as if the keys were uniform. I'm guessing maybe the full key spline function wasn't present when that was written, and it "gets away" with it for many ramp types as the key spacing isn't important. But for bsplines it is pretty important!

Fortunately there is a workaround, rather than ramp_lookup() you can go directly to the spline function:

    y = spline(s[]@r_basis, x, f[]@r_val, f[]@r_key);

Hopefully we can fix ramp_lookup, but you probably want to use the spline() version for backwards compatibility in 18.5 for a while.
See full post 

Houdini Indie and Apprentice » I can't import obj's

User Avatar
jlait
6696 posts
Offline
 May 17, 2020 17:45:32
Apologies for the necro thread, I was seraching an unrelated issues ran into this post.

The offending program isn't qwavefront.exe, but should be gwavefront.exe.

A fair number of file formats are supported in Houdini by using standalone programs to do the conversion. gwavefront, gdxf, gply, etc. When houdini tries to read or write a .obj, it will instead launch this program to do the task. This is usually done with pipes so no files go to disk, but the gwavefront program doesn't know it was invoked by Houdini. Thus, it has to check for licenses to see it is allowed to run. This usually involves contacting hserver. In most configurations, this should be entirely local connections, which is why it will run normally unattached to the network. But it surprisingly difficult to separate local from external connections, which is probably why Zone firewall is tripping on it.
See full post 

Technical Discussion » How Hscript and Expressions are different?

User Avatar
jlait
6696 posts
Offline
 Jan. 3, 2020 18:10:03
It isn't a stupid question.

hscript is a shell-like language, similar to csh or bash.

However, when you use back-ticks to escape it doesn't run shell commands, but a separate expression language. This is also the language that is used by default in parameters.

If you open a textport in Houdini (Windows::Textport) and type
3 + 2
it doesn't work because it tries to run the command 3

But
echo `3 + 2`
will invoke the expression language and evaluate 3+2.

I tend to call the expression language EXPR, but most people will just call it HScript. But I think it is simplest to think of there being Python VEX, Hscript, and Hscript Expressions as separate languages to learn. It is likely you don't have to learn HScript, only Hscript expressions, for example. Most of what hscript did is better done with python.

Our goal was to remove both Hscript and Hscript expressions and replace them with Python. Due to performance issues, however, HScript Expressions are likely to stick around.
See full post 

Technical Discussion » pcsegment. How is it supposed to work?

User Avatar
jlait
6696 posts
Offline
 Jan. 3, 2020 13:52:16
An embarrassing bug!

Thank you for isolating & reporting this.

Hopefully 18.0.339 will work for you without the need for workarounds.
See full post 

Technical Discussion » New Paint SOP

User Avatar
jlait
6696 posts
Offline
 Dec. 2, 2019 16:13:16
pickled
Paint Attributes/Attribute Paint SOPs redundancy?

“Situation normal.”

I wanted “Tab->Paint<enter>” to get you the new paint sop. So it has to be called Paint Attributes in the tab menu for that. But the natural naming scheme for this is “Attribute Paint” to match the other Attribute prefixed nodes.

Of course, we allow typing names out of order in the tab menu, so whichever you type the other will show up… Best course would likely be to have only the highest-matching variant show up in the menu, but that will require a fair bit of extra metadata to tie the tools together.
See full post 

Technical Discussion » Animated groups driving vellum simulations

User Avatar
jlait
6696 posts
Offline
 Nov. 12, 2019 15:24:39
In the vellumconstraintspropertiy it is bound to the Constraint primitives. Thus @PinSelection would read the primitive attribute on the constraint geometry, which likely isn't where you have your animated data.

This is why you likely want to use a point() expression to read from one of the other inputs, and set that input to the animated geometry. In particular,

stiffness = 1e10 * point(2, ‘PinSelection’, @ptnum);

would work if the Third Input (2) is set to point to the SOP that has the animated PinSelection attribute.

Note stiffness is exponential, so it will be pretty much on/off even for intermediate values of PinSelection like 0.5.
See full post 

Technical Discussion » Animated groups driving vellum simulations

User Avatar
jlait
6696 posts
Offline
 Nov. 12, 2019 10:52:46
The vellum constraint node is only run on the first frame. So it creates all the pin constraints on that first frame. The “Animated” flag adds an attribute that the target position to be updated, but will not re-create the pins. Thus it won't notice that the group has since changed. This might seem a pedantic separation when the group is “pins” as it seems trivial to re-evaluate membership in that group. But that generation group can be any arbitrary expression.

Since you created soft pins they exist as spheres on the Constraints geometry.

The easiest way to deactivate them is to set their stiffness to 0. You can do this in the vellumconstraintproperty DOP inside the forces tab.

The Animated Constraints help card example shows a setup reading in to a vellum constraints property. You could do similar with a vexpression of

stiffness = 1e10 * inpointgroup(2, “pins”, @ptnum);

and then set the Input 3 to point to where the pins group is animated.
See full post 

Houdini Indie and Apprentice » Delete empty attributes

User Avatar
jlait
6696 posts
Offline
 Nov. 7, 2019 12:59:52
Faster way might be to use nuniqueval/uniqueval to see if the string attribute has only blank strings in it. Can do it in a detail wrangle that builds up a detail string of attributes to delete that the attribute delete brings in with a details() expression. Bonus points is to wire your geometry to test to the *second* input of the detail wrangle so you have no copy costs for generating this.
See full post 

Technical Discussion » Unstable Vellum Weld constraints

User Avatar
jlait
6696 posts
Offline
 Feb. 13, 2019 17:00:57
The peculiar behaviour of disableself may be found in the vellum attributes docs:
http://www.sidefx.com/docs/houdini/dyno/vellumattributes.html [www.sidefx.com]

The idea of how to use this to solve this case isn't in the docs. We're exploring how to make as a proper built-in, and will probably be adding an option to the vellum solver to auto-disable freshly broken welds.

One issue is that if your tear is pulling apart quickly, you don't want to auto-disable as it may cause layered cloth to fail.
See full post 

Technical Discussion » Overhead hit for fit vs. fit01?

User Avatar
jlait
6696 posts
Offline
 Nov. 14, 2018 11:13:14
In VEX:
#define CREATE_FIT01(TYPE) \
TYPE fit01(const TYPE val; const TYPE nmin; const TYPE nmax) \
{ \
    return fit(val, TYPE(0), TYPE(1), nmin, nmax); \
}

CREATE_FIT01(float)
CREATE_FIT01(vector2)
CREATE_FIT01(vector)
CREATE_FIT01(vector4)
#undef CREATE_FIT01

In the EXPR world (expressions outside of VEX)

EV_START_FN(fn_fit01)
{
    fpreal val = SYSfit(argv[0]->value.fval, 0, 1,
                      argv[1]->value.fval, argv[2]->value.fval);
    EV_END_FN(val);
}


So it is just convenience.
See full post 

Technical Discussion » Can xyzdist VEX function be used on specific primitives without making a group per prim?

User Avatar
jlait
6696 posts
Offline
 Oct. 31, 2018 10:15:48
Groups can be ad hoc groups, so don't need to be created ahead of time.

So you can use the group “53” (note a string holding 53, not the integer 53) to find distance to primitive 53. sprintf(“%d”, primnum) can be used to generate such a group.

A big warning, however: internally it will have to create a group for all those primitives. So while it won't be as clunky, there may be more expense than you expect if every point creates a different group.
See full post 

Technical Discussion » Are volumes vertex-centered or cell-centered?

User Avatar
jlait
6696 posts
Offline
 Oct. 23, 2018 15:25:36
The samples of Houdini volumes are stored in the voxel centers. If you use volume slice, you will notice that it is half a voxel smaller than the original volume on each side as it is placing the generated points at the volume samples, not the corers of the voxels.
See full post 

Technical Discussion » In a Point Wrangle, is there a way to mark a variable as only needing to be calculated once per cook, rather than once per point?

User Avatar
jlait
6696 posts
Offline
 Oct. 23, 2018 13:45:19
howiem
Or is the VEX compiler smart enough to recognise variables that won't change per-point, and just calc/cache them once?

Pretty much this.

There are three levels of computation:
1) Compile time
2) Once per point block (uniform)
3) For every point

If you have code like:

s@foo = sprintf("hello%d", 3);

The sprintf() will actually be computed at compile time.

If you have code like:

s@foo = sprintf("hello%d", ch("localparm"));

the ch() function has no per-point dependency, so will be marked uniform. Thus the sprintf() likewise will be uniform and only evaluated once per point-block. Point blocks are 1024 in size, so for almost all cases are pretty much equivalent to only evaluating it once outside the loop. It has to be pretty exceptional for me to consider pre-computing something rather than trusting the VEX compiler.
See full post 
  • First
  • 1
  • 2
  • 3
  • 4
  • Last
  • Quick Links
Search links
Show recent posts
Show unanswered posts
PRODUCTS
  • Houdini
  • Houdini Engine
  • Houdini Indie
LEARN
  • Talks & Webinars
  • Education Programs
SUPPORT
  • Customer Support
  • Help Desk | FAQ
  • Documentation
  • Report a Bug/RFE
LEGAL
  • Terms of Use
  • Privacy Policy
  • License Agreement
  • Accessibility
  • Responsible Disclosure Program
COMPANY
  • About SideFX
  • Careers
  • Press
  • Internships
  • Contact Info
Copyright © SideFX 2025. All Rights Reserved.

Choose language