Hi,
I want to create a sketching interface for Houdini. I think the way to go is to create an event handler but I'm not sure where to start.
I want to create a tool that could be activated in Houdini and which will records mouse button events and mouse moves in order to paint curves inside the viewport. ( I want to record the mouse position when the left mouse button is pressed and use the recorded positions to draw a curve in the viewport)
I was looking for the event handler in the HDK but I cannot find a lot of informaiton on it. I found the MSS_CustomBrushState in the samples files. It looks like if I use it as a template (that's means inherite from MSS_singleOpState) I can handle mouse events and records mouse position and apply some computation on the records… but
My knowledge in Houdini are still in progress and my knowledge in the HDK is NULL.
Before to start playing around withg the code and testing my ideas, I prefer to get your gourou advices…
Leave comments if you think this is the way to go or if you think I miss a point. Moreover, if you already have some solutions similar, I'm really interested to see them or to get your advices.
Thank you for reading
Nicolas
Sketching with mouse events ?
4194 5 0- dealer2couleurs
- Member
- 25 posts
- Joined: 2月 2010
- Offline
- khermah
- Member
- 33 posts
- Joined: 5月 2006
- Offline
- dealer2couleurs
- Member
- 25 posts
- Joined: 2月 2010
- Offline
Could you detail please.
It was my first idea but I look for mouse input in chop and it only give me some mouse coordinates in screen space.
Is there an other node to get the mouse button status?
and after that, how did you project this coordinates into your scene ( with 2 screen if I remenber the coordiantes are from -1 to 3 in tx)
It was my first idea but I look for mouse input in chop and it only give me some mouse coordinates in screen space.
Is there an other node to get the mouse button status?
and after that, how did you project this coordinates into your scene ( with 2 screen if I remenber the coordiantes are from -1 to 3 in tx)
- khermah
- Member
- 33 posts
- Joined: 5月 2006
- Offline
- dealer2couleurs
- Member
- 25 posts
- Joined: 2月 2010
- Offline
We are getting warm…
The trouble with this solution is that I need a geometry to paint on.
I want to use my solution to squetch points when there is nothing in the scene.
I think I will create a plane to paint on, oriented with the construction plane or the camera.
But if you have some idea to do it like the object creation (the box projected in the scene that show where the object will be…) it could be better.
Thanks, you already help me a lot
The trouble with this solution is that I need a geometry to paint on.
I want to use my solution to squetch points when there is nothing in the scene.
I think I will create a plane to paint on, oriented with the construction plane or the camera.
But if you have some idea to do it like the object creation (the box projected in the scene that show where the object will be…) it could be better.
Thanks, you already help me a lot
- khermah
- Member
- 33 posts
- Joined: 5月 2006
- Offline
-
- Quick Links