"Painting" surfaces with DesignCAD

Started by Dr PR, January 05, 2011, 01:38:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dr PR

I sometimes want to "paint" letters and numbers onto surfaces in 3D drawings. To do this I have tried creating a parallel surface for the "paint" a short distance above and parallel to the surface to be painted. However, if the two surfaces are very close the rear color or shading will bleed through the front surface color or shading. The "overlapping surfaces.jpg" image shows an example of this, where the gray background shows through the red and black "paint." Ugly!

If you increase the distance between the surfaces this effect can be reduced or eliminated. Unfortunately, if you render with shadows, the "paint" will have a shadow along some of it's edges. Also ugly! And very unrealistic!

I have finally decided there is only one way to solve this problem. You must create only one surface, using many polygons of appropriate colors. This way no two polygons overlap. The "7th fleet logo.jpg" drawing was created this way. Each color is one or more polygons, all in the same plane. The outlying gray does not extend below any part of the logo. No matter what distance or angle this is viewed the correct colors will always be shown.

OK, this is fairly simple, but what about curved surfaces? The "flag rendered.jpg" image shows a complex curved surface created in exactly the same way. Every element is made up of 2D polygons, all arranged into a 3D mesh surface. The "flag wireframe.jpg" image shows all of the edges of the many polygons used to make the flag - there are a lot of them, and all were hand drawn! However, you see the same pattern from both sides of the flag, from any angle.

So, how do you get the outline of something like a star or a letter on a curved surface? I draw the figure (star, eagle, etc.) in 2D. For lettering I just use DesignCAD's normal text function to create the text and then I convert it to lines (Edit/Selection Edit/Convert/Text Convert). Use "Draw/Text Arc" to place text on a curve. This creates the outline of the figure(s) you want to "paint" onto the surface.

For the flag surface I use "Surface Connect," "Surface Patch" or one of the solid drawing tools. Then I draw a line perpendicular to the surface with "Plane Snap," with the line positioned at the center of where I want the star on the  surface. The tricky part is moving the outline to the end of the perpendicular line distant from the surface and then rotating the outline around the end of the perpendicular until the outline is more or less parallel to the surface at the point where you want to create the "paint" surface. This is where I sometimes cheat - I don't actually calculate the exact perfect degree of rotation in all three axes for the outline before I extrude it. I just eyeball it. On highly curved surfaces the results will not be pefectly accurate.

In the case of the flag I first determined the positions of all of the stars on the blue field. Then I created perpendiculars at each position.

After rotating the star outline approximately parallel to the surface, I used "Draw/Extrude" to create a grid that intersects the surface. Then use "Draw/Lines/Surface Intersection" to create an outline where the extrusion grid meets the surface. Create the outlines on a separate layer.

Now all you have to do is draw individual polygons (Draw/Planes/Plane) to fill in each separate part of the "paint" surface. Do this on a different layer from where the outline lines are!

CAUTION: Be very careful to not draw a plane over two non-planar fragments of the grid! You can do this by manipulating the points of planes in Point Select mode. However, if you do you will get very strange artifacts in the rendered images. Trust me, I speak from experience! These warped planes can cast shadows in the wrong directions, and sometimes they are rendered twisted, with the front (lighted) color over part and the rear (shadowed) color over another part. On the other hand, if you want your images to look as if they were strained through a kaleidoscope, warp them to your heart's desire.

After the smaller "painted" objects are drawn, fill in the surrounding color with more planes. That is how the star field on the flag was created. First I created the stars individually, made up of several polygons. Then I filled in the blue polygons around the stars.

Note: When possible, create regular grids instead of many individual planes. The drawing will be smaller (render faster) and the surface will render better. The stripes in the flag are each a single grid created with "Surface Connect."

After you get the whole design done, select all of the letter/number or figure and define it to be a solid (Solids/Solid Define). If you do not do this the surface will render as a bunch of flat polygons. After defining it to be a solid it will render as a single smooth surface, just as the flag is rendered.

Note: I am aware that you can texture-map images onto surfaces. Good luck trying to get them rotated and scaled correctly! For things like flags you will have to map both sides. And even more luck will be needed if you want to send the drawing to another program!

This technique is a lot of work - but it does work, and gives better results than any other way I know of.

Phil
DesignCAD user since 1987

bdeck


RWSurvey