catchyid Posted October 4, 2019 Share Posted October 4, 2019 Hi, I don't have any experience about this topic, so my question could be a total dumb I have a 3d model (i.e. alembic) with uv. My goal is to paint in 3D some colors on the model mesh (the painting is done procedurally) then save a uv map containing the procedural painting (let's say as .png). The goal is to load and use this newly generated texture in another shading program. Is this possible and how? Thanks, Quote Link to comment Share on other sites More sharing options...
StepbyStepVFX Posted October 4, 2019 Share Posted October 4, 2019 Hi, Have a look at the Bake Texture ROP https://www.sidefx.com/docs/houdini/nodes/out/baketexture.html This could help as well : Hope I understood correctly :-) 1 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted October 4, 2019 Share Posted October 4, 2019 (edited) Hi Khaled, you can transfer geometry shapes and attributes to pixel maps with VEX functions such as uvsample(), xyzdist(), primuv(), volumesample() and nearpoint() inside a VOP2COP Generator. I attached examples covering: Transferring attributes Blending image textures by attributes Tracing points Tracing closed 2D curves Tracing open 3D curves Tracing flattened meshes Sampling volumes Combining those should give you a good variety of procedural image painting options, either directly or for masking: Another option esp. for baking ambient occlusion or even rendering perspective views would be raytracing with the intersect() function. GEO_to_COPs.hipnc Edited October 5, 2019 by konstantin magnus 6 Quote Link to comment Share on other sites More sharing options...
catchyid Posted October 4, 2019 Author Share Posted October 4, 2019 Thaaaaaaaaaaaanks guys, I will look at your files you sent me Once more, thaaanks a lot Quote Link to comment Share on other sites More sharing options...
vinyvince Posted October 6, 2019 Share Posted October 6, 2019 (edited) On 04/10/2019 at 3:04 PM, konstantin magnus said: Hi Khaled, you can transfer geometry shapes and attributes to pixel maps with VEX functions such as uvsample(), xyzdist(), primuv(), volumesample() and nearpoint() inside a VOP2COP Generator. I attached examples covering: Transferring attributes Blending image textures by attributes Tracing points Tracing closed 2D curves Tracing open 3D curves Tracing flattened meshes Sampling volumes Combining those should give you a good variety of procedural image painting options, either directly or for masking: Another option esp. for baking ambient occlusion or even rendering perspective views would be raytracing with the intersect() function. GEO_to_COPs.hipnc Edited September 11, 2020 by vinyvince Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted October 7, 2019 Share Posted October 7, 2019 Hi Vincent, you can use those maps as masks when texturing. They transfer geometry information and potentially all sorts of attributes. Quote Link to comment Share on other sites More sharing options...
vinyvince Posted October 7, 2019 Share Posted October 7, 2019 (edited) r... Edited September 13, 2020 by vinyvince Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted October 7, 2019 Share Posted October 7, 2019 Yes, this is just a technical concept for getting all kinds of geometries and their attributes from GEO- to COP-context. You can potentially create very specific maps with this. But it's not necessarily meant to be fed directly to an artist. Quote Link to comment Share on other sites More sharing options...
Librarian Posted October 7, 2019 Share Posted October 7, 2019 Thanx @konstantin magnus for files Data (attributes Heaven) Quote Link to comment Share on other sites More sharing options...
vinyvince Posted April 23, 2022 Share Posted April 23, 2022 On 04/10/2019 at 3:04 PM, konstantin magnus said: Hi Khaled, you can transfer geometry shapes and attributes to pixel maps with VEX functions such as uvsample(), xyzdist(), primuv(), volumesample() and nearpoint() inside a VOP2COP Generator. I attached examples covering: Transferring attributes Blending image textures by attributes Tracing points Tracing closed 2D curves Tracing open 3D curves Tracing flattened meshes Sampling volumes Combining those should give you a good variety of procedural image painting options, either directly or for masking: Another option esp. for baking ambient occlusion or even rendering perspective views would be raytracing with the intersect() function. GEO_to_COPs.hipnc The snippest to grab N attribute from the obj and do the dot product mask doesn't seem to behave like it should, Doesn't look like reading N but i don"t see any error in the following snippet, did i miss something? Im under H19, py3: ------------- string geo_mesh = 'op:/obj/geo_1_textures/OUT'; // geometry path vector uv_tex = set(X, Y, 0.0); // texture space // assign image textures to UV coordinates vector tex_0 = colormap(tex_A, uv_tex); vector tex_1 = colormap(tex_B, uv_tex); vector N = uvsample(geo_mesh, 'N', 'uv', uv_tex); // transfer normal attributes from geo float mask = clamp( dot(N, {0,1,0}), 0.0, 1.0); // create mask based on normals direction mask= pow(mask,0.8); vector tex_diff = lerp(tex_0, tex_1, mask); // blend textures dependent on mask vector color = tex_diff; // assigns texture to color vector assign(R, G, B, color); // color vector gets assigned to R, G and B color components Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted April 23, 2022 Share Posted April 23, 2022 43 minutes ago, vinyvince said: do the dot product mask doesn't seem to behave like it should Hi Vincent, it seems to work on my side. Did you fill the image paths? Quote Link to comment Share on other sites More sharing options...
vinyvince Posted April 23, 2022 Share Posted April 23, 2022 (edited) Yes Konstantin. It's just when i blur the normal or even add a noise to it, the mask doesn't seem to react. Very basic but i can't get the proper mask in the the Cop snippet right... Off course i can't get it in SOP, but i will rather like pixel than point Edited April 23, 2022 by vinyvince Quote Link to comment Share on other sites More sharing options...
vinyvince Posted April 23, 2022 Share Posted April 23, 2022 (edited) Here thats working to import N Edited April 23, 2022 by vinyvince 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.