DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Bottletop

Started by samdavo, October 10, 2014, 04:20:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

samdavo

Just watching the Bourne Supremacy for the umpteenth time, and messing with  the computer - and I find this youtube of drawing a bottletop with Solidworks.

http://www.youtube.com/watch?v=HRiFS6V4piQ
SolidWorks P Tutorial #46:The famous Bottle Cap (arc work)

Basically it is pretty easy to draw in DCAD as well, except that I haven't bothered to add the thickness of the metal (maybe 0.5mm?).
(Surface Connect to get the fluted lower edge, and Sweep to get the top).

(edit) There is a small problem in that the two Grids do not match perfectly at the join line.  It would be better to Sweep with 6x18 = 108 segments in the full 360 degrees, - assuming you want a bottletop that doesn't leak :)  ...

And it wouldn't be too difficult to add the thickness of the metal as well  (edit Solid subtract).
(2 cents)



samdavo

#1
Couple of comments about qs2 and also cheap and nasty 2D/3D drawings (with Isometric images).

1. Below I delete the wireframe lines that radiate from the centre - using Edit / Hidden Edge by Section - (but keep the ones around the flutes).

Then use qs2.d3m (quickshade 2, which gives the remaining wireframe lines as well as shading), and the result is that the majority of the wireframe around the flutes is still shown. Then take a screensnap.

2.  I also add a drawing of that bottletop (after printing to Cutepdf).  It is a quick alternative to Paperspace, i.e. you can simply take a screensnap of the 3D Isometric(s) - as above -, go back to 2D mode, with normal plans and elevations ( which you used to do the 3D solid in any case), load the Isometric image(s), add a few notes, titleblock - maybe a few arrows and notes that refer to the loaded jpeg images;

Then print to pdf, (using 'print selection only'. so as to avoid the 3D object out of the main field of view) .  IMO it is easier (and quicker) than Paperspace.  (2 cents)

PS Furthermore in the event that a client requests a DWG (exported) copy of that DCD file of that bottletop, you don't have the uncertainly of exporting a 3D drawing (2 cents).

prl

Nice Sam.  A good bottle of beer is one where you savor the smell of the bottle cap (or is that just me being odd?).

samdavo

#3
prl
A seriously simple drawing (and done quickly - i.e. could be improved, eg some small gaps in the grid).
I believe on this occasion, DCAD is easier than SWorks, but true, the final rendering is less impressive.

Moving on,
As a (FIDDLEY) alternative to adding the jpeg images, you can avoid them, and instead add a "Hidden Line Removed" Isometric and convert to 2D (either full drawing = not recommended,  or just the 3D added parts (before adding) = recommended) viz:-
a) go to 3D front view  (edit) not necessary if you use option d2 below ...
b) select the 3D object,
c) turn it into an isometric by rotating about the Y axis by -45 degrees, and then about the X axis by +35 degrees  (this gives an isometric as seen in front view).    Doh, that is not necessary if you use option d2 below, simply do a 2D projection from Isometric view ...
d1) Full Drawing.  Save a copy of the drawing with "Save 2D Projection" ticked, and also "With Hidden Line Removal" and "Enable Hidden Line Cleanup";  or better still
d2) 3D Parts only. Select just the 3D Isometric, also tick "Save Selection Only (as 2D Projection)".   

One problem (I believe) with saving the entire drawing option d1 (rather than just the 3D bits)  is that the text is vector converted, and no longer editable.

I add a 3D drawing bottletop3.dcd, which includes the 3D isometric
and a 2D version bottletop4a.dcd which includes the flattened isometric
(2 cents)
     

JJG

Quote from: samdavo on October 12, 2014, 05:02:35 PM
...
As a (FIDDLEY) alternative to adding the jpeg images, ....

Sam, instead jpeg, you should prefer png images, smaller in terms of file-size, and better precise in terms of rendering.

And it is of course possible to insert this image behind your isometric or perspective drawing ...  (look like same as Solidworks presentation)
;)

samdavo

#5
Quote from: JJG on October 13, 2014, 11:12:30 AM
Sam,
1. Instead (of a) jpeg, you should prefer png images
2, And it is of course possible to insert this image behind your isometric or perspective drawing ...  (look like same as Solidworks presentation)
;)
Howdy JJG,
1. In fact I do use and attach png's , although I call them jpegs (old habit sorry).   Just that around these parts, people think you are referring to Papua New Guinea :)

2. Good point - (I assume your aim is to have lines as well as shading - i.e. as per Solidworks) -  but having said that, qs2.d3m is pretty good too, yes?   That is how I made the jpegs  png's attached to the first and second posts - i.e. where there are black lines as well as shading.   

It is also how prl did this drawing - and I notice you were a major contributor to that thread back in 2012 :)
http://forum.designcad.com/index.php?topic=4529.15


cheers

samdavo

#6
Of course you also need a bottle to put that lid onto.
(Texture mapping is great!)

Cheers

samdavo

#7
And for the architects, I note that you can build walls out of these things


samdavo

#8
How do you get a reasonably good resolution closeup, including shadow (?)

I think I am correct, but I believe you cannot print directly from DCAD to pdf including shadows.
i.e. if you go to "Print\Type\Smooth Shade" to cudepdf,  the shadows are not there when you open the pdf.    (edit) doh, As Phil explains below, best to use "File/Image/Save Image File" as an intermediary.

The attached is one way to get there.  Basically, (as everyone knows), you get shadows by using Gerrard or i-Phong, lighting permitting shadows on, accelerator off.    Then you print screen with Alt+PrtSc,  then load that into Paint, (edit) crop as necessary ,  and save that as a png. 

