Plain Houdini tricks in Softimage style, Volume 00001

Forum for users who have migrated or are migrating to Houdini
User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by Mathaeus » 22 Mar 2015, 18:49

Ok, back to topic, or more precisely, closer to topic. I've planned to say something about VDB modeling, here. In meantime, discovered a comprehensive, free tutorial on SideFX site telling so much more and better than I could.

Another idea was a short description of 'nurbs filleting over mesh', like in pic bellow. But, it seems there are a bit too much of forth - back steps with this thing, required to get it to work so so properly (as usual...) than I'm able to describe in short tutorial. So, change in plan. I've started thread on od force. It's focused on tool, which I hope it will be usable for (almost) any user, one day. For now it's working, but with good chance to output some weirdness, too.

Image

Pancho
Posts: 659
Joined: 19 Sep 2010, 11:28

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by Pancho » 16 Nov 2015, 23:15

The fillets look great. I'll take a look at the oddForce thread.

Quick question. Anybody an idea how to get the position of the camera inside of an attribute vop? Like cmr.kine.Global.pos?

I managed to get the coordinates inside of a transform node via origin("", "/obj/cmr", "TX"), but inside the attribute vop (former vop sop) I have no clue how to do this.

Thanks for any tips!
Tom

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by Mathaeus » 17 Nov 2015, 00:58

Pancho wrote:The fillets look great. I'll take a look at the oddForce thread.

Quick question. Anybody an idea how to get the position of the camera inside of an attribute vop? Like cmr.kine.Global.pos?

I managed to get the coordinates inside of a transform node via origin("", "/obj/cmr", "TX"), but inside the attribute vop (former vop sop) I have no clue how to do this.

Thanks for any tips!
Tom
There's optransform function, returns global transform matrix of nulls, bones and so, you can use it directly in attribute VOP. Believe it works with camera, too. How to setup the thing, there are a few optranforms in scene I've posted here, post #15, or just do a search for optransform over odforce.

Pancho
Posts: 659
Joined: 19 Sep 2010, 11:28

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by Pancho » 17 Nov 2015, 01:33

Thanks! Somebody else also posted a similar approach on the oddForum. So many logs today to stumble across. Horrbile. But thanks to all the users who helped me up on my feet again.

P.S.: In this regard H feels just weird compared to SI. No $ sign, upper and lowercase differences, @ sign or phython code who made life miserable. Just pure logical camera.kine.global.pos, from whereever you needed this information.

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by Mathaeus » 17 Nov 2015, 02:02

Pancho wrote:Thanks! Somebody else also posted a similar approach on the oddForum. So many logs today to stumble across. Horrbile. But thanks to all the users who helped me up on my feet again.

P.S.: In this regard H feels just weird compared to SI. No $ sign, upper and lowercase differences, @ sign or phython code who made life miserable. Just pure logical camera.kine.global.pos, from whereever you needed this information.
It seems they are working on some unification. Optransform is probably fastest option (to evaluate), I think.

anhungxadieu
Posts: 175
Joined: 17 Apr 2014, 10:39
Skype: nguyenvuducthuy

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by anhungxadieu » 13 Jul 2016, 12:35

hi,
regarding Houdini stuff recently i have an practice with alembic workflow from 3dsmax to houdini. And i get lost when i try to extract orientation form that in order to use it like an point template to use with copysop. i write a little bit of python code to extract the transform data but when i try to turn it into orientation via atributeVop it only transfer one transform i think the problem regarding to @ptnum but i dont know how to do it right now... :(
any idea? thank in advance! :D
here is a simple python code to extract the transform data

Code: Select all

import _alembic_hom_extensions as abc
node = hou.pwd()
geo = node.geometry()

# Add code to modify contents of geo.
# Use drop down menu to select examples.
abcPath = "D:/thuy_max/00_max/export/OBJ/soleil/SOLEIL_LOCATION_thuy_00_export/test.abc"
sampleTime = 1
x4_attrib = geo.addAttrib(hou.attribType.Point, "m4", ( 0.0, 0.0, 0.0, 0.0,
                                                        0.0, 0.0, 0.0, 0.0,
                                                        0.0, 0.0, 0.0, 0.0,
                                                        0.0, 0.0, 0.0, 0.0))
x3_attrib = geo.addAttrib(hou.attribType.Point, "m3", ( 0.0, 0.0, 0.0,
                                                        0.0, 0.0, 0.0,
                                                        0.0, 0.0, 0.0 ))                                                            
ori_attrib = geo.addAttrib(hou.attribType.Point, "ori",(  0.0, 0.0, 0.0 ))
for prim, point in zip(geo.prims(), geo.points()):
    objectPath = prim.attribValue("path")
    abcXform = abc.getLocalXform(abcPath, objectPath, sampleTime)[0]
    x4 = hou.Matrix4(abcXform)
    x3 = x4.extractRotationMatrix3()
    srt = x4.explode(pivot = point.position())
    point.setAttribValue(x4_attrib, x4.asTuple())
    point.setAttribValue(ori_attrib, srt["rotate"])
    print srt["rotate"]

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by Mathaeus » 13 Jul 2016, 19:28

anhungxadieu wrote:hi,
regarding Houdini stuff recently i have an practice with alembic workflow from 3dsmax to houdini. And i get lost when i try to extract orientation form that in order to use it like an point template to use with copysop. i write a little bit of python code to extract the transform data but when i try to turn it into orientation via atributeVop it only transfer one transform i think the problem regarding to @ptnum but i dont know how to do it right now... :(
any idea? thank in advance! :D
here is a simple python code to extract the transform data
As far as I know, orientation used later for point instancing, it is defined by 'orient' per point attribute which is quaternion, 4d vector. Alternatively, two non-parallel 3d vectors, 'up' and 'N' (really don't know which method have precedence in case both are used). Don't know why you're using Python for that, should be several times slower than Point VOP or VEX code. Have no idea what is going wrong. When we are about speed, also don't know anything about stamping, always been too slow to be considered for anything.
By the way, perhaps is better to ask on Houdini forums or in new thread here, instead of forcing me to remind what on the earth I did few years ago :) in software I'm not using today, that much.

anhungxadieu
Posts: 175
Joined: 17 Apr 2014, 10:39
Skype: nguyenvuducthuy

Re: Plain Houdini tricks in Softimage style, Volume 00001

Post by anhungxadieu » 13 Jul 2016, 19:39

thanks Matheus,
i found it very simple, but took me one week to find omg! anyway thanks
solution is here don't need any python code :))
2016-07-14 at 00-40-56.jpg

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests