Jump to content
Alexey Vanzhula

highlight geometry component under the mouse

Recommended Posts

I have 2 HDK questions:

1. how to get primitive\vertex\point\edge under the mouse pointer?

2. how to highlight this component with opengl?

 

I can only get primitive under the pointer with hou.GeometryViewport.queryPrimAtPixel and hou.GeometryViewport.mapFromMouseChop. But i need hdk solutions. There are very low info for this :(. I see DM_VPortAgent.singlePickObject method, but i dont understand how to work with render hooks

Edited by Alexey Vanzhula

Share this post


Link to post
Share on other sites

Architecturally, you need a custom "state" to do this. For example, the MSS_* files in the HDK samples.

Share this post


Link to post
Share on other sites

Maybe it is easier method to know what point under the pointer? I need inlinecpp python solution (i cant use compiled hdk plugins in my asset)  - so creation of new state can`t help me.

It is some closest point methods, but when i have mouse ray intersected with 3d point i need some camera angle to multiply with it for valid world point

Share this post


Link to post
Share on other sites

I want to compile MSS_CustomBrushState example, but houdini crushed with:

 "Couldn`t open MSopStates13.0.338/MSS_CustomBrushState.ui for reading ...".

Where i have to put this ui file ?

Edited by Alexey Vanzhula

Share this post


Link to post
Share on other sites
Guest mantragora

I want to compile MSS_CustomBrushState example...

Put it anywhere in your DSO path. Just create "ui" folder inside and put it there.

Example

$HOME/HoudiniX.X.XXX/dso/ui

Share this post


Link to post
Share on other sites

I don`t understand. i put file MSS_CustomBrushState.ui to ~/houdini13.0/dso/ui

and also to ~/houdini13.0/dso/ui/MSopStates13.0.338

but it doesnt helped :(

Share this post


Link to post
Share on other sites
Guest mantragora

Actually, check where your HOUDINI_UI_APP_PATH variable points to. I'm not using $HOME at all and my variable doesn't point to it, and i'm not sure is it by default. So run Command Line Tools and then "hconfig -a" and check its paths.

Edited by mantragora

Share this post


Link to post
Share on other sites

run houdini with

HOUDINI_UI_PATH=/home/alexey/houdini13.0/dso/ui/ /opt/hfs/bin/houdinifx

get me

ERROR: Couldn't open resource file "resources" (No such file or directory)
ERROR: Couldn't open "Fuse13.0.338/FUSE_ColorOptions.ui" for reading: No such file or directory
Color name 'ListEntry1' is missing from the theme.
Color name 'ListEntry2' is missing from the theme.
Color name 'TextboxBG' is missing from the theme.
ERROR: Couldn't open "SI13.0.338/SI_ColorEditor.ui" for reading: No such file or directory
10248: Fatal error: Segmentation fault (sent by pid 0)
Crash log saved to /tmp/crash.alexey_10248_log.txt

Share this post


Link to post
Share on other sites

also

HOUDINI_UI_APP_PATH                       := '<not defined>'
Edited by Alexey Vanzhula

Share this post


Link to post
Share on other sites
Guest mantragora

run houdini with

HOUDINI_UI_PATH=/home/alexey/houdini13.0/dso/ui/ /opt/hfs/bin/houdinifx

WTF? Why there is a space in your path? On linux I think you should use comma (or maybe it was semicolon?) to separate two paths.

Edited by mantragora

Share this post


Link to post
Share on other sites
Guest mantragora
 "Couldn`t open MSopStates13.0.338/MSS_CustomBrushState.ui for reading ...".

Are you sure you have your permissions set correctly for this file? There is really not much philosophy there, you just compile it and that's it. If you can compile other examples like SOPs etc. it should work too.

http://www.sidefx.com/docs/hdk13.0/hdk_intro_compiling.html

Edited by mantragora

Share this post


Link to post
Share on other sites
Guest mantragora

Once you modified HOUDINI_UI_APP_PATH make sure there is "$HFS/houdini/config/Applications" added to it and then add to it your custom path. Those errors about "Color name 'TextboxBG' is missing from the theme." etc. are because of this.

Share this post


Link to post
Share on other sites

At now id dont think that it is problem with ui file :)

 

but it also crash with this log:

Crash report from alexey; Houdini FX Version 13.0.338 [linux-x86_64-gcc4.6]
Traceback from Sun Mar  2 20:10:43 2014
Caught signal 11

AP_Interface::coreDumpChaser(UTsignalHandlerArg) <libHoudiniUI.so>
AP_Interface::si_CrashHandler::chaser(UTsignalHandlerArg) <libHoudiniUI.so>
signalCallback(UTsignalHandlerArg) <libHoudiniUT.so>
UT_Signal::UT_ComboSignalHandler::operator()(int, siginfo*, void*) const <libHoudiniUT.so>
UT_Signal::processSignal(int, siginfo*, void*) <libHoudiniUT.so>
killpg <libc.so.6>
PI_ResourceManager::getBindingSelectors(OP_Operator*) const <libHoudiniPRM.so>
MSS_SingleOpState::findNextParmWithSelector(int) const <libHoudiniAPPS3.so>
MSS_SingleOpState::handleSelectorDone(UI_Event*) <libHoudiniAPPS3.so>
BM_SingleOpState::generate(BM_SimpleState::BM_EntryType, bool) <libHoudiniAPPS2.so>
MSS_SingleOpState::generate(BM_SimpleState::BM_EntryType, bool) <libHoudiniAPPS3.so>
BM_OpStateControl::enterState(BM_State*, BM_OpStateEntry) <libHoudiniAPPS2.so>
BM_OpStateControl::setCurrentState(char const*, int, BM_OpStateEntry, BM_SceneManager*) <libHoudiniAPPS2.so>
HOMF_SceneViewer::setCurrentState(char const*, bool) <libHoudiniAPPS3.so>
_wrap_SceneViewer_setCurrentState <_hou.so>
PyEval_EvalFrameEx <libpython2.7.so.1.0>
PyEval_EvalCodeEx <libpython2.7.so.1.0>
PyEval_EvalFrameEx <libpython2.7.so.1.0>
PyEval_EvalCodeEx <libpython2.7.so.1.0>
PyEval_EvalCode <libpython2.7.so.1.0>
PY_CompiledCode::evaluateUsingDicts(PY_Result::Type, void*, void*, PY_Result&) const <libHoudiniUT.so>
SHLF_Tool::execute(SHLF_ExecContext const&) <libHoudiniAPPS2.so>
OPUI_ToolHandler::handleToolEvent(UI_Event*) <libHoudiniAPPS2.so>
UI_Queue::processNextEvent() <libHoudiniUI.so>
UI_Queue::drain() <libHoudiniUI.so>
UI_Queue::eventLoop() <libHoudiniUI.so>
main <libHoudiniUI.so>
__libc_start_main <libc.so.6>
[0x1bd7] <houdinifx-bin>
Edited by Alexey Vanzhula

Share this post


Link to post
Share on other sites
 11003: Fatal error: Segmentation fault (sent by pid 0)
Saving application data to /tmp/crash.untitled.alexey_11003.hip
Crash log saved to /tmp/crash.untitled.alexey_11003_log.txt
Warning: Missing charsets in String to FontSet conversion

it is with custom HOUDINI_UI_APP_PATH var. After i seted it error with ui file was gone :)

Edited by Alexey Vanzhula

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×