[Sidefx-houdini-list] Skin SOP Flipping

Dante Allegria danteallegria at yahoo.ca
Sat Jan 7 00:43:22 EST 2006


--- Rick Walia <rickw at the-mill.com> wrote:

> I have uploaded the sample file here:
> 
> http://www.yourfilelink.com/get.php?fid=1038

Is your collision grid ever going to be more complicated? If not, then
what I would do is take a completely different approach altogether if
you just want to take a moving slice of your model. I took your file
and just rayed a tube slice onto the geometry from the outside. The
only problem I encountered was that the model had to be fixed first by
covering the hole it had and then adding a divide sop to convex it.

Try loading ProblemChild.hipnc and then sourcing the following script
into it via from the textport (or copy/pasting into there):

# Automatically generated script: Saturday January 07, 00:32
\set noalias = 1
set saved_path = `execute("oppwf")`
opcf /obj/Oluchi_PolyFilet_Cardinal

# Node tube1
opadd -n tube tube1
oplocate -x 19.8292 -y 22.7838 tube1
chblockbegin
chadd -t 4.96667 4.96667 tube1 rad1
chkey -t 4.96667 -v 2.1 -m 0 -A 0 -F
'max(bbox("../Source1_Out",D_XSIZE), bbox("../Source1_Out",D_ZSIZE))'
tube1/rad1
chadd -t 4.96667 4.96667 tube1 rad2
chkey -t 4.96667 -v 2.1 -m 0 -A 0 -F 'ch("./rad1")' tube1/rad2
chblockend
opparm tube1 stdswitcher ( 0 0 ) type ( poly ) surftype ( quads )
orient ( y ) t ( 0 0 0 ) rad ( rad1 rad2 ) height ( 0.04 ) imperfect (
on ) rows ( 4 ) cols ( 50 ) orderu ( 4 ) orderv ( 2 ) cap ( off )
chlock tube1 -*
chautoscope tube1 -*
opcolor -c 0.7 0.7 0.7 tube1
opset -d off -r off -h off -f off -y off -t off -l off -s off -u off -c
off -C on -p off -e on -b off tube1
opcf /obj/Oluchi_PolyFilet_Cardinal

