Jump to content

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
Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
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
Link to comment
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
Link to comment
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

Link to comment
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
Link to comment
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
Link to comment
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.

Link to comment
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
Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...