#Edge of sphere looks ugly
43 messages · Page 1 of 1 (latest)
Looks like your texture isn't a consistent color. Since it looks like you're just trying to make it a solid color, just use the color property to shade it and don't even use a texture.
Hello @stoic sentinel there is no texture applied on the object
What kind of material are you using?
Show me how you are constructing your sphere. Let me see code.
Phong material
Not sure if this is going to solve your issue, but I would set some properties for that material instead of just calling the constructor with defaults.
I would also set the color to something specific.
Increase the number of segments on your spheregeometry. This may be part of the problem.
The second and third arguments for the SphereGeometry constructor define how many segments you're using in theta and phi directions.
For the sergments I already tried 40x40 widthxheight
You've only set the radius it looks like
Well, then set the color of the phong material.
40 x 40 is also not that much just fyi.
I usually go 64x64 at a minimum.
You could also try using a different material.
do you perhaps call .computeVertexNormals()? doing that would create a seam
going 64x64 and applying the color to the material solved the issue.. I'm wondering why it was happening. Do you think it's just matter of pixels density?
Thanks a lot
sorry I was lying, one moment
no ok, it is still there, I didn't see it at first
Do you need to use Phong? You could try Standard, Physical, or Lambert.
Yes, I do
Okay, well it seems maybe Dawg solved your issue.
it seems removing .computeVertexNormals() the ugly edge disappears, but the mesh responses differently to light now
Can you share picture?
well yes, you have to use dodecahedron but subdivide it
drag detail to the right
then you may be able to use computeVertexNormals
although I think IcosahedronGeometry produces better grid
see https://threejs.org/docs/?q=hedr#api/en/geometries/IcosahedronGeometry demo - it looks highly regular
formerly, I was trying the Icosahedron with higher detail but it was heavy on performance when reaching enough detail to become smooth as a sphere. Let me try again
Icosahedron with detail = 20, it's not perfectly smooth as a sphere and it's lagging
ah detail is the subdivision, so I understand why it's lagging, but I don't understand why it doesn't look smooth
Can you check if the material has flatshading set to true?
feels like a case of flat vs smooth shading
flatshading is not involved and I'm aware it is "false" by default. In fact, if I explicitly set it to false nothing changes
if subdivision makes unindexed geometry, maybe
btw if you remove uv attribute from the sphere seam vertices can be merged and then it will be gone for good
How can I do that? I was reviewing the properties but I don't find anything related
btw thanks for the answers so far guys
delete geometry.attributes.uv maybe