I am assuming that that is better resolution than a simple screensnap of the DCAD screen - as per the attachments to reply #6.

Not perfect, but not bad /getting there.
Would be better if I had a better jpeg to start with ( the original beer bottle was obtained with screensnap of a random website).
(2 cents)


(edit) Perhaps (for people not familar with it - such as me 12 months ago) I should add some details about texture mapping.   Firstly, you can see the effect if you copy both the dcd and the png files, and put them together in the same directory = the first 2 attachments in reply #6.   When you shade the drawing with Gerard or Phong you should get the texture mapping.

What I have done is select one of the yellow "swept bottle shapes" ("conical" grids on this occasion, although they could be solids),  then gone to Tools \ Texture Mapping \ Texture (File Browse symbol) \ click on the jpeg or png of your choosing,

then, on this occasion, choose Box Mapping, and Box Front.
As I say, you will need Gerard or Phong to see the Texture Mapping when you render.   (2 cents)

SolarFreak

Not bad? Really? Don't be humble - the only thing that detracts from the realism are the other objects!

Succinctly, it looks incredible.

Dr PR

#10
Sam,

The big problem with shadows in DesignCAD is that it uses a "Shadow Map" to create the shadows, and it has VERY limited resolution. You set the resolution in "Options/Options/Light Source." Click the "Shadow Options" button and set the resolution with the "Shadow Map" slider. Default resolution is 512x512 and maximum resilution is 2048x2048.*

The Shadow Map is applied to the entire drawing, and not just the part being viewed/saved/printed. This ensures that shadows created by objects that are out of the field of view will be cast upon the objects being viewed. This Shadow Map is overlayed over the normal viewed/printed image, and is independent of the pixel size of the image.

The coarseness (chunkiness) of the shadow "bits" will be the maximum length of the drawing (L) divided by the Shadow Map resolution (R).

Shadow bit size = L/R

So, if your drawing is 1000 feet long and you use the maximum resolution the shadow will be composed of patches 1000/2048 feet, or 5.9 inches (no matter what the image resolution is in pixels).

If you view the entire drawing the shadow doesn't appear too coarse. If you print the full drawing at high printer resolution** on a 10" wide area the shadow "bits" will be 10"/2048 or 0.0048" square - just visible if you magnify the image but not too objectionable.

But, if you zoom in and print only 10% of the drawing (100 feet wide) the shadow "bits" will be 0.048" wide - really jagged and ugly.

The "aft deckhouse 14 Feb 2011 5.jpg" image shows an entire structure. This has a 2048x2048 Shadow Map and the shadows look OK. The "aft deckhouse 13 Feb 2011 6.jpg" image is a close up of the same drawing. Notice the fuzzy and "chunky" shadows - really ugly.

Note: Both images were originally saved with maximum image width/height of 4096 pixels. I have reduced them to 900 pixels for the Forum.

****

The program has two shadow options, "new" and "old." The "Options/Use New Shadows" option controls this - select it to use the "new" shadows. With the "old" (original) shadows thin narrow objects (like vertical antennas) cast a double shadow. The "new" shadows were an attempt to correct this, but they have a nasty artifact with narrow round objects that produces a bright or dark outline on some objects. Neither option is perfect, but the "new" shadows are best if you have tall thin objects.

****

Presumably these problems will go away when the RedSDK package is fully operational and we have a 64 bit compilation of the program.

****

* The "Shadow Options" "Shadow Softness" slider controls the darknedd of shadows. 0.0 is no shadow (maximum lightness) and 1.0 is totally black. I normally use 0.3. The "Shadow Tolerance" slider is really a "Screw Up Shadows" option - I leave it at 0%. If you increase it the shadows wander away from the objects that cast them, and this looks really wierd!

** Use "File/Image/Save Image File" using the "Save Image As:" setting of "Smooth Shading." Set the "Image Size" to the desired number of pixels (up to 10,000x10,000). This will save the image to a JPEG file.

Phil
DesignCAD user since 1987

samdavo

#11
Thanks yet again Phil,
Great attachments (deckhouse shots).
I'll zero in on this paragraph :-
Quote from: Dr PR on October 15, 2014, 12:45:18 AM
** Use "File/Image/Save Image File" using the "Save Image As:" setting of "Smooth Shading." Set the "Image Size" to the desired number of pixels (up to 10,000x10,000). This will save the image to a JPEG file.

The holes in my knowledge are considerable, but slowly, one by one, I am getting there :)

Here's a better label, starting with the best shadow resolution (Q\ Lighting \ Shadow Options \ 2048x2048), and saved as 1700 x 2150 pixels
(< 10,000 x 10,000 to keep it manageable) - and downloading the best jpeg on the wikipedia "bottles" site, twice the size of the first one, 61kB > 32kB.
I decided to save as a png (2 cents).

Dr PR

The shadows certainly did come out nicer!

Phil
DesignCAD user since 1987

samdavo

#13
One final (obvious) comment - but a texture-mapped photo will have its own perspective, and won't necessarily paste perfectly (refer the apparent slope - upwards to the front - of the bottletop on the right hand bottle, first attachment particularly).    However the left hand bottle has its own bottletop added to cover this up.   As I say, all 110% obvious.

PS - and you can even look inside the bottle when you remove the bottletop :)

PS - and speaking of translucent, you can even add an empty bottle.
Think of this as 3D Photo-shopping, where you can almost taste the beer.