Found 40 posts.
Search results Show results as topic list.
Technical Discussion » Align pillars so that they stay perpendicular to the road's bed
- som
- 40 posts
- Offline
Are you generating an ‘up’ as well? That helps to align the pillars. Make sure the normal up and tangents are orthogonal to eachother.
Houdini Engine for Maya » Is this even possible?
- som
- 40 posts
- Offline
What Kahuna031 suggested is the best idea.
I can add to his point by suggesting a workflow for sending multiple parts to houdini at the same time. Here you can still achieve a houdini->maya approach without tediously adding individual parts. what you can do is:
1) assign the parts(geometry) into several groups like Window_Type1, Window_Type2, door_Type1, door_Type2, etc.
2) Then inside of the houdini when you get your object merge, you will see in the primitive panel, of the geometry spreadsheet, the groups as “Window_Type1/geometry…” etc.
3) You can then parse the geometry in a wrangle to separate out the components.
But that being said, it may be a cute way for Houdini to parse out your models, but the fundamental logic of construction of a house will rely on the Houdini side of things. So you can use this approach to send multiple parts as a single input to Houdini for house construction but it will be better to have barebone construction of house first and then point instance the parts in place (Just like others advised).
I can add to his point by suggesting a workflow for sending multiple parts to houdini at the same time. Here you can still achieve a houdini->maya approach without tediously adding individual parts. what you can do is:
1) assign the parts(geometry) into several groups like Window_Type1, Window_Type2, door_Type1, door_Type2, etc.
2) Then inside of the houdini when you get your object merge, you will see in the primitive panel, of the geometry spreadsheet, the groups as “Window_Type1/geometry…” etc.
3) You can then parse the geometry in a wrangle to separate out the components.
But that being said, it may be a cute way for Houdini to parse out your models, but the fundamental logic of construction of a house will rely on the Houdini side of things. So you can use this approach to send multiple parts as a single input to Houdini for house construction but it will be better to have barebone construction of house first and then point instance the parts in place (Just like others advised).
Edited by som - Sept. 27, 2019 20:18:13
Houdini Learning Materials » Packed primitive collapsing
- som
- 40 posts
- Offline
Hey Nima,
Thanks for your reply. The glue sop works but I realized that increasing the substeps help as well without me adding additional nodes.
I am slowly learning how dops are working and I really appreciate all the help.
Regards,
Soumitra Goswami
Thanks for your reply. The glue sop works but I realized that increasing the substeps help as well without me adding additional nodes.
I am slowly learning how dops are working and I really appreciate all the help.
Regards,
Soumitra Goswami
Houdini Learning Materials » Packed primitive collapsing
- som
- 40 posts
- Offline
Hi,
I am trying to figure out DOPs and packed primitives. I have a tower of jenga blocks arranged like a jenga tower which I've created through a copy sop. What I want to do is have it rest and not collapse. I have assigned a rest node but my tower interpenetrates and collapse. I have attached a playblast and file so you know exactly what I mean.
Please help me out.
Thanks,
Regards,
Soumitra Goswami
I am trying to figure out DOPs and packed primitives. I have a tower of jenga blocks arranged like a jenga tower which I've created through a copy sop. What I want to do is have it rest and not collapse. I have assigned a rest node but my tower interpenetrates and collapse. I have attached a playblast and file so you know exactly what I mean.
Please help me out.
Thanks,
Regards,
Soumitra Goswami
Technical Discussion » HDK coding densities and volumes
- som
- 40 posts
- Offline
Hey Guys,
I am implementing Shen and Chen paper on Lattice Boltzmann Multi phase method into houdini. I have a custom grid and array of densities and velocities i have already calculated in the grid.
I want to visualize this in houdini. If someone could guide me to code this density array into a voxel based system.
Currently to visualize I am randomly adding particles to each grid based on the density and just using particleFluidSurface to make it into a mesh.
I do not like the result as it just looks like noise to me.
I know my data is right but the random point spreading is not visualizing the density right.
TLDR
So what I want to do is
1) transfer my custom voxel grid( c++ array) into HDK voxel grid
2) transfer my density and velocity calculations (c++ arrays) into that HDK voxel grid.
If anyone could help that would be great. I am attaching my hdk visualization code but I know its not the right way to do it.
void LBMFluid::Emit(UT_Vector3D pos, double density)
{
GA_Offset srcptoff = GA_INVALID_OFFSET;
GA_Offset vtxoff = my_gpp->giveBirth();
GA_Offset ptoff = gdp->vertexPoint(vtxoff);
gdp->setPos3(ptoff,pos);
myLife.set(ptoff,0,0);
myLife.set(ptoff,1,1);
mydensity.set(ptoff,0,density);
}
void LBMFluid::visualize(int NX, int NY, int NZ, fpreal now, vector <double> rho)
{
int pSize = my_gpp->getNumParticles();
//cleanup stage
for(GA_Size i = 0; i < pSize ; i++)
{
GA_Offset ptoff = my_gpp->vertexPoint(i);
int life = myLife.get(ptoff,0);
int death = myLife.get(ptoff,1);
if (life >=death)
{
my_gpp->deadParticle(i);
}
}
my_gpp->deleteDead();
gdp->destroyUnusedPoints();
//adding new points
for (int k = 0 ; k < NZ-1 ; k++)
{
for(int j = 0; j < NY-1; j++)
{
for(int i = 0; i < NX-1; i++)
{
int N = i + NX*j + NY*NY*k;
int size = (int)(rho * MAXPART(now) + 0.5);//rounding num particles
// cout << “Densities” << endl;
// cout << "Grid: " << size << endl;
for ( int n = 0 ; n < size; n++)
{
double x = i + ((double)rand()/RAND_MAX);
double y = j + ((double)rand()/RAND_MAX);
double z = k + ((double)rand()/RAND_MAX);
UT_Vector3D pos = UT_Vector3D(x,y,z);
Emit(pos,rho);
}
}
}
}
}
I am implementing Shen and Chen paper on Lattice Boltzmann Multi phase method into houdini. I have a custom grid and array of densities and velocities i have already calculated in the grid.
I want to visualize this in houdini. If someone could guide me to code this density array into a voxel based system.
Currently to visualize I am randomly adding particles to each grid based on the density and just using particleFluidSurface to make it into a mesh.
I do not like the result as it just looks like noise to me.
I know my data is right but the random point spreading is not visualizing the density right.
TLDR
So what I want to do is
1) transfer my custom voxel grid( c++ array) into HDK voxel grid
2) transfer my density and velocity calculations (c++ arrays) into that HDK voxel grid.
If anyone could help that would be great. I am attaching my hdk visualization code but I know its not the right way to do it.
void LBMFluid::Emit(UT_Vector3D pos, double density)
{
GA_Offset srcptoff = GA_INVALID_OFFSET;
GA_Offset vtxoff = my_gpp->giveBirth();
GA_Offset ptoff = gdp->vertexPoint(vtxoff);
gdp->setPos3(ptoff,pos);
myLife.set(ptoff,0,0);
myLife.set(ptoff,1,1);
mydensity.set(ptoff,0,density);
}
void LBMFluid::visualize(int NX, int NY, int NZ, fpreal now, vector <double> rho)
{
int pSize = my_gpp->getNumParticles();
//cleanup stage
for(GA_Size i = 0; i < pSize ; i++)
{
GA_Offset ptoff = my_gpp->vertexPoint(i);
int life = myLife.get(ptoff,0);
int death = myLife.get(ptoff,1);
if (life >=death)
{
my_gpp->deadParticle(i);
}
}
my_gpp->deleteDead();
gdp->destroyUnusedPoints();
//adding new points
for (int k = 0 ; k < NZ-1 ; k++)
{
for(int j = 0; j < NY-1; j++)
{
for(int i = 0; i < NX-1; i++)
{
int N = i + NX*j + NY*NY*k;
int size = (int)(rho * MAXPART(now) + 0.5);//rounding num particles
// cout << “Densities” << endl;
// cout << "Grid: " << size << endl;
for ( int n = 0 ; n < size; n++)
{
double x = i + ((double)rand()/RAND_MAX);
double y = j + ((double)rand()/RAND_MAX);
double z = k + ((double)rand()/RAND_MAX);
UT_Vector3D pos = UT_Vector3D(x,y,z);
Emit(pos,rho);
}
}
}
}
}
Technical Discussion » Cant assign values to UT_Matrix3D . HDK
- som
- 40 posts
- Offline
UT_Matrix3D res;
fpreal m00,m01,m02,m10,m11,m12,m20,m21,m22 = 0;
res.zero();
int size = myGDP->getPointMap().indexSize();
for(GA_Size i=0; i < size ; i++)
{
GA_Offset ptoff = myGDP->pointOffset(i);
UT_Vector3D pos = myPos.get(ptoff);
UT_Vector3D r = pos - mycog;
m00 += (r*r) + (r*r); m01 += -r*r; m02 += -r*r;
m10 += -r*r; m11 += r*r + r*r; m12 += -r*r;
m20 += -r*r; m21 += -r*r; m22 += r*r + r*r;
}
res = MASS(now) * UT_Matrix3D(m00,m01,m02,m10,m11,m12,m20,m21,m22);
for (int i = 0; i < 3 ; i++)
{
cout << “ old:” ;
fpreal val = 0;
for (int j = 0; j < 3; j++)
{
cout << “ ” << res;
if (fabsf((float)res) < 0.01)
{
res = val;
cout << “new: ” << res << endl;
}
}
cout << endl;
}
return res;
I have this code but it seems I cannot assign values to specific locations with the UT_Matrix3D . I have attached the console output.
Am I doing it wrong? is there a correct way to assign specific values.
Technical Discussion » Getting a list of unique edges in a geometry HDK
- som
- 40 posts
- Offline
Hi Edward,
Thanks for the reply.I am creating my own data structure for storing the edge info.
I am scripting my own spring system ( just to study how it functions ).
Here is my thought process to make it more clear.
I have 3 data structures to make my spring calculations easier.
1) Point/Vertex attributes which will store the mass, state(position and velocity) and total force acting on each point.
2) Face attributes which store the strut number(edge number) contained in the face and angle between each edge.(for the calculation of drag and torsional force respectively)
3) Strut(Edge) attributes which store spring parameters, point ids that are contained in each edge and neighbouring Face indices.(to calculate my spring forces).
This way I can calculate my regular, spring, torsional and drag forces.
1)I can loop over points to to create my first data structure no problem.
2) I can loop over my faces (primitives) and create that data structure too.
3) This is where I am having issues. Currently I am trying to solve it by looping through each face and adding edges by subtracting between the face's individual points, then doing a check to see if I don't have any duplicates.
I don't know if this will work.I wanted to know if this is the best way or if there is a better way of doing this.
Thanks for the reply.I am creating my own data structure for storing the edge info.
I am scripting my own spring system ( just to study how it functions ).
Here is my thought process to make it more clear.
I have 3 data structures to make my spring calculations easier.
1) Point/Vertex attributes which will store the mass, state(position and velocity) and total force acting on each point.
2) Face attributes which store the strut number(edge number) contained in the face and angle between each edge.(for the calculation of drag and torsional force respectively)
3) Strut(Edge) attributes which store spring parameters, point ids that are contained in each edge and neighbouring Face indices.(to calculate my spring forces).
This way I can calculate my regular, spring, torsional and drag forces.
1)I can loop over points to to create my first data structure no problem.
2) I can loop over my faces (primitives) and create that data structure too.
3) This is where I am having issues. Currently I am trying to solve it by looping through each face and adding edges by subtracting between the face's individual points, then doing a check to see if I don't have any duplicates.
I don't know if this will work.I wanted to know if this is the best way or if there is a better way of doing this.
Technical Discussion » Getting a list of unique edges in a geometry HDK
- som
- 40 posts
- Offline
Hi all,
I am trying to create a list of all the edges in a connected geometry.
Each edge will store information of
1) the points its being connected to
2) The rest length , mass and spring constant for each of the edge.
ATM I am thoroughly confused and in need of the best way to approach making the list of edges in HDK 14. I have been looking at different methods (some referencing GEO_Closure, looping through primitives etc ) in forums but I'm having trouble wrapping my head around these.
Any help would be much appreciated!!
Thanks,
Regards,
Soumitra Goswami
I am trying to create a list of all the edges in a connected geometry.
Each edge will store information of
1) the points its being connected to
2) The rest length , mass and spring constant for each of the edge.
ATM I am thoroughly confused and in need of the best way to approach making the list of edges in HDK 14. I have been looking at different methods (some referencing GEO_Closure, looping through primitives etc ) in forums but I'm having trouble wrapping my head around these.
Any help would be much appreciated!!
Thanks,
Regards,
Soumitra Goswami
Technical Discussion » Issues with creating HDK attributes
- som
- 40 posts
- Offline
Yeah for the next assignment I will be trying to implement DOPs (For rbds I would need it). But assignment requires me to calculate my own detection and forces. Is that still convenient to do it through dops?
Note: The original assignment is for open gl but I am implementing everything as plugins.
Note: The original assignment is for open gl but I am implementing everything as plugins.
Technical Discussion » Issues with creating HDK attributes
- som
- 40 posts
- Offline
Nevermind. I had inserted a gdp-> merge which was causing issues. Silly me. I am learning everyday!! Thanks for your help.
Technical Discussion » Issues with creating HDK attributes
- som
- 40 posts
- Offline
Hey. It works but now i have geometry created every frame it seems. So I am getting a trail of geo when translating the geometry. Is there a way to delete previous points/geo.
Technical Discussion » Issues with creating HDK attributes
- som
- 40 posts
- Offline
Technical Discussion » Issues with creating HDK attributes
- som
- 40 posts
- Offline
Hey all,
I am having problems creating attributes in HDK. The attribute I create shows up on the first frame(which is when i create it) and then disappears in the rest of the frames. Please check the cookmySop function. I am pretty sure I am doing something stupid.
Currently what I want is to take my geometry and create a spring force . So for the first step I am trying to setup my velocity, position and force attributes. So I copy my sourceGeometry into my gdp and try to manipulate the points there as per the examples.
Please help me out as I am completely lost as to why this is happening.
here is a snippet.
mySource = inputGeo(0,context);
duplicateSource(0,context);
//gdp->copy(mySource,GEO_COPY_ONCE);
flags().timeDep = 1;
CH_Manager *chman = OPgetDirector()->getChannelManager();
fpreal frame = chman->getSample(context.getTime());
fpreal reset = STARTFRAME();
//frame = frame/30.0;
if (frame<=reset || !mySource) {
my_lastCookTime = reset;
//initSystem();
myPos = GA_RWHandleV3(gdp->findAttribute(GA_ATTRIB_POINT, “P”));
GA_RWHandleV3 attrib = gdp->findAttribute(GA_ATTRIB_POINT,“v”);
if ( gdp->getPointMap().indexSize() > 0 || !mySource) {
myVelocity = GA_RWHandleV3(gdp->addFloatTuple(GA_ATTRIB_POINT,“v”,3));
//myVelocity = GA_RWHandleV3(gdp,GA_ATTRIB_POINT, “v”);
if(myVelocity.isValid()){
myVelocity.getAttribute()->setTypeInfo(GA_TYPE_VECTOR);
myVelocity->setTupleSize(3);
UT_Vector3 V;
for (GA_Iterator it(gdp->getPointRange()); !it.atEnd(); ++it) {
GA_Offset offset = *it;
UT_Vector3 V = UT_Vector3(0,0,0);
myVelocity.set(offset,UT_Vector3(0,0,0));
cout << “velocity2: ” << myVelocity->getTupleSize() <<endl;
}
}
}
}
else
{
frame += 0.05;//tollerance
//notifyGroupParmListeners(0,-1,mySource,NULL);
while (my_lastCookTime < frame)
{
cout << “velocity3: ” << myVelocity->getTupleSize() <<endl;
timeStep(chman->getSample(my_lastCookTime));
my_lastCookTime += 1;
}
}
I am having problems creating attributes in HDK. The attribute I create shows up on the first frame(which is when i create it) and then disappears in the rest of the frames. Please check the cookmySop function. I am pretty sure I am doing something stupid.
Currently what I want is to take my geometry and create a spring force . So for the first step I am trying to setup my velocity, position and force attributes. So I copy my sourceGeometry into my gdp and try to manipulate the points there as per the examples.
Please help me out as I am completely lost as to why this is happening.
here is a snippet.
mySource = inputGeo(0,context);
duplicateSource(0,context);
//gdp->copy(mySource,GEO_COPY_ONCE);
flags().timeDep = 1;
CH_Manager *chman = OPgetDirector()->getChannelManager();
fpreal frame = chman->getSample(context.getTime());
fpreal reset = STARTFRAME();
//frame = frame/30.0;
if (frame<=reset || !mySource) {
my_lastCookTime = reset;
//initSystem();
myPos = GA_RWHandleV3(gdp->findAttribute(GA_ATTRIB_POINT, “P”));
GA_RWHandleV3 attrib = gdp->findAttribute(GA_ATTRIB_POINT,“v”);
if ( gdp->getPointMap().indexSize() > 0 || !mySource) {
myVelocity = GA_RWHandleV3(gdp->addFloatTuple(GA_ATTRIB_POINT,“v”,3));
//myVelocity = GA_RWHandleV3(gdp,GA_ATTRIB_POINT, “v”);
if(myVelocity.isValid()){
myVelocity.getAttribute()->setTypeInfo(GA_TYPE_VECTOR);
myVelocity->setTupleSize(3);
UT_Vector3 V;
for (GA_Iterator it(gdp->getPointRange()); !it.atEnd(); ++it) {
GA_Offset offset = *it;
UT_Vector3 V = UT_Vector3(0,0,0);
myVelocity.set(offset,UT_Vector3(0,0,0));
cout << “velocity2: ” << myVelocity->getTupleSize() <<endl;
}
}
}
}
else
{
frame += 0.05;//tollerance
//notifyGroupParmListeners(0,-1,mySource,NULL);
while (my_lastCookTime < frame)
{
cout << “velocity3: ” << myVelocity->getTupleSize() <<endl;
timeStep(chman->getSample(my_lastCookTime));
my_lastCookTime += 1;
}
}
Technical Discussion » Hdk 14 custom particle system help
- som
- 40 posts
- Offline
I am a noob in HDK and am trying my hand in writing a basic particle system for an assignment following SOP_SParticle.C sample file provided . After reading the documentation several times , I don't think I grasp all the nuances in writing your own particle system generator in Houdini 14.
The HDK documentation is good but is very confusing since the examples provided and Change in syntax really makes it unintiutive if I want to add features.
I want to know if there is a way to calculate my own collision response and collision determination and get the distance from the nearest polygonal surface.
what do I need to do?
The reason is I want Houdini to calculate the distance of my particle from a surface using its built in Octree so its efficient.
In other words I want Houdini to calculate the collision detection or at least give me the distance efficiently while I do the calculations for the bounce and friction.
This is purely for learning purposes . Any guidance in this or even properly creating a custom particle sop will help.
The HDK documentation is good but is very confusing since the examples provided and Change in syntax really makes it unintiutive if I want to add features.
I want to know if there is a way to calculate my own collision response and collision determination and get the distance from the nearest polygonal surface.
what do I need to do?
The reason is I want Houdini to calculate the distance of my particle from a surface using its built in Octree so its efficient.
In other words I want Houdini to calculate the collision detection or at least give me the distance efficiently while I do the calculations for the bounce and friction.
This is purely for learning purposes . Any guidance in this or even properly creating a custom particle sop will help.
Technical Discussion » Lightning down the string.
- som
- 40 posts
- Offline
Update on this. Made a custom curve to control the shape.
Here how it looks like now.
Tried to match some of this
https://www.youtube.com/watch?v=bTkjgBRiCsE&feature=youtu.be&t=8m20s [youtube.com]
Here how it looks like now.
Tried to match some of this
https://www.youtube.com/watch?v=bTkjgBRiCsE&feature=youtu.be&t=8m20s [youtube.com]
Technical Discussion » Lightning down the string.
- som
- 40 posts
- Offline
Hi,
I have a shot where I need lightning to travel down the string. I have the Lead branch traveling down. I want to branch it out like reference from Frankenweenie. I am trying to fake it with 2-3 strands but I feel it could be improved further. Any suggestions would help.
My college is limited to having Houdini 12.5.376.
So please take into consideration.
I have attached the hip file for you to see.
Any suggestions would be appreciated.
LightningTest1 - Has 3 strands coming down.
LightningTest2 - Has 2 strands coming down.
Thanks in advance.
Regards,
Soumitra Goswami
I have a shot where I need lightning to travel down the string. I have the Lead branch traveling down. I want to branch it out like reference from Frankenweenie. I am trying to fake it with 2-3 strands but I feel it could be improved further. Any suggestions would help.
My college is limited to having Houdini 12.5.376.
So please take into consideration.
I have attached the hip file for you to see.
Any suggestions would be appreciated.
LightningTest1 - Has 3 strands coming down.
LightningTest2 - Has 2 strands coming down.
Thanks in advance.
Regards,
Soumitra Goswami
Technical Discussion » string/rope breaking tearing
- som
- 40 posts
- Offline
Thanks a ton !! will try it out and post results. I am also looking into http://ihoudini.blogspot.ca/2011/10/snapping-wires.html [ihoudini.blogspot.ca] .
Yeah Finite Elements is not available in the version I am using but if you have suggestions on jerry-rigging that feature then I shall try that out as well.
Cheers ,
Regards,
Soumitra Goswami
Yeah Finite Elements is not available in the version I am using but if you have suggestions on jerry-rigging that feature then I shall try that out as well.
Cheers ,
Regards,
Soumitra Goswami
Technical Discussion » string/rope breaking tearing
- som
- 40 posts
- Offline
Hi,
I am working on a group project from school which requires me to break a string/rope in a realistic fashion. I have generated the string using a tool I wrote which gives me control on the construction of the string (a.k.a number of threads wrapped around each other).
I have tried searching on these forums but couldn't find a way to do it.
What are the recommendations to create this effect.
1) Do I go the cloth tearing route( I can't seem to find that tool in my version of Houdini)
2) Go the fracturing route
3) Any other recommendations?
If you can guide me in the right direction so that I am not shooting in the dark, then it would be much appreciated.
Thanks a bunch. Regards,
Soumitra Goswami
P.S. - My university currently has Houdini 12.5.376 as its latest version.
I am working on a group project from school which requires me to break a string/rope in a realistic fashion. I have generated the string using a tool I wrote which gives me control on the construction of the string (a.k.a number of threads wrapped around each other).
I have tried searching on these forums but couldn't find a way to do it.
What are the recommendations to create this effect.
1) Do I go the cloth tearing route( I can't seem to find that tool in my version of Houdini)
2) Go the fracturing route
3) Any other recommendations?
If you can guide me in the right direction so that I am not shooting in the dark, then it would be much appreciated.
Thanks a bunch. Regards,
Soumitra Goswami
P.S. - My university currently has Houdini 12.5.376 as its latest version.
Technical Discussion » Subsurface Vex Function
- som
- 40 posts
- Offline
Technical Discussion » Subsurface Vex Function
- som
- 40 posts
- Offline
Ok I am encountering a weird problem. I get an extreme of values. At certain point of the scatter density I get extremely deep blown out subsurface encompassing the entire model and a few values lower I get no subsurface at all. The points in between give either of the two extremes. The point cloud file is generated by the mantra surface shader. This is not behaving the way I want it to. I want it to behave more like the mental ray fast skin.
Here is the snippet of the code
if(filenamePTC != “”)
{
printf(“Point Cloud File: ”+filenamePTC + “ Loaded”);
if(frontSSS_weight != 0.0)
{
float front_sd = frontSSS_sd * unitlength;
frontSSS = vop_multiSSS(P,N,frontSSS_albedo,frontSSS_sd, frontSSS_bounceAtten ,filenamePTC,frontSSS_nfp, frontSSS_tRGB);
}
if(frontSSS_useRim != 0 )
{
dot = 1 - dot(Nf,V);
edge = smooth(1.0 - frontSSS_rim_width, 1.0, dot);
frontSSS_Final = frontSSS * edge * frontSSS_weight;
}
else
frontSSS_Final = frontSSS * frontSSS_weight;
if(midSSS_weight != 0.0)
{
float mid_sd = midSSS_sd * unitlength;
midSSS = vop_multiSSS(P,N,midSSS_albedo,midSSS_sd, midSSS_bounceAtten ,filenamePTC,midSSS_nfp, midSSS_tRGB);
}
if(midSSS_useRim != 0 )
{
dot = 1 - dot(Nf,V);
edge = smooth(1.0 - midSSS_rim_width, 1.0, dot);
midSSS_Final = midSSS * edge * midSSS_weight;
}
else
midSSS_Final = midSSS * midSSS_weight;
if(backSSS_weight != 0.0)
{
float back_sd = backSSS_sd * unitlength;
backSSS = vop_multiSSS(P,N,backSSS_albedo,backSSS_sd, backSSS_bounceAtten ,filenamePTC,backSSS_nfp, backSSS_tRGB);
}
if(backSSS_useRim != 0 )
{
dot = 1 - dot(Nf,V);
edge = smooth(1.0 - backSSS_rim_width, 1.0, dot);
backSSS_Final = backSSS * edge * backSSS_weight;
}
else
backSSS_Final = backSSS * backSSS_weight;
}
sssFinal = frontSSS_Final + midSSS_Final+ backSSS_Final;
Cf = Of*(amb+diff+sssFinal)*Cf + (spec + blinn_specularity + reflectionColor);
Is it a shortcoming of the multiSSS model or am I doing something terribly wrong.
I am attaching the otl and helper files as well
This only works with micropolygon and raytracing at the moment.
Here is the snippet of the code
if(filenamePTC != “”)
{
printf(“Point Cloud File: ”+filenamePTC + “ Loaded”);
if(frontSSS_weight != 0.0)
{
float front_sd = frontSSS_sd * unitlength;
frontSSS = vop_multiSSS(P,N,frontSSS_albedo,frontSSS_sd, frontSSS_bounceAtten ,filenamePTC,frontSSS_nfp, frontSSS_tRGB);
}
if(frontSSS_useRim != 0 )
{
dot = 1 - dot(Nf,V);
edge = smooth(1.0 - frontSSS_rim_width, 1.0, dot);
frontSSS_Final = frontSSS * edge * frontSSS_weight;
}
else
frontSSS_Final = frontSSS * frontSSS_weight;
if(midSSS_weight != 0.0)
{
float mid_sd = midSSS_sd * unitlength;
midSSS = vop_multiSSS(P,N,midSSS_albedo,midSSS_sd, midSSS_bounceAtten ,filenamePTC,midSSS_nfp, midSSS_tRGB);
}
if(midSSS_useRim != 0 )
{
dot = 1 - dot(Nf,V);
edge = smooth(1.0 - midSSS_rim_width, 1.0, dot);
midSSS_Final = midSSS * edge * midSSS_weight;
}
else
midSSS_Final = midSSS * midSSS_weight;
if(backSSS_weight != 0.0)
{
float back_sd = backSSS_sd * unitlength;
backSSS = vop_multiSSS(P,N,backSSS_albedo,backSSS_sd, backSSS_bounceAtten ,filenamePTC,backSSS_nfp, backSSS_tRGB);
}
if(backSSS_useRim != 0 )
{
dot = 1 - dot(Nf,V);
edge = smooth(1.0 - backSSS_rim_width, 1.0, dot);
backSSS_Final = backSSS * edge * backSSS_weight;
}
else
backSSS_Final = backSSS * backSSS_weight;
}
sssFinal = frontSSS_Final + midSSS_Final+ backSSS_Final;
Cf = Of*(amb+diff+sssFinal)*Cf + (spec + blinn_specularity + reflectionColor);
Is it a shortcoming of the multiSSS model or am I doing something terribly wrong.
I am attaching the otl and helper files as well
This only works with micropolygon and raytracing at the moment.
-
- Quick Links