fuzzylogic Posted May 12, 2010 Share Posted May 12, 2010 Sorry if this has been posted before, it should be simple (I think) but I can't get it to work. All I want to do is copy cubes onto points of a grid and have those cubes coloured the same as the point colour of the texture applied to the grid. Simples no? Please help Fz Quote Link to comment Share on other sites More sharing options...
J.Santos Posted May 12, 2010 Share Posted May 12, 2010 Sorry if this has been posted before, it should be simple (I think) but I can't get it to work. All I want to do is copy cubes onto points of a grid and have those cubes coloured the same as the point colour of the texture applied to the grid. Simples no? Please help Fz Hi! yes, it's simple. You just have to go to the attribute tab on your CopyNode and turn on "Use template Point Attributes"... I've attached a file, just in case you need (I also commented and used explicit names) boxToGridColored.hipnc Be cool Quote Link to comment Share on other sites More sharing options...
fuzzylogic Posted May 13, 2010 Author Share Posted May 13, 2010 Awesome, thank you... it seems I need to texture the picture at obj level not at sop level. Next question is how do I move each cube depending on the colour of the cube. If I texture the cube at obj how can I copy the colour info into a transform node for each individual cube and move it on the z-axis? Mrp FZ Quote Link to comment Share on other sites More sharing options...
anim Posted May 13, 2010 Share Posted May 13, 2010 there is a couple of ways, but the easiest/fastest would be to move individual points according to the color prior to Copy SOP there are even special attributes you can create on points prior to copy SOP to do other things like transform, scaling, rotating (trans, pscale, scale, N, v, orient, rot) but if you want to use texture info to do other things, you'll need to use Copy Stamping Technique, which is very powerful, but i would use it as the last option, because it is the slowest of mentioned ways (if you do a little search in forums, there is huge amount of threads about copying, copystamping, instancing, also in help trere is valuable info, also many tutorials on web) here is an example of texturing the grid points at SOP level as well as pushing them along normals according to texture luma then copying and coloring boxes on them boxToGridTextured.hipnc Quote Link to comment Share on other sites More sharing options...
J.Santos Posted May 14, 2010 Share Posted May 14, 2010 Hey Anim I like the way you name and organize your nodes Nice example you gave! A bit out of my league yet, with that Vop SOP... anyway, I was thinking in a different and (IMO) easier approach... if what he wants is to be able to move certains points along the z-axis, according to color information, couldn't he just randomly (or any other way) color the grid points and then use a partition node, with the rule "group by color" to create groups that would then be feed into a transform node and moved? This is an answer and a question at the same time... eheheh - sorry if this is a bit of an hijack of your thread fuzzylogic! Quote Link to comment Share on other sites More sharing options...
anim Posted May 14, 2010 Share Posted May 14, 2010 ... Hey Anim I like the way you name and organize your nodes ... a little leftover from your example ... anyway, I was thinking in a different and (IMO) easier approach... if what he wants is to be able to move certains points along the z-axis, according to color information, couldn't he just randomly (or any other way) color the grid points and then use a partition node, with the rule "group by color" to create groups that would then be feed into a transform node and moved? ... he can color it randomly, but he want to color it by texture as he said so either VOP SOP (very fast) or Attribute Create SOP with tex()/pic() expression (very slow) it won't help you to group by colors, it'll just create many groups. You still need to access the color info to get its value and move points by it, then again either VOP SOP or Point SOP or Copystamping there is many ways to do this, but i think VOP SOP is the easiest/fastest one ok, maybe not easiest for the beginner but deffinitely worth learning it Quote Link to comment Share on other sites More sharing options...
J.Santos Posted May 14, 2010 Share Posted May 14, 2010 there is many ways to do this, but i think VOP SOP is the easiest/fastest oneok, maybe not easiest for the beginner but deffinitely worth learning it Ahhh... ok! Your explanation makes perfect sense! I see I can't run forever from VOP's... thanks for taking the time to explain this! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.