Random primitive selection changing over time progressively (City Lights Windows timelapse)?

   1772   6   2
User Avatar
Member
408 posts
Joined: June 2015
Offline
I'm trying to create a random selection of primitives, of all the windows of the buildings of a city-scape, and have it change progressively over time. I'll use the attribute of that selection to generate lights (Geo with self-Lit Material) to simulate people turning on and off the lights in their apartments / offices.

I've been trying to achieve that with a Sort node (Primitive sort Random) and a blast node with some expressions, but my vex skills are quite poor and i'm hitting a brick wall on this one.

Any idea how to go about it please?

Cheers,

A.
Edited by Adriano - Feb. 7, 2018 22:33:51
User Avatar
Member
260 posts
Joined: Nov. 2014
Offline
different approach: generate 0-1 values on your prims (fame based seed) and read them in material/emission/what ever you use to make windows shine?
User Avatar
Member
408 posts
Joined: June 2015
Offline
martinkindl83
fame based seed

Hey Martin, thanks for your reply, Could you please elaborate a bit more. Do you have an example of the expression i could use to create that “frame based seed” to create those 0-1 values please?

Cheers,

A.
User Avatar
Member
483 posts
Joined: Dec. 2006
Offline
See: http://www.sidefx.com/docs/houdini/model/attributes.html [www.sidefx.com]

Shading

shop_materialpath string

The path to a material to use to shade the surface when rendering. Overrides the object’s material is present on primitives.

On detail, prim

attached is a simple example

simply animate the sort or use a channel in the wrangle… whatever you like.

=============================
sorry, forgotten to say, you can use this to assign different groups, too
and then assign materials by group.
Edited by matthias_k - Feb. 8, 2018 15:38:58

Attachments:
material_by_modulo.hip (304.4 KB)
material_by_modulo_anim.hip (423.5 KB)
material_by_modulo.jpg (279.8 KB)

English is not my native language, sorry in advance for any misunderstanding :-)
User Avatar
Member
408 posts
Joined: June 2015
Offline
Thanks a lot, Matthias, sorry for the late reaction, forgot to subscribe to my own post. I'm gonna have a look at it right away. Much appreciated! Cheers.
User Avatar
Member
483 posts
Joined: Dec. 2006
Offline
no problem

some more solutions to get the lights animated ;-)

Attachments:
material_by_modulo_anim_02.hip (466.8 KB)

English is not my native language, sorry in advance for any misunderstanding :-)
User Avatar
Member
408 posts
Joined: June 2015
Offline
Thanks Matthias, interesting stuff, cheers for that.

But it still doesn't really solve my issue here. Although the attribute transfer method made me think of a bit of an overkill solution that could however work in my case without having to science the S out of this. I'm just going to use POPs and generated random particles with a short random lifespan and use the generated particle (sphere or boxes, whatever works) and transfer attributes from those onto my city scape. Going to be heavy, but i don't have an other solution right now.

Thanks again.

A.
  • Quick Links