Found 7 posts.
Search results Show results as topic list.
Houdini Indie and Apprentice » calculating neighbours of primitive cubes
- 212AA
- 7 posts
- Offline
Houdini Indie and Apprentice » calculating neighbours of primitive cubes
- 212AA
- 7 posts
- Offline
hmm, i need to obtain the diagonal neighbours also, so all the primitives that share a vertex with the primitive cube in question
Houdini Indie and Apprentice » calculating neighbours of primitive cubes
- 212AA
- 7 posts
- Offline
Hi there,
I was wondering how i might go about storing the neighbours of primitive cubes. i've packed the geometry so i have 1 ID per cube but i wanted to get some advice on how i might store each cube's neighbours, preferably in python?
I was wondering how i might go about storing the neighbours of primitive cubes. i've packed the geometry so i have 1 ID per cube but i wanted to get some advice on how i might store each cube's neighbours, preferably in python?
Houdini Indie and Apprentice » Particle collision with multiple primitives and changing to 1 colour value upon hit
- 212AA
- 7 posts
- Offline
Houdini Indie and Apprentice » Particle collision with multiple primitives and changing to 1 colour value upon hit
- 212AA
- 7 posts
- Offline
Hi there,
I'm trying to change the colour of a primitive once a particle collides with it….but i don't want to use an attribute transfer because that gives me a gradient of colour on the primitive and i want to change the colour back after it's been hit and have it be a solid colour.
So hit == green (0,1,0)
not hit == red(1,0,0)
Another problem i'm having is when i don't use an attribute transfer and write it in a python sop(code below) i change all the primitives colours in one go rather than individually where the the particle collides with each primitive.
Not sure how to go about this, but here is the file attached.Any help would be much appreciated.
CODE FOR HIT COUNTER AND PRIMITIVE CHANGE COLOUR
node = hou.pwd()
geo = node.geometry()
from hou.session import *
inputs = node.inputs() # bring in city searcher data
pointcolliders = inputs.geometry().points()
ship = geo.prims()
if hou.frame() == 1:
hitCount = 0
for p in pointcolliders:
store = p.attribValue(“hittotal”) # get hittotal attribute from the pop solver
hitCount += store # hitcount += store (to add number of hits to hou.session)
hits = store
green = (0.0,1.0,0.0)
red = (1.0,0.0,0.0)
#change colour of second input so object
for s in ship:
if hits == 1:
s.setAttribValue('Cd', green)
else:
s.setAttribValue('Cd', red)
I'm trying to change the colour of a primitive once a particle collides with it….but i don't want to use an attribute transfer because that gives me a gradient of colour on the primitive and i want to change the colour back after it's been hit and have it be a solid colour.
So hit == green (0,1,0)
not hit == red(1,0,0)
Another problem i'm having is when i don't use an attribute transfer and write it in a python sop(code below) i change all the primitives colours in one go rather than individually where the the particle collides with each primitive.
Not sure how to go about this, but here is the file attached.Any help would be much appreciated.
CODE FOR HIT COUNTER AND PRIMITIVE CHANGE COLOUR
node = hou.pwd()
geo = node.geometry()
from hou.session import *
inputs = node.inputs() # bring in city searcher data
pointcolliders = inputs.geometry().points()
ship = geo.prims()
if hou.frame() == 1:
hitCount = 0
for p in pointcolliders:
store = p.attribValue(“hittotal”) # get hittotal attribute from the pop solver
hitCount += store # hitcount += store (to add number of hits to hou.session)
hits = store
green = (0.0,1.0,0.0)
red = (1.0,0.0,0.0)
#change colour of second input so object
for s in ship:
if hits == 1:
s.setAttribValue('Cd', green)
else:
s.setAttribValue('Cd', red)
Edited by 212AA - Aug. 17, 2017 11:59:16
Houdini Indie and Apprentice » Random walker collides with boundary
- 212AA
- 7 posts
- Offline
Houdini Indie and Apprentice » Random walker collides with boundary
- 212AA
- 7 posts
- Offline
Hi there,
i've attached a file below, i'm trying to get multiple points that move around within a boundary to collide with the boundary and to carry on moving in their random manor. I prefer to have a solution in python or vex
Any help would be much appreciated
A
i've attached a file below, i'm trying to get multiple points that move around within a boundary to collide with the boundary and to carry on moving in their random manor. I prefer to have a solution in python or vex
Any help would be much appreciated
A
-
- Quick Links