When I try to read a 2dArray I get an error!
WARNING: Failed to bind variable ‘texture’
This makes me think that 2D arrays are supported but I do not know how to list them in the file path parameter.
Found 7 posts.
Search results Show results as topic list.
Technical Discussion » GLSL Shaders - using 3d textures
- aschneider
- 77 posts
- Offline
Technical Discussion » GLSL Shaders - using 3d textures
- aschneider
- 77 posts
- Offline
Hello,
I have successfully set up a GLSL shader that reads a texture from disk with texture2D(<textureparametername>, pos.yx).
I would now like to read a 3d texture but I am unsure if Houdini even supports this with its user end GLSL shader builder, or what file format that I need to use.
I have tried adding the following lines:
uniform sampler3D texture; //texture being the name of my parameter that points to a bgeo volume, image or whatever the correct input format is)
float test = texture3D(texture,pos.xyz);
I do not get any errors but I get a value of zero back, regardless of where I set the pos.xyz value.
Because it is error free, I am assuming the problem is one of two situations:
1. It is supported but I am not using the right file format. (I tried bgeo and a single tga, I even looked into i3d, God help me)
2. It is not supported and the error is ignored in Houdini itself.
My question is this: If it is supported, what format do I need to use? Also is there anything else I need to do differently?
Again, i have a working case of a texture2D sample of a tga file. Also, I made sure that the 3dViewport was set to gl 2.1, which is the version of the GLSL shader that I am working with.
I have successfully set up a GLSL shader that reads a texture from disk with texture2D(<textureparametername>, pos.yx).
I would now like to read a 3d texture but I am unsure if Houdini even supports this with its user end GLSL shader builder, or what file format that I need to use.
I have tried adding the following lines:
uniform sampler3D texture; //texture being the name of my parameter that points to a bgeo volume, image or whatever the correct input format is)
float test = texture3D(texture,pos.xyz);
I do not get any errors but I get a value of zero back, regardless of where I set the pos.xyz value.
Because it is error free, I am assuming the problem is one of two situations:
1. It is supported but I am not using the right file format. (I tried bgeo and a single tga, I even looked into i3d, God help me)
2. It is not supported and the error is ignored in Houdini itself.
My question is this: If it is supported, what format do I need to use? Also is there anything else I need to do differently?
Again, i have a working case of a texture2D sample of a tga file. Also, I made sure that the 3dViewport was set to gl 2.1, which is the version of the GLSL shader that I am working with.
Technical Discussion » DOPS/FLUIDS - using 2 gasVorticleGeometry nodes on a sim
- aschneider
- 77 posts
- Offline
Hello again.
I ended up simply copying the vorticle sop network and passing two versions into a merge node. One version had a radius of .3 , count of 5000 and the other had a radius of .1 and a count of 15,000 to make up for all of the empty space. The result is exactly what I was looking for, high and low detail randomness in the simulation. Here are some images of the node network and the final result.
Thanks again for your help, tamte.
_andrew
I ended up simply copying the vorticle sop network and passing two versions into a merge node. One version had a radius of .3 , count of 5000 and the other had a radius of .1 and a count of 15,000 to make up for all of the empty space. The result is exactly what I was looking for, high and low detail randomness in the simulation. Here are some images of the node network and the final result.
Thanks again for your help, tamte.
_andrew
Technical Discussion » DOPS/FLUIDS - using 2 gasVorticleGeometry nodes on a sim
- aschneider
- 77 posts
- Offline
Well, when I start using per particle expressions I like to start with something easy to visualize (see image)
The way you suggested would work too.
For the approach I am taking (layering randomness rather than explicitly setting it per vorticle) I think it will be worth a try to test the method using a sop solver.
Thanks again. Ill let you know if it worked.
_andrew
The way you suggested would work too.
For the approach I am taking (layering randomness rather than explicitly setting it per vorticle) I think it will be worth a try to test the method using a sop solver.
Thanks again. Ill let you know if it worked.
_andrew
Technical Discussion » DOPS/FLUIDS - using 2 gasVorticleGeometry nodes on a sim
- aschneider
- 77 posts
- Offline
Thanks again for your reply.
I placed this expression in for the per-vorticle radius
if($TY>0,1-smooth($TY,0,2),0)*.1
this created a gradation of low detail turbulence to high detail turbulence along the Y axis of the fluid sim. However, it is extremely unstable and there are aberrations in the form of random density specks in the top section of the fluid box.
This is really interesting (I'm used to dealing with the black box that is Maya fluids) but there has to be a better way to layer this randomness. I mean, we are talking about merging two vorticle datasets into one. I'm trying to avoid writing a custom python node because it seems like there should be some kind of merge data node to do this.
_andrew
I placed this expression in for the per-vorticle radius
if($TY>0,1-smooth($TY,0,2),0)*.1
this created a gradation of low detail turbulence to high detail turbulence along the Y axis of the fluid sim. However, it is extremely unstable and there are aberrations in the form of random density specks in the top section of the fluid box.
This is really interesting (I'm used to dealing with the black box that is Maya fluids) but there has to be a better way to layer this randomness. I mean, we are talking about merging two vorticle datasets into one. I'm trying to avoid writing a custom python node because it seems like there should be some kind of merge data node to do this.
_andrew
Technical Discussion » DOPS/FLUIDS - using 2 gasVorticleGeometry nodes on a sim
- aschneider
- 77 posts
- Offline
Thanks for the reply.
So no, i guess
Controlling each scale and magnitude with an expression will take much longer to compute, I would think, but I will give it a try.
Thanks!
_andrew
So no, i guess
Controlling each scale and magnitude with an expression will take much longer to compute, I would think, but I will give it a try.
Thanks!
_andrew
Technical Discussion » DOPS/FLUIDS - using 2 gasVorticleGeometry nodes on a sim
- aschneider
- 77 posts
- Offline
Hello,
What I would like to do is add two GasVorticleGeometry nodes to the applyDataNode, each with different vorticle radii so that I have two levels or randomness in my fluid sim.
I am having trouble combining the two. I have tried a merge node between the two GasVorticleGeometey nodes and the apply data node as well as two apply data nodes being passed into a solver. I have also tried directly passing two GasVorticleGeometry nodes into the apply data node. In all cases, I only see the effects of the first GasVorticleGeometry node that I passed in. I feel like I am almost there but im missing something small. Do I need to name the “vorticles” datasets differently?
_aschneider
What I would like to do is add two GasVorticleGeometry nodes to the applyDataNode, each with different vorticle radii so that I have two levels or randomness in my fluid sim.
I am having trouble combining the two. I have tried a merge node between the two GasVorticleGeometey nodes and the apply data node as well as two apply data nodes being passed into a solver. I have also tried directly passing two GasVorticleGeometry nodes into the apply data node. In all cases, I only see the effects of the first GasVorticleGeometry node that I passed in. I feel like I am almost there but im missing something small. Do I need to name the “vorticles” datasets differently?
_aschneider
-
- Quick Links