Hi there! Im trying to detect whether or not an object is convex. The idea was to dot each face normal against every other face normal to ensure theyre pointing away. This is where I got with the script, bashing my head against the wall for quite a while now so I figured Id put the question out here. If anyone already…
Yeah I see what you mean about the caching issue. I can't afford to do a hold and fetch, I'll be doing this operation hundreds of times :( I just tried having it clone and collapse the object and running the operation on that instead, but it doesn't seem to want to update properly for physx to query (or even at all?!) So…
Ah, actually I have having the opposite problem. It always returns false. I had only tested concave objects previously. It seems to be a caching issue. Whatever was first returned per object the answer will remain until the max file is reloaded. (I tried gc, but it didn't work.) This is a terrible workaround, but it seems…
Thats why i said it would be better to apply it to a selection of polies, as opposed to a global solution :) I mean i do characters most of the times and (i guess) pretty much 90% of the times i want the inner triangulation to be convex not concave. but maybe i'm wrong, but from my experience i spend way too much time…
I'm not sure having a concave "triangulation" would always be the "proper" way of doing it, right? Nowadays I'm focusing on tools mostly so I'm a bit rusty with modelling... In Spec Ops for example, back when we were using the terrain actors instead of staticmeshes to create the dunes we had to "turn" some edges, making…
Hey Steffen, could you show me an example of what you mean? I guess you mean the "triangulation" that happens in each poly. You want to keep it concave, right?
Yeah agreed guys. Those are both good ways. Most likely to go with your way Warren. It's just the values that max specifically seems to be feeding me are bogus. So if anyone can shed light on why that might be, the rest should be easy.
Check if the angle between adjacent faces is less that 180 then the object is not convex. To get the angle between two faces calculate the dot product of the normals and then arc-cosine the value to get the angle. Since the angle between two vectors(normals) cannot be more that 180. Calculate the cross of the normals and…
Yeah a quad is made of 2 triangles, and there are 2 ways the inner edge, or inner triangulation can be made. Often enough artists, especially beginners forget about this or don't care enough. What can happen is, jaggy silhouettes and all kinds of bad shading errors just because of the invisible triangulation. The bad…