# Node Add_Flipped_Normals
opadd -n point Add_Flipped_Normals
oplocate -x 19.7828 -y 21.5711 Add_Flipped_Normals
chblockbegin
chadd -t 4.96667 4.96667 Add_Flipped_Normals tx
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '$TX' Add_Flipped_Normals/tx
chadd -t 4.96667 4.96667 Add_Flipped_Normals ty
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '$TY' Add_Flipped_Normals/ty
chadd -t 4.96667 4.96667 Add_Flipped_Normals tz
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '$TZ' Add_Flipped_Normals/tz
chadd -t 4.96667 4.96667 Add_Flipped_Normals weight
chkey -t 4.96667 -v 1 -m 0 -A 0 -F '$WEIGHT' Add_Flipped_Normals/weight
chadd -t 4.96667 4.96667 Add_Flipped_Normals diffr
chkey -t 4.96667 -v 1 -m 0 -A 0 -F '$CR' Add_Flipped_Normals/diffr
chadd -t 4.96667 4.96667 Add_Flipped_Normals diffg
chkey -t 4.96667 -v 1 -m 0 -A 0 -F '$CG' Add_Flipped_Normals/diffg
chadd -t 4.96667 4.96667 Add_Flipped_Normals diffb
chkey -t 4.96667 -v 1 -m 0 -A 0 -F '$CB' Add_Flipped_Normals/diffb
chadd -t 4.96667 4.96667 Add_Flipped_Normals alpha
chkey -t 4.96667 -v 1 -m 0 -A 0 -F '$CA' Add_Flipped_Normals/alpha
chadd -t 4.96667 4.96667 Add_Flipped_Normals nx
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '-$NX' Add_Flipped_Normals/nx
chadd -t 4.96667 4.96667 Add_Flipped_Normals ny
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '-$NY' Add_Flipped_Normals/ny
chadd -t 4.96667 4.96667 Add_Flipped_Normals nz
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '-$NZ' Add_Flipped_Normals/nz
chadd -t 4.96667 4.96667 Add_Flipped_Normals mapu
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '$MAPU' Add_Flipped_Normals/mapu
chadd -t 4.96667 4.96667 Add_Flipped_Normals mapv
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '$MAPV' Add_Flipped_Normals/mapv
chadd -t 4.96667 4.96667 Add_Flipped_Normals mapw
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '$MAPW' Add_Flipped_Normals/mapw
chadd -t 4.96667 4.96667 Add_Flipped_Normals tension
chkey -t 4.96667 -v 1 -m 0 -A 0 -F '$TENSION'
Add_Flipped_Normals/tension
chadd -t 4.96667 4.96667 Add_Flipped_Normals springk
chkey -t 4.96667 -v 30 -m 0 -A 0 -F '$SPRINGK'
Add_Flipped_Normals/springk
chadd -t 4.96667 4.96667 Add_Flipped_Normals vx
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '$VX' Add_Flipped_Normals/vx
chadd -t 4.96667 4.96667 Add_Flipped_Normals vy
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '$VY' Add_Flipped_Normals/vy
chadd -t 4.96667 4.96667 Add_Flipped_Normals vz
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '$VZ' Add_Flipped_Normals/vz
chadd -t 4.96667 4.96667 Add_Flipped_Normals upx
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '$UPX' Add_Flipped_Normals/upx
chadd -t 4.96667 4.96667 Add_Flipped_Normals upy
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '$UPY' Add_Flipped_Normals/upy
chadd -t 4.96667 4.96667 Add_Flipped_Normals upz
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '$UPZ' Add_Flipped_Normals/upz
chadd -t 4.96667 4.96667 Add_Flipped_Normals pscale
chkey -t 4.96667 -v 1 -m 0 -A 0 -F '$PSCALE' Add_Flipped_Normals/pscale
chblockend
opparm Add_Flipped_Normals group ( "" ) stdswitcher ( 0 0 0 0 ) t ( tx
ty tz ) doweight ( off ) weight ( weight ) doclr ( off ) diff ( diffr
diffg diffb ) doalpha ( off ) alpha ( alpha ) donml ( on ) n ( nx ny nz
) douvw ( off ) map ( mapu mapv mapw ) domass ( off ) mass ( 1 ) drag (
1 ) dotension ( off ) tension ( tension ) dospringk ( off ) springk (
springk ) dovel ( off ) v ( vx vy vz ) doup ( off ) up ( upx upy upz )
dopscale ( off ) pscale ( pscale ) doinstance ( off ) instancepath ( ""
) doradius ( off ) radiusf ( 1 ) doscale ( off ) scalef ( 1 ) doradialf
( off ) radialf ( 0 ) donormalf ( off ) normalf ( 0 ) doedgef ( off )
edgef ( 0 ) dodirf ( off ) dirf ( 0 0 0 ) numcustom ( 1 )  apply1 ( on
) name1 ( "" ) val1i ( 0 0 0 0 ) sval1 ( "" )
chlock Add_Flipped_Normals -*
chautoscope Add_Flipped_Normals -*
opcolor -c 0.7 0.7 0.7 Add_Flipped_Normals
opset -d off -r off -h off -f off -y off -t off -l off -s off -u off -c
off -C off -p off -e on -b off Add_Flipped_Normals
opcf /obj/Oluchi_PolyFilet_Cardinal

