sorry but it seems that displaying textures correctly in a 3D model imported via the
saito.objloader libray, is for me harder than I thought and I really need your expert opinions.
After some trial and error I got some small successes (use of materials and a texture applied to the whole solid), but I'm still quite far from understanding why some of my models don't load correctly.
I might be wrong, but I think the problem arises when the model is made by more than one solid and the texture refers to the material (as defined in the .mtl file) used by only one or few of them.
For example I'd like to render a simple (and ugly ;) ) glass jar I made in 3dsmax where only the cover label actually has a texture and all I get is this...
My testing code looks like this
import saito.objloader.*;
OBJModel model; boolean ten = true;
void setup() {
size(400, 400, P3D); model = new OBJModel(this, "jarrQuads.obj", OBJModel.RELATIVE, QUADS);
as the title says need to generate the inset of a custom defined shape. This means that it wouldn't simply be the same shape scaled down and centered (though at least that would work for circles...), but a new contour (or group of paths) displaced perpendicular to the original path in each point.
Actually something like this:
I currently have no clue on where to start from or even if that is possible in Processing and I'm wondering if you happen to know a way (or an existing library) to get to a similar result.
here's my problem: I'd like to make a dot (or more generally a shape) following a SVG path, say drawn in Inkscape. I'm new to Processing programming and my idea basically is to:
1 - load the path as PShape
2 - break/flatten the path in a certain number of straight segments (possibly with equal length) to get the (float) coordinates in each "frame"
3 - update, as needed, the point position to the above coordinates
Implementing points 1 and 3 is not difficult at all, but I have no clue on how to get point 2 to work.
Is there a method, or something I'm now missing, to do that in a simple way (I saw some java code that uses PathIterator in the awt library, even if it doesn't seem to be exactly what I am looking for...)?