NURBS looks weird in 3D DXF exported plane
in
Programming Questions
•
4 months ago
Hi guys, I'm trying to make something that should be simple, but it's driving me crazy.
I'm using the code below to generate a 3D plane, it's basically a list that contain random height values, and then applies them to a fixed grid.
It actually works. My problem comes when I import this into Cinema4D and try to apply NURBS to get a softer plane; it goes crazy.
I tried OPENGL and P2D, as well as getting the DXF and exporting it to another format (OBJ, 3DS, VRML, DAE...) before applying the NURBS... but I get always the same two results:
a) Or the plane is made of independent polygons, so it NURBS every polygon independently, so you get something similar to a plane full of bezier drops.
b) the plane is made of strips, so it NURBS the strip along one axis, but the connection between strips (the other axis) is not done, so you get kind of holes plus sharp angles between strips.
I don't think is a problem of the librar (so I'm publishing on the general section) but a problem in how the plane is constructed.
Am I missing something?
I also tried placing everything between a beginShape/endShape expecting to get one whole object instead of a group of them, but it also doesn't affect.
- beginShape();
- for (int i=0; i<waveMap.length-1; i++) {
- beginShape(QUAD_STRIP);
- for (int j=0; j<waveMap[i].length-1; j++) {
- y = waveMap[i][j];
- vertex(x, y, z);
- y = waveMap[i+1][j];
- vertex(x, y, z+spaceZ);
- y = waveMap[i][j+1];
- vertex(x+spaceX, y, z);
- y = waveMap[i+1][j+1];
- vertex(x+spaceX, y, z+spaceZ);
- x+=spaceX;
- }
- endShape();
- z+=spaceZ;
- x=0;
- }
- endShape();
Some insight would be appreciated
1