Making a speedometer
3755 13 3- druitre
- Member
- 63 posts
- Joined: May 2006
- Offline
Hi all,
i'd like to discuss various ways to make a speedometer in Houdini. I'm pretty noobish and getting lost in the stuff I can find so far so I'm open to all information that will point me in the right direction.
So, that would be: I want to animate a car (or any object) and have a (modeled) needle on a (modeled) dial rotate to the right position showing the speed of the car.
(In more abstract words; read the velocity of an object and transfer that to the rotation of another object)
any help welcome!
(What I have so far: used a trail node to create ‘v’ attribute on copy of animated object, set display options to show ‘v’ for each point of object. Failed so far to transfer ‘v’ to rotation (or position, for that matter) of other object.)
i'd like to discuss various ways to make a speedometer in Houdini. I'm pretty noobish and getting lost in the stuff I can find so far so I'm open to all information that will point me in the right direction.
So, that would be: I want to animate a car (or any object) and have a (modeled) needle on a (modeled) dial rotate to the right position showing the speed of the car.
(In more abstract words; read the velocity of an object and transfer that to the rotation of another object)
any help welcome!
(What I have so far: used a trail node to create ‘v’ attribute on copy of animated object, set display options to show ‘v’ for each point of object. Failed so far to transfer ‘v’ to rotation (or position, for that matter) of other object.)
- matthias_k
- Member
- 483 posts
- Joined: Dec. 2006
- Offline
v is not speed
you can use chops to get the speed, if I'm right.
see local help files or:
http://www.sidefx.com/docs/houdini/nodes/chop/slope.html [www.sidefx.com]
you can use chops to get the speed, if I'm right.
see local help files or:
http://www.sidefx.com/docs/houdini/nodes/chop/slope.html [www.sidefx.com]
English is not my native language, sorry in advance for any misunderstanding :-)
- Konstantin Magnus
- Member
- 670 posts
- Joined: Sept. 2013
- Offline
You can calculate the length of the velocity vector and translate this into rotation.
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
- druitre
- Member
- 63 posts
- Joined: May 2006
- Offline
@Konstantin: yes! That is what i was trying to do - I had gotten to the Point VOP stage (it's the same as Attribute VOP, right? Just that it's already set to point context?) but the Bind node is what I was failing to understand, plus how to reference that value in the transform of the needle.
Question: the expression you put in rz of the line transform, how did you get to that? Is it just vex and you have to know how to do it, or is there something in the interface to help you set the expression?
(In Softimage, I'd use ‘link parameter’ to have one parameter's values drive another parameter - it has a GUI to set it up but still the result is an expression)
Question: the expression you put in rz of the line transform, how did you get to that? Is it just vex and you have to know how to do it, or is there something in the interface to help you set the expression?
(In Softimage, I'd use ‘link parameter’ to have one parameter's values drive another parameter - it has a GUI to set it up but still the result is an expression)
- druitre
- Member
- 63 posts
- Joined: May 2006
- Offline
- Konstantin Magnus
- Member
- 670 posts
- Joined: Sept. 2013
- Offline
druitreyes.
I had gotten to the Point VOP stage (it's the same as Attribute VOP, right? Just that it's already set to point context?
druitreinside VOPS you use “bind” to import attributes and “bind export” to write attributes.
but the Bind node is what I was failing to understand
druitreIt´s an expression function (not VEX). Expression functions are probably what you learn first. I dont use them as much anymore. Anyways, here is the full list:
the expression you put in rz of the line transform, how did you get to that? Is it just vex
http://www.sidefx.com/docs/houdini/expressions/index.html [www.sidefx.com]
And dont worry: you will mostly use a fraction of them, like channel references ch“../” or again point attributes point(“../)
You get them from typing only, but you can click ”Help“ - ”Show help pane" on the menu to always be able to read aside on what you need to do.
Edited by Konstantin Magnus - Feb. 13, 2018 11:32:19
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
- druitre
- Member
- 63 posts
- Joined: May 2006
- Offline
Thanks, having help pane open is better than having it as a floating window as I do atm, less obstructive. I think where I would've been stuck is realizing that the “speed” attribute was written to a point so a point expression was needed to read it back. But then again, I get stuck in Houdini all the time.
- matthias_k
- Member
- 483 posts
- Joined: Dec. 2006
- Offline
Maybe, if you don't use it now, switch to “technical” workspace
and have the spreadsheet expanded, to see what's going on.
Or right click on the desired node and choose from the menue “Spreadsheet”,
to have always the attributes visible.
and have the spreadsheet expanded, to see what's going on.
Or right click on the desired node and choose from the menue “Spreadsheet”,
to have always the attributes visible.
English is not my native language, sorry in advance for any misunderstanding :-)
- druitre
- Member
- 63 posts
- Joined: May 2006
- Offline
Hello Matthias, yes, I'm using technical workspace since viewing one of Sidefx tutorials, they recommended it and it does indeed give more feedback.
I can open ‘spreadsheet’ from the node itself (useful information there, cool) but where is it in the workspace? I've got a ‘parameter spreadsheet’ that doesn't do the same and I can add a tab pane but then I can't choose ‘spreadsheet’ there.
I can open ‘spreadsheet’ from the node itself (useful information there, cool) but where is it in the workspace? I've got a ‘parameter spreadsheet’ that doesn't do the same and I can add a tab pane but then I can't choose ‘spreadsheet’ there.
- matthias_k
- Member
- 483 posts
- Joined: Dec. 2006
- Offline
- druitre
- Member
- 63 posts
- Joined: May 2006
- Offline
Hehe… next question just arose: how to get the wheels of my car rotate at the right speed? I thought it would be easy given that I know the speed of the car. Something with the wheel radius and presto, right? Yeah, right hmmm… my math-savvy colleague says it has to do with the integral, is that how to do it?
- matthias_k
- Member
- 483 posts
- Joined: Dec. 2006
- Offline
easiest way: create a path…
or better two, like a rail
animate the car along this path
then use arclen to get path length
of “driven path”
and then multiply it with wheel radius
to get rotation
can setup a simple example later ;-)
or better two, like a rail
animate the car along this path
then use arclen to get path length
of “driven path”
and then multiply it with wheel radius
to get rotation
can setup a simple example later ;-)
Edited by matthias_k - Feb. 14, 2018 13:27:44
English is not my native language, sorry in advance for any misunderstanding :-)
- matthias_k
- Member
- 483 posts
- Joined: Dec. 2006
- Offline
Something like this.
If you like to have rotation from free movement in space it would be a little bit more complex ;-)
https://www.orbolt.com/asset/SideFX::vehiclerig
have a look here, too. But notice: Houdini 12.1 to Houdini 15.5
and:
https://cmivfx.com/houdini-craft-automobile-system-volume-1 [cmivfx.com]
uups: forgotten:
https://vimeo.com/98753987 [vimeo.com]
If you like to have rotation from free movement in space it would be a little bit more complex ;-)
https://www.orbolt.com/asset/SideFX::vehiclerig
have a look here, too. But notice: Houdini 12.1 to Houdini 15.5
and:
https://cmivfx.com/houdini-craft-automobile-system-volume-1 [cmivfx.com]
uups: forgotten:
https://vimeo.com/98753987 [vimeo.com]
Edited by matthias_k - Feb. 15, 2018 03:17:58
English is not my native language, sorry in advance for any misunderstanding :-)
- druitre
- Member
- 63 posts
- Joined: May 2006
- Offline
Thanks Matthias, yes, I had not noticed this element in the GUI. You learn something every day.
And thanks for the links, I'm going to have a look right now.
: looking at your example, that is just about what I had in mind. I'm animating my car along a path so this works for me. The tutorial from Lost Boys looks way more complicated (because it allows for free movement in space I guess) but will be useful to learn.
And thanks for the links, I'm going to have a look right now.
: looking at your example, that is just about what I had in mind. I'm animating my car along a path so this works for me. The tutorial from Lost Boys looks way more complicated (because it allows for free movement in space I guess) but will be useful to learn.
Edited by druitre - Feb. 15, 2018 04:52:48
-
- Quick Links