|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I don't know whether to say this is late, because I didn't get it posted
on Friday, or early, because the object isn't quite debugged. So I'm
calling it a preview of some future Friday.
The problem is that I can't get the fur to align at the loop join.
Post a reply to this message
Attachments:
Download 'fluffy_knot-preview.jpg' (121 KB)
Preview of image 'fluffy_knot-preview.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Cousin Ricky <ric### [at] yahoocom> wrote:
> I don't know whether to say this is late, because I didn't get it posted
> on Friday, or early, because the object isn't quite debugged. So I'm
> calling it a preview of some future Friday.
>
> The problem is that I can't get the fur to align at the loop join.
Nice fur/fabric texture!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Cousin Ricky <ric### [at] yahoocom> wrote:
> I don't know whether to say this is late, because I didn't get it posted
> on Friday, or early, because the object isn't quite debugged. So I'm
> calling it a preview of some future Friday.
>
> The problem is that I can't get the fur to align at the loop join.
Nice.
I had that thread where I showed the normals on the bunny mesh - can't find that
in a search - no surprise there.
But I also found this recently, and wonder if this might help:
https://www.realtimerendering.com/resources/RTNews/html/rtnv7n5.html
A better method:
Consistently orient all of the polygons (you need to know which edges are shared
to do this, and this isn't possible for some objects-- e.g. mobius strips, Klein
bottles, etc).
Now, choose the point 'P' in the middle of the bounding box of the object. For
each triangle in the object, compute a signed volume for the tetrahedron formed
by the triangle and P. Arrange your calculation so that the area will be
positive if P is left-hand-side of the triangle and negative if P is on the
right-hand-side of the triangle. (if your triangle is ABC, then doing
(AB.cross.BC).dot.P will have this property).
Add up all of the volumes. If the result is positive, then the normals are
oriented 'outside'. If the result is negative, then the normals are oriented
'inside'. If the result is zero or very close to zero, then the object is flat
or has just as many concave parts as convex parts.
This will always work for completely enclosed objects, and does the right thing
for surfaces-- it chooses the orientation that marks the surface 'most convex'.
It works for self-intersecting objects.
Here's the code I use:
(If you have Inventor 1, this is in the 'ivnorm' code:)
int i, j;
int total_v = 0;
SbVec3f average(0.0, 0.0, 0.0);
for (j = 0; j < length(); j++)
{
Face *f = (*this)[j];
if (f->degenerate) continue;
for (i = 0; i < f->nv; i++)
{
average += verts[f->v[i]];
++total_v;
}
}
average /= (float) total_v;
float result = 0.0;
for (j = 0; j < length(); j++)
{
Face *f = (*this)[j];
if (f->degenerate) continue;
for (i = 1; i < f->nv-1; i++)
{
SbVec3f v1 = verts[f->v[0]] - average;
SbVec3f v2 = verts[f->v[i]] - average;
SbVec3f v3 = verts[f->v[i+1]] - average;
float t = (v1.cross(v2)).dot(v3);
if (f->orientation == Face::CCW)
{
result += t;
}
else if (f->orientation == Face::CW)
{
result -= t;
}
else
{
assert(0);
}
}
}
return result > 0;
- BW
Post a reply to this message
|
|
| |
| |
|
|
From: Cousin Ricky
Subject: Re: Friday abstract preview: fluffy knot
Date: 25 Feb 2023 20:14:20
Message: <63fab26c@news.povray.org>
|
|
|
| |
| |
|
|
On 2023-02-25 17:32 (-4), Cousin Ricky wrote:
>
> The problem is that I can't get the fur to align at the loop join.
N.B. I did not use a texture normal; there are actual papers on fur
textures, and I'm not up to competing with those. These are 100,000
individual hair shafts.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Cousin Ricky <ric### [at] yahoocom> wrote:
> The problem is that I can't get the fur to align at the loop join.
Always nice to see a wild trefoil!
I can't make out the source of the seam. Is it caused by the hair repeating
pattern not fitting exactly into the knot length, or is it a normal flipping and
making the hairs point in different directions at the start/end?
Bill
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 2023-02-25 à 20:14, Cousin Ricky a écrit :
> On 2023-02-25 17:32 (-4), Cousin Ricky wrote:
>>
>> The problem is that I can't get the fur to align at the loop join.
> N.B. I did not use a texture normal; there are actual papers on fur
> textures, and I'm not up to competing with those. These are 100,000
> individual hair shafts.
>
Just shift the junction to somewhere it's hidden.
Post a reply to this message
|
|
| |
| |
|
|
From: Cousin Ricky
Subject: Re: Friday abstract preview: fluffy knot
Date: 26 Feb 2023 11:44:53
Message: <63fb8c85@news.povray.org>
|
|
|
| |
| |
|
|
On 2023-02-26 05:17 (-4), Bill Pragnell wrote:
>
> I can't make out the source of the seam. Is it caused by the hair repeating
> pattern not fitting exactly into the knot length, or is it a normal flipping and
> making the hairs point in different directions at the start/end?
It's the former. There is no normal on this object.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Cousin Ricky <ric### [at] yahoocom> wrote:
> > I can't make out the source of the seam. Is it caused by the hair repeating
> > pattern not fitting exactly into the knot length, or is it a normal flipping
> > and making the hairs point in different directions at the start/end?
>
> It's the former. There is no normal on this object.
Ah I see, it's 100% hairs? In that case you just need to make sure your rotation
offset repeat distance fits into the knot length exactly. I've had to do this in
many different ways with various knots I've built over the years :)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |