[Sidefx-houdini-list] computing world space velocity

Rangi Sutton rangi at kanuka.com.au
Wed Jul 9 22:17:24 EDT 2008


Antoine Durr wrote:
> There's a new option in the object_merge SOP in H9.1, where you can  
> transform the geometry into the space of a specified object.  I  
> haven't tried it, but if you make yourself a world_object that has  
> identity transforms, that /should/ work.
>   

Just tried this, and you can object merge a sop back in to the same 
object with using a "world" null that's at the origin.


But why do this!?! Perhaps you're only interested in the lenght of v? 
That's about all I can think of.

Life is going to get complicated with points in object space having 
vectors attached that are in world space. I'd suggest to object merge 
the sops in to a stationary object (with transform object set to "..") 
and just move ahead from there. Your points and vectors are all in world 
space and stuff will make sense.

r.


> -- Antoine
>
> On Jul 8, 2008, at 11:28 AM, Mark Elendt wrote:
>
>   
>> On Tuesday Jul 08 at 11:14, Michael K O'Brien wrote:
>>     
>>>> -----Original Message-----
>>>> From: sidefx-houdini-list-bounces at sidefx.com [mailto:sidefx- 
>>>> houdini-list-
>>>> bounces at sidefx.com] On Behalf Of Antoine Durr
>>>> Sent: Tuesday, July 08, 2008 10:25 AM
>>>> To: sidefx-houdini-list at sidefx.com
>>>> Subject: Re: [Sidefx-houdini-list] computing world space velocity
>>>>
>>>> If you do an object_merge, and set the 'transform space' to '.', the
>>>> geometry will now be in worldspace.  The trail SOP will work as
>>>> expected, now.
>>>>         
>>> Sort of. The object merge needs to be in a network that has an  
>>> identity OBJ
>>> (not an animated OBJ) for it to correctly import the points in  
>>> world space.
>>> This is what led me to a separate SOP network to compute world-space
>>> velocity, as I described below... which seems wrong.
>>>
>>> Is there any way to compute worldspace positions of points from  
>>> within a
>>> SOP? Is there any reason why that can't be done?
>>>       
>> I'm pretty sure the VEX ow_space() function(s) will transform from
>> "object" (SOP) space to "world" (world) space.
>>
>> If you put down a
>>
>> Global(P)->Transform->Output
>>
>> Then set the parameters of the transform VOP to:
>>     space:world
>>     space:current
>>
>> (Yes, the VOP lies, space:world seems to work in SOPs just fine).
>> you should get the world space location of the points.
>>
>> You can also transform "direction vectors" (i.e. velocity) the same
>> way.  You may also be able to specify the full paths to objects, but
>> don't quote me on that.
>>
>> But, to be honest, I'm not 100% sure this answers the original  
>> question.
>>
>> If you want, there's also the "optransform" hscript expression
>> function, but that way seems ridiculously difficult.
>>
>>     
>>>>> I'm sure I'm missing something fairly easy here.
>>>>>
>>>>> We have geometry that is imported by nodes that animate at the
>>>>> OBJ level. I need to compute the velocity for use in a DOP. The
>>>>> trail SOP computes velocity based on the object space positions.
>>>>> How does one compute the world-space velocity?
>>>>>
>>>>> Right now, I'm creating another SOP network that imports the
>>>>> original object, uses a trail on that node, and then uses a copy
>>>>> attribute to apply it back to the original. This seems overly
>>>>> clunky.
>>>>>           




More information about the Sidefx-houdini-list mailing list