phiru Posted January 15, 2008 Share Posted January 15, 2008 hi...I would like to extract colour information from a texture on a given piece of geometry and use this attribute to scatter points over the given surface...how would i go abt this?any help deeply appreciated!!! Quote Link to comment Share on other sites More sharing options...
symek Posted January 15, 2008 Share Posted January 15, 2008 (edited) check in texport expressions: >> exhelp pic >> exhelp tex check also in VOPs SOP: there is a texture VOP, you can apply texture colour to points (you will need to apply UV first) VEX way will be also much faster what can be important if you deal with heavy geometry. cheers, sy. EDIT: there is also a plenty posts about this here and on SESI forum. Just search Edited January 15, 2008 by SYmek Quote Link to comment Share on other sites More sharing options...
phiru Posted January 17, 2008 Author Share Posted January 17, 2008 hey thanks for giving me some direction....i used tex() to colour the geometry according to its texture, but i managed to do this only with an image stored on disk...i feel like a real dud for asking this but i think ull have to break this down even further for me. when i want to use the tex option to extract the colour of the texture exactly the way its mapped on the geometry could i use the same function?if yes what would my string diskfile have to read...does just the name of the image mapped on the geometry suffice? right now my expression reads tex("name of the image mapped on the geometry", $MAPU,, $MAPV, D_CR) and then with D_CG and D_CB in the three parameter values for ad colour in a point sop this just colours my geometry a bit but there is no sign of colour based on the image... Im very unfamiliar with vops so i opted for this method...:/ hellp!!!! Quote Link to comment Share on other sites More sharing options...
symek Posted January 17, 2008 Share Posted January 17, 2008 well, I don't have Houdini at the front of me (11 inch display ) but: 1) I'm not sure what does it mean "extract the colour of the texture exactly the way its mapped on the geometry"? Since both tex and pic use UVs in exactly the same way as Mantra during render. If you mean that you'd like to process your texture the way it's done in your shader, you should possibly recreate this process in COPs (colour correct etc) 2) I strongly encourage you to try VOPs. They are easy, nice and fast! You need to apply your UVs first in SOP. Add VOPSOP and jump into it (press "i"). Add Global Variables VOP and Texture VOP. Wire U and V from Globals into Texture VOP, RMB on File input of Texture VOP to add Parameter. Wire Cd Texure VOP to Cd in Output VOP. Done. (I hope I remember this correctly). If you want to point your VOP to image operator inside Houdini use syntex: op:/full_path_to_operator (e.i.: op:/img/image1/brightness) Quote Link to comment Share on other sites More sharing options...
peppino3d Posted November 28, 2008 Share Posted November 28, 2008 I'm interested in the same subject, I know how to get texture and pic infos, but how can I get the colour info from a shader attached to an object and use the value to emit particles? I hope it makes sense... Thanks Peppino well, I don't have Houdini at the front of me (11 inch display ) but:1) I'm not sure what does it mean "extract the colour of the texture exactly the way its mapped on the geometry"? Since both tex and pic use UVs in exactly the same way as Mantra during render. If you mean that you'd like to process your texture the way it's done in your shader, you should possibly recreate this process in COPs (colour correct etc) 2) I strongly encourage you to try VOPs. They are easy, nice and fast! You need to apply your UVs first in SOP. Add VOPSOP and jump into it (press "i"). Add Global Variables VOP and Texture VOP. Wire U and V from Globals into Texture VOP, RMB on File input of Texture VOP to add Parameter. Wire Cd Texure VOP to Cd in Output VOP. Done. (I hope I remember this correctly). If you want to point your VOP to image operator inside Houdini use syntex: op:/full_path_to_operator (e.i.: op:/img/image1/brightness) Quote Link to comment Share on other sites More sharing options...
michael Posted November 28, 2008 Share Posted November 28, 2008 check this tutorial... I'm pretty sure there is some info on getting the colour from a surface to emit particles... http://www.sidefx.com/index.php?option=com...&Itemid=132 Quote Link to comment Share on other sites More sharing options...
AdamJ Posted November 29, 2008 Share Posted November 29, 2008 Since you're coloring points with your image.. the geo needs to have enough resolution if you need to have small details visible. To emit the particle from the geo just use one/all of the color channels in the probablity field on the source pop. Here's an example.. picPops.zip Quote Link to comment Share on other sites More sharing options...
peppino3d Posted November 29, 2008 Share Posted November 29, 2008 Thanks, that would work but it's not what I'm looking for, what I'm trying to do is sample the shader attached to a geometry and use the color information for emitting points. This is simply an academic exercise but it would help me quite a lot understanding those gray areas of Houdini If you have a look at my file, you'll find I've put three different tecniques for emitting points based on color and the rightmost one is the one I can't get to work. Since you're coloring points with your image.. the geo needs to have enough resolution if you need to have small details visible. To emit the particle from the geo just use one/all of the color channels in the probablity field on the source pop. Here's an example.. emission_based_on_color_tecniques.hipnc Quote Link to comment Share on other sites More sharing options...
AdamJ Posted November 29, 2008 Share Posted November 29, 2008 I think that 'pic' expression is looking COPs op type..?? 'tex' seems to work though... tex(chs("../../shopnet1/v_decal1/map"),$MAPU,$MAPV,D_CLUM) Quote Link to comment Share on other sites More sharing options...
peppino3d Posted December 1, 2008 Share Posted December 1, 2008 Cool thanks I think that 'pic' expression is looking COPs op type..?? 'tex' seems to work though...tex(chs("../../shopnet1/v_decal1/map"),$MAPU,$MAPV,D_CLUM) 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.