Found 4508 posts.
Search results Show results as topic list.
Technical Discussion » transparency and opacity
- jsmack
- 7803 posts
- Offline
Transparency is refraction–like glass or water–opacity is like the ‘alpha’ of the sample currently being shaded, although it is vector alpha, meaning the sample compositing is done per component, and can have a different alpha for red, green, or blue.
Houdini Learning Materials » Where to put [Glossiness, Specular & Ambient Occlusion] texture map in Matrasurface & Principled Shader?
- jsmack
- 7803 posts
- Offline
You don't use ao map, ao is baked lighting. If you want to use it as fake detail, you can multiply your diffuse color (base color) by the ao map. AO maps are for game engine renderers, where ray tracing does not occur.
Houdini Lounge » Fade in of geo based on Z position
- jsmack
- 7803 posts
- Offline
It sounds like you have two problems:
The second is simple depending on how complicated of a shader you are using. If you simply want a constant shader, you can use the Surface Color vop to get the point color/alpha as well as set a constant color. To apply the alpha to your shader, you need to premultiply the color by the alpha to fade it out as the alpha fades out. Multiply the color by the alpha and connect the result to Ce on a layer pack node. Then connect the alpha to the Of of that same layer pack. Then you can apply the layer pack as a material to your point cloud.
The first is best done in a shader, as getting Z-depth in geometry context requires looking up the camera, and applying a transform. To get Z distance in a shader, simply use “Pz” from the global variables node. Now how do we map distance to opacity? The smoothest way that is simplest is with the exponential function, this will look like ‘fog.’ Compute the exponential of negative Z distance, scaling the distance to control how quickly it fades out. Other methods that could be used are simply a fit or smooth function or quadratic, but these won't look as natural as an exponential. If you computed alpha in a shader, simply connect it to the Of of the layer pack, and multiply your color.
If you really want to get z-distance in sops, then you can use a few different methods. The simplest is using the uv texture node, but this will create screen space coordinates with distance as the uv attribute z component. If you like vex/wrangles, ptransform() can be used to transform the local position into camera space, making the z component the negative distance from camera. If vops are more your style, the same function is available as the transform vop. Then it is up to you how to map distance to Alpha.
- How do I map Camera Z to Alpha?
- How do I render with Alpha affecting Opacity?
The second is simple depending on how complicated of a shader you are using. If you simply want a constant shader, you can use the Surface Color vop to get the point color/alpha as well as set a constant color. To apply the alpha to your shader, you need to premultiply the color by the alpha to fade it out as the alpha fades out. Multiply the color by the alpha and connect the result to Ce on a layer pack node. Then connect the alpha to the Of of that same layer pack. Then you can apply the layer pack as a material to your point cloud.
The first is best done in a shader, as getting Z-depth in geometry context requires looking up the camera, and applying a transform. To get Z distance in a shader, simply use “Pz” from the global variables node. Now how do we map distance to opacity? The smoothest way that is simplest is with the exponential function, this will look like ‘fog.’ Compute the exponential of negative Z distance, scaling the distance to control how quickly it fades out. Other methods that could be used are simply a fit or smooth function or quadratic, but these won't look as natural as an exponential. If you computed alpha in a shader, simply connect it to the Of of the layer pack, and multiply your color.
If you really want to get z-distance in sops, then you can use a few different methods. The simplest is using the uv texture node, but this will create screen space coordinates with distance as the uv attribute z component. If you like vex/wrangles, ptransform() can be used to transform the local position into camera space, making the z component the negative distance from camera. If vops are more your style, the same function is available as the transform vop. Then it is up to you how to map distance to Alpha.
Technical Discussion » Using VEX to create groups by attribute
- jsmack
- 7803 posts
- Offline
Why are you binding all of your variables to attributes, is this just for testing?
You also appear to be looping over the points, and comparing index to id. Normally, you can just bind id since you are building the group name directly from id anyways.
your code can be simplified to:
You also appear to be looping over the points, and comparing index to id. Normally, you can just bind id since you are building the group name directly from id anyways.
your code can be simplified to:
string prefix = chs("prefix"); string groupname = sprintf("%s_%d", prefix, @id); setpointgroup(0, groupname, @ptnum, 1);
Technical Discussion » Two Questions about Displacement
- jsmack
- 7803 posts
- Offline
What do you mean “from scratch?” The only displacement supported in the viewport is texture based, AFAIK. You can build a displacement shader from nodes, but only a single texture map can be linked to the viewport. You can link it by tagging the parameter with an opengl tag, associating the parameter with the opengl property.
It might be possible to create your own glsl shader for displacement, but there won't be any vex functions available, such as noise.
It might be possible to create your own glsl shader for displacement, but there won't be any vex functions available, such as noise.
Technical Discussion » Mantra: Ignore Of/Opacity and add all samples together
- jsmack
- 7803 posts
- Offline
You can't have different opacity rules for different image planes, the image planes are simply information that was already available to record. If an object is obscured in the beauty pass, then no rays are hitting the surface, and there is nothing to record to the alternate image planes. Create a separate mantra rop for each set of visibility rules you need.
For your first request, you need to create a rop for each object that has primary visibility, and specify the remaining objects as phantom (if you want shadows/reflections.)
To create an additive pass, where every object has no opacity, export the color value to Ce, and export zero to Of.
For your first request, you need to create a rop for each object that has primary visibility, and specify the remaining objects as phantom (if you want shadows/reflections.)
To create an additive pass, where every object has no opacity, export the color value to Ce, and export zero to Of.
Technical Discussion » Context Sensitive Popup Help with weird format
- jsmack
- 7803 posts
- Offline
Technical Discussion » Two Questions about Displacement
- jsmack
- 7803 posts
- Offline
Technical Discussion » Position pop Node
- jsmack
- 7803 posts
- Offline
I don't see the importance of distinguishing between ‘POP’ DOPs and others, they simply operate on geometry, and there are plenty of use cases where you would use ‘POP’ dops in flip/bullet/wire/fem simulations. vop contexts are ripe for filtration, however.
Technical Discussion » Ocean Waves doesn't render properly
- jsmack
- 7803 posts
- Offline
Technical Discussion » VDB questions
- jsmack
- 7803 posts
- Offline
- VDB primitives lack min/max intrinsics, but you can use a volume slice and play with min/max values and watch the colors.
- Why would you want a value spreadsheet? A list of millions of values seems of little use. The volume slice SOP is useful for visualizing ranges/prevalence of values.
- There is no multi-frame vdb storage container that I know of. If you want to make an archive just for storage purposes, you could tarball or zip them up. For rendering/use they would need to be extracted.
Technical Discussion » Packed Disk Sequence Questions
- jsmack
- 7803 posts
- Offline
The Blend SOP supports spherical blending of transforms for packed primitives. Will the packed disk sequence perform similar blending of rotation matrices when the file contains packed primitives?
Technical Discussion » Intro to Particles (DOPS)
- jsmack
- 7803 posts
- Offline
Constant birth rate is statistical. The rate is average per second. Under the hood it uses a scatter though, so if your rate is too low, you might just get no particles per frame. If I need something rhythmic or some other precise source control, I use a source set to ‘all points’, and generate the points to be added per time step in sops.
Technical Discussion » Different Point Normals in box primitive between 15.5 and 16
- jsmack
- 7803 posts
- Offline
twod
You can save as default, then edit ~/houdini16.0/display.prefs and delete the prefs you don't want (it's a text file). And always do save as default from a fresh session. Don't know about mantra properties though.
Thanks, I'll consider that.
Technical Discussion » 3-vector to ramp ?
- jsmack
- 7803 posts
- Offline
What you are asking doesn't make sense. A ramp is one-dimensional, position vector is a 3-space. You can't simply map one to the other implicitly. You can do what BabaJ said and map each axis to its own ramp, but then you end up with 3 values. It depends on what you are after. Think about what you are trying to achieve. Various scalar mappings can be embedded in 3-space, such as distance functions. For example, you could fit the distance to the origin into a ramp to make a radial ramp pattern, or use an unsigned box function to make a distance to a cube. If you take the 3 axes and plug into 3 ramps, and combine the values into a color, you've just created a cube 3D LUT. Unfortunately there is no native ‘3d lut’ widget to allow for directly editing a 3-space to color mapping, so 3 scalar ramps will have to do. You could look into a color grading package like Davinci Resolve for a more comprehensive tool to create 3D cube luts.
Houdini Learning Materials » How to translate an alembic transform node?
- jsmack
- 7803 posts
- Offline
Have you tried the Alembic Archive object node?
It has the option to build out the hierarchy with all the transforms instantiated as nodes. Using “Import Alembic…”
from the File menu will use this method.
Creating a rudimentary ‘prop rig’ can be achieved simply with transforms inserted between groups/shapes and alembic transform nodes. The Subnet or Null object is used to apply a transform to its children.
The Alembic SOP will load a flattened hierarchy, or a single shape node's geometry.
It has the option to build out the hierarchy with all the transforms instantiated as nodes. Using “Import Alembic…”
from the File menu will use this method.
Creating a rudimentary ‘prop rig’ can be achieved simply with transforms inserted between groups/shapes and alembic transform nodes. The Subnet or Null object is used to apply a transform to its children.
The Alembic SOP will load a flattened hierarchy, or a single shape node's geometry.
Technical Discussion » Different Point Normals in box primitive between 15.5 and 16
- jsmack
- 7803 posts
- Offline
edward
If you click on Save as defaults in the Display Options, I thought that saved to your ~/houdiniX.Y? I think this only determines the default for new scenes though.
I don't like saving the display options as defaults, because it saves every setting. I don't want color correction or background images to be saved into the defaults. Because that's only for the viewport preference, how do I go about altering a render property default?
Technical Discussion » Different Point Normals in box primitive between 15.5 and 16
- jsmack
- 7803 posts
- Offline
Anyone know if it is possible to set defaults to revert to the pre-16 behavior? Saving defaults from a scene viewer only affects that desktop, and doesn't affect mantra renders. Ideally there is some env var that can be set.
Houdini Lounge » Round Edge Shader
- jsmack
- 7803 posts
- Offline
Technical Discussion » How to use Hscript to link an attribute in a channel
- jsmack
- 7803 posts
- Offline
I believe you are looking for the point() expression.
http://www.sidefx.com/docs/houdini/expressions/point [sidefx.com]
http://www.sidefx.com/docs/houdini/expressions/point [sidefx.com]
-
- Quick Links