magneto Posted November 23, 2011 Share Posted November 23, 2011 Hi, I have learnt about the Paint SOP a while ago, and now I actually needed a way to paint primitives to later identify them. So for instance say you have a 10x10 Grid. I want to be able to paint on this, by roughly painting on their center, instead of painting on top of points. So I want to use 1 brush to mark them as grass, another brush to mark them as rock, another to mark them as water, etc. If I could do it just like I can paint points, then I could use different colors to differentiate them. But it seems like Paint SOP adds attributes to points, right? Is there a way to accomplish this? Quote Link to comment Share on other sites More sharing options...
ehsan parizi Posted November 23, 2011 Share Posted November 23, 2011 Hi, I have learnt about the Paint SOP a while ago, and now I actually needed a way to paint primitives to later identify them. So for instance say you have a 10x10 Grid. I want to be able to paint on this, by roughly painting on their center, instead of painting on top of points. So I want to use 1 brush to mark them as grass, another brush to mark them as rock, another to mark them as water, etc. If I could do it just like I can paint points, then I could use different colors to differentiate them. But it seems like Paint SOP adds attributes to points, right? Is there a way to accomplish this? I'm not sure if you can directly paint the primitives, but you can use a attribute promote after your paint sop, and change your Cd from Point to Primitive.but it's not exactly what you want. Quote Link to comment Share on other sites More sharing options...
3dbeing Posted November 23, 2011 Share Posted November 23, 2011 why can't you just group the prims then colour by group? Quote Link to comment Share on other sites More sharing options...
magneto Posted November 23, 2011 Author Share Posted November 23, 2011 I'm not sure if you can directly paint the primitives, but you can use a attribute promote after your paint sop, and change your Cd from Point to Primitive.but it's not exactly what you want. I did it so that I overrode Color (Cd), then used a Group SOP to select the prims but yeah this gives me prims if all of its points are painted. I could probably do it so that if any of its points are painted, it would include the prim. But this requires painting on verts and will add more prims than desired. I explain the use case below. why can't you just group the prims then colour by group? I could do that but this DA I want to make, I want to give artists the ability to paint on any prims and populate them with the right models. So they will have the control to paint on any prim, anything they want as defined by what type of brush it is. Quote Link to comment Share on other sites More sharing options...
ehsan parizi Posted November 23, 2011 Share Posted November 23, 2011 (edited) I think in order to make it work perfectly, you need some python coding, or at least I don't know any other way. But a hack could be this, use a facet sop before your paint sop, and check the unique points in it, and then paint, and after that, use a attribpromote and change promotion method to maximum. if you make a new attribute that gets a value of 1 when your color attribute is bigger than 0, then I think that would work. Edited November 23, 2011 by ehsan parizi Quote Link to comment Share on other sites More sharing options...
magneto Posted November 23, 2011 Author Share Posted November 23, 2011 I think in order to make it work perfectly, you need some python coding, or at least I don't know any other way. But a hack could be this, use a facet sop before your paint sop, and check the unique points in it, and then paint, and after that, use a attribpromote and change promotion method to maximum. if you make a new attribute that gets a value of 1 when your color attribute is bigger than 0, then I think that would work. Thanks Ehsan. I wasn't aware of attribpromote. But what's the use of Facet SOP here? I am not sure, just wondering. Also another thing that I was thinking is if I could get each prim in the Grid and place a point in the center of them that divides them and creates 4 extra edges. Is there a SOP for this? I am gonna see if there is a way to do this too. Quote Link to comment Share on other sites More sharing options...
ehsan parizi Posted November 23, 2011 Share Posted November 23, 2011 each primitive by default is sharing some points with neighbour prims, facet sop in this case, creates unique points for each primitive. so each primitive has its own unique points that is not sharing with other prims. check out the attached file. I don't know about that, but try divide sop, maybe that helps. color_prims.hipnc Quote Link to comment Share on other sites More sharing options...
magneto Posted November 23, 2011 Author Share Posted November 23, 2011 Thanks Ehsan, that's pretty good prototype. Appreciate it alot. Quote Link to comment Share on other sites More sharing options...
ehsan parizi Posted November 23, 2011 Share Posted November 23, 2011 you're welcome. good luck with your digital asset. by the way, if you want to use that method, you probably have to change the value of the attribute that you create to if($CR>0.3,1,0) from if($CR>0,1,0) because if you wanna delete the color, that would work better. Quote Link to comment Share on other sites More sharing options...
magneto Posted November 23, 2011 Author Share Posted November 23, 2011 Thanks Ehsan, appreciate your help as always Quote Link to comment Share on other sites More sharing options...
Tom Posted November 23, 2011 Share Posted November 23, 2011 Im doing the same thing but I left this to later time, to learn more stuff. Quote Link to comment Share on other sites More sharing options...
magneto Posted November 23, 2011 Author Share Posted November 23, 2011 Awesome Tom, I will be sure to check it out for ideas I downloaded the first file and painted on the grid but didn't see any change. Is it supposed to be a non-interactive tool? Quote Link to comment Share on other sites More sharing options...
Tom Posted November 24, 2011 Share Posted November 24, 2011 Its half-interactive, you need to template last node to see result. Seems i uploaded non working version, you can fixit by just chosing "select" group un scatter points node. Here is working version, check also old school hip files GRASS_GEN_v1.hipnc Quote Link to comment Share on other sites More sharing options...
magneto Posted November 24, 2011 Author Share Posted November 24, 2011 Its half-interactive, you need to template last node to see result. Seems i uploaded non working version, you can fixit by just chosing "select" group un scatter points node. Here is working version, check also old school hip files Your sample looks pretty good. I will check old school's files as well. Thanks Tom. Quote Link to comment Share on other sites More sharing options...
Hendolph Posted March 26, 2019 Share Posted March 26, 2019 I know it's been a minute since the thread was active, but I kind of have the same problem and was wondering what you ended up doing to paint on the primitives. I basically paint boxes on a surface and depending on the attributes I paint, they have a different look. So far I've used the draw curve tool to paint curves and added custom parameters in the multiparm of the draw curve tool. This works fine, but the more curves I draw, the more tedious it gets to go through the tabs and change the attributes. That's why I though to use the Paint Tool to pick the attribute values beforehand and paint them onto the primitives. Now I realize that you can't actually do that and am looking for a workaround. Google keeps pointing me to this thread, so I thought I'd ask here. So, do you have any new insides on 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.