# Node New_Skin
opadd -n ray New_Skin
oplocate -x 20.0105 -y 19.4431 New_Skin
opparm New_Skin group ( "" ) entity ( primitive ) collision ( "" )
method ( project ) dotrans ( on ) lookfar ( off ) putnml ( off )
putdist ( off ) rtolerance ( 0.01 ) scale ( 1 ) lift ( 0 ) sample ( 1 )
jitter ( 0 ) seed ( 1 ) newgrp ( off ) hitgrp ( rayHitGroup )
chlock New_Skin -*
chautoscope New_Skin -*
opcolor -c 0.7 0.7 0.7 New_Skin
opset -d on -r on -h off -f off -y off -t off -l off -s off -u off -c
off -C off -p off -e on -b off New_Skin
opcf /obj/Oluchi_PolyFilet_Cardinal

# Node Move_Centre
opadd -n xform Move_Centre
oplocate -x 21.1258 -y 20.4801 Move_Centre
chblockbegin
chadd -t 4.96667 4.96667 Move_Centre tx
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '-$CEX' Move_Centre/tx
chadd -t 4.96667 4.96667 Move_Centre tz
chkey -t 4.96667 -v 0 -m 0 -A 0 -F '-$CEZ' Move_Centre/tz
chblockend
opparm Move_Centre group ( "" ) grouptype ( guess ) xOrd ( srt ) rOrd (
xyz ) t ( tx 0 tz ) r ( 0 0 0 ) s ( 1 1 1 ) shear ( 0 0 0 ) p ( 0 0 0 )
scale ( 1 ) grppivot ( off ) updatenmls ( on ) vlength ( on )
invertxform ( off )
chlock Move_Centre -*
chautoscope Move_Centre -*
opcolor -c 0.7 0.7 0.7 Move_Centre
opset -d off -r off -h off -f off -y off -t off -l off -s off -u off -c
off -C off -p off -e on -b off Move_Centre
opcf /obj/Oluchi_PolyFilet_Cardinal

# Node Fix_Hole
opadd -n polycap Fix_Hole
oplocate -x 9.55781 -y 24.4926 Fix_Hole
opparm Fix_Hole group ( p856-791 ) reverse ( off ) triangulate ( off )
unique ( off ) updatenorms ( on )
chlock Fix_Hole -*
chautoscope Fix_Hole -*
opcolor -c 0.7 0.7 0.7 Fix_Hole
opset -d off -r off -h on -f off -y off -t off -l off -s off -u off -c
off -C off -p off -e on -b off Fix_Hole
opcf /obj/Oluchi_PolyFilet_Cardinal

# Node Convex
opadd -n divide Convex
oplocate -x 9.59744 -y 23.2444 Convex
opparm Convex group ( "" ) convex ( on ) numsides ( 3 ) planar ( on )
plantol ( 0.0001 ) smooth ( off ) weight ( 1 0.5 ) divs ( 1 ) brick (
off ) size ( 1 1 1 ) offset ( 0 0 0 ) angle ( 0 0 0 ) removesh ( off )
dual ( off )
chlock Convex -*
chautoscope Convex -*
opcolor -c 0.7 0.7 0.7 Convex
opset -d off -r off -h off -f off -y off -t off -l off -s off -u off -c
off -C off -p off -e on -b off Convex
opcf /obj/Oluchi_PolyFilet_Cardinal

opcf /obj/Oluchi_PolyFilet_Cardinal
opcf /obj/Oluchi_PolyFilet_Cardinal
opwire -n tube1 -0 Add_Flipped_Normals
opcf /obj/Oluchi_PolyFilet_Cardinal
opwire -n Add_Flipped_Normals -0 New_Skin
opwire -n Move_Centre -1 New_Skin
opcf /obj/Oluchi_PolyFilet_Cardinal
opwire -n Source1_Out -0 Move_Centre
opcf /obj/Oluchi_PolyFilet_Cardinal
opwire -n BakedFile -0 Fix_Hole
opcf /obj/Oluchi_PolyFilet_Cardinal
opwire -n Fix_Hole -0 Convex
opcf /obj/Oluchi_PolyFilet_Cardinal
opwire -n Convex -0 Anim_TY
opcf $saved_path



dante


	

	
		
__________________________________________________________ 
Find your next car at http://autos.yahoo.ca



More information about the Sidefx-houdini-list mailing list