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.

Applying "Material" to extruded objects

Started by Bluswede, March 29, 2011, 11:13:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bluswede

Hi All,
Things are looking better than at my last post.  I have created my first useful drawing, a box beam made up of four T-slot tubes and four pieces of aluminum sheet...using the one percent of the commands that I now understand.  Woo-Hoo!
I have run across another thing, though.  I was playing last night at making a wine goblet.  I drew a double-line profile, made it a plane, set a handle, and "extruded along a curve" around a circle.  Presto!, A lovely goblet. (it's like a kind of magic!)  The girlfriend says, "Now make it out of Cobalt-blue glass.".  I did some reading in help, and it appeared that the "material" has to be set up before the object is created, so I went about it and arrived at settings that seemed right.  When I made my second goblet it was the same as the first...a non-glass-like solid.
After more fiddling, a third attempt was made with similar result.  As a check, I made three of the "canned" solids from the "solids" menu and they all appeared as shiny, transparent, blue-tinted, glass. 
The question:  Is it only the solids from the menu that will appear transparent, or will my extrusions one day, with your help, appear as glass also?
Regards,
Scott
P.S.: Thanks in advance!

Dr PR

Scott,

First, a very easy way to make irregular objects symmetrical about an axis - like the goblet - is to use the "Draw/Sweep" ("W" key) function. This allows you to control the number of facets, etc. You can also create spirals and conical sweeps, etc.

I have used the "Options/Material" function a few times, but I am not expert!

First you must create a new material - I have found that by selecting an existing material with similar properties to what I want and then saving this under a new name is the quickest way to get started.

Note: the material will be saved in a separate file in the folder defined in the "Options/File Locations" dialog in the "Material" location. I suggest setting this to a separate folder where you save your materials so they won't be over written when new versions are installed. That is, NEVER use the default locations for anything!

To make changes to your new material you mus select it from the materials list in the "Options/Materials" dialog. Then you can fiddle with the sliders to change the way it looks. You move the "Transparency" slider to the right to increase transparency. Look at the default "Glass" material - it has a transparency of 75%.

Notice the "Ambient," "Diffuse" and "Specular" reflections sliders. These influence how shiny the material will be with respect to these three types of lighting.

The "Contrast" and "Emission" sliders also influence appearance. In theory the "Emissions" slider should make the object glow in the dark. It could be used to create a fluorescence effect.

If you start with the default "Glass" material for your new material you will notice that it is the color white. Just select a new color for your new glass.

****

Now, you might think this is all you should have to do to set the properties of materials. Wrong! DesignCAD has a very screwed up way to model the world.

Open the "Options/Lightsource" dialog. Select a light and make it a "Directional Light."

Note: Other light types may be screwed up and not work correctly with materials. It seems to be the consensus of users that "Directional Lights" aer the only lights that work reliably. Others should chime in on this point if they have good experiences with other light types.

Now, here is the truly weird point. Notice the "Intensity" sliders for "Ambient," Diffuse" and "Specular."  with these you can make materials that were defined as shiny in the "Materials" dialog look dull, and vice versa. In the DesignCAD world, the surface characteristics of an object are dependent on the light source! This is totally screwed up! The real world doesn't work this way!

The ONLY way to get anything like reasonable lighting effects is to move the "Intensity" sliders for "Ambient," Diffuse" and "Specular" all the way to the right (100%). This in effect disables the effects these light "properties" have on the appearance of materials. It will also make dark murky images MUCH brighter.

Again, under no circumstances should these sliders be at less than 100%!

By setting these sliders for all lights at 100% your material surfaces will have the same shininess under all lights (the way the real world works). However, you can change light color to get different color effects (the way the real world works).

****

Right now you cannot create mirror surfaces in DesignCAD (that requires ray tracing). That means you also can't create shiny chrome objects or realistic polished brass. I have experimented with polished metals - see the attached image. The shiny part of the capstan is a material with high reflection settings. The remainder is the standard "Default" material.

Since the winch is to be viewed "outside" in direct white sunlight I added a slight blue tint to the grayish "metal" material to simulate skylight.

The clear sky is a big, bright blue light, and that shows in reflections off shiny objects and in shadows. That's why shadows are blue on clear sunny days and why photographers use "skylight" filters to correct colors in shaded areas. I have never been able to get DesignCAD's "Ambient Light" type to do this, but that is how the real world works.

Maybe someday, when other more important problems have been solved, we will see more realistic lighting effects in DesignCAD.
DesignCAD user since 1987

Lar

#2
Scott, your goblet has way too many points, which will slow dcad down, especially if you duplicate it or put it into another drawing.

Reduce the number of points in the profile by using the Edit menu> Selection Edit> Smooth Options command. You will have to experiment to get the best results but make sure deactivate 'convert to curves'. Since the profile has so many tight curves you may have to vector convert it, break it into different parts, smooth the parts, combine them back into a single line then use make plane (actually, since your profile is closed and you are sweeping it you don't have to make it a plane, it can be a line. The result be be a closed figure so solid defining it will result in a proper solid {if you slice it the cut edges will be closed, not open [hollow]; for example, a sphere primitive is made entirely of a grid surface).

Lar

Bluswede

Thanks Guys!
That's why I'm here...to get that, "You're doing it way wrong!" answer!  As long as it's followed by the, "Here's how you should do it." answer all is good!
Lar, I did notice that the file was just a touch "heavy" when it was uploading.  Someone else had cautioned on this in a thread that I had read on extrusion...the default number of points when extruding along a curve is a little high for most purposes.
So..."Sweep" is the hot tip?  I'll give it a shot for my next piece of stemware!
Still...there's the transparency issue...with no change in the "material" or "lighting" settings, the standard solids work, but my goblet does not.  Could someone try again, using a different approach to the explanation.  The Doctor's explanation didn't fit in my head, and I fear that an important bit leaked out my left ear!
Thanks and Regards,
Scott

Lar

You simply didn't apply a transparent material.

Make sure Point Select Mode is off then select the goblet (it has so many points that it may take a while for dcad to regenerate all the windows). Open the info box and about mid way down you will see the sphere displaying the material, which is 'Default'. Right above the sphere is 'Material'. At the right is a text field showing 'default'. Click the down arrow and right below 'default' you will see 'glass'. Further down the list is 'glass_1'. Click either one of these and your goblet is transparent. You will have to deselect the goblet to see the transparency, because of the many points (also, make sure 'transparent' is enabled in the 'Shading Options' ('Toolbar' toolbox, button before '2D'). I get better results with 'enable graphics acceleration' on). If you press 'Q' for the Options dialog then click the 'Material' tab (or open the 'Material' toolbox and click the icon that looks like a graphic equalizer) you will be able to create you own materials.

Lar

Adrian 2.0

scott,
You don't actually need to open the info box to change a material, and you don't need to make a new material to change the colour of it. (unless you want to modify other settings like transparency, or reflection)

Make sure you have the materials toolbar open (right click any tool, and the full list of tooolbars pops up)
Select 'glass' in the dropdown menu, select your object and click (A) apply.
If you are in wireframe, and working on a white background, the object will 'disappear' when it is de-selected because 'Glass' colour is nearly white.
If you want the glass coloured, pick your colour from the colour tolbox & click (A) apply again.

In both cases the apply button (A) is in the appropiate toolbox, just before the 'same as' finger.

Dr PR

adriank,

Are you sure about changing the color of the "Glass" material. I have tried that several times, and it always comes out white.

I have selected a "Glass" material object and clicked the "A" (Apply) button in the color toolbar to apply the color to the object. It doesn't work. The wireframe image changes to the new color, but when you shade the object it comes out white.* In fact, the "Default" material seems to be the only material that you can change the color of in this way. You can't make red "Brass" for example.

I have also selected a "Glass" material object, opened the Info Box (CTRL I) and then clicked on the color icon in the Info Box. When the "Color" dialog opened I have selected a new color, clicked the "OK" button, and then closed the Info Box. The results are the same - the "Glass" material always comes out white,* no matter what the wireframe color is.

* Note: If you have enabled the "Enable color material" in the "Shading Options" dialog the "natural" color (assigned to the material when it was created in the "Materials" dialog) will always prevail. With "Enable color material" unselected the wireframe color will show when the object is shaded. However, unless "Enable color material" is selected NONE of the material properties will display correctly.

So, to get transparent blue glass you need to create a new blue glass material in the "Materials" dialog. I have put in a features request for a glass material with chamelion-like color properties like the "Default" material.
DesignCAD user since 1987

Lar

Quote from: Dr PR on March 30, 2011, 12:49:36 PM
So, to get transparent blue glass you need to create a new blue glass material in the "Materials" dialog. I have put in a features request for a glass material with chamelion-like color properties like the "Default" material.

I always thought that custom materials are saved outside of a dcad file so wouldn't it best to create a new material if you want any of the properties changed. If you change an existing material and you open an old file that uses that material wouldn't the item now shade with the new properties?

Lar

Dr PR

Lar,

You cannot edit the pre-defined materials supplied with DesignCAD. You can open a predefined material, save it under a new name, and then edit the properties to create the new material.

Each new material is saved in a "name.mat" file. You must specifically open the necessary file to be able to use your user defined material in a new file. If you have a dozen user defined materials you have to open a dozen files. This sucks! I just don't understand why DesignCAD doesn't do this automatically with materials every time the program starts. It really is no different than opening the custom keyboard definitions file. And why a separate file for each material?

A FAR FAR BETTER way is to create an ordinary file that contains examples of all of your user materials. I have a file with a bunch of simple cubes, each of a different user defined material. Just opening this file installs all of my user defined materials into the DesignCAD materials list, making them available to ALL files until DesignCAD is shut down again. Once a material is used in a file the material definition goes along with the file, even to machines that do not have a ".mat" file for that material.

I find it easier to switch to the materials drawing, select the appropriate cubes, copy them to the clipboard and then paste them into a new file. Then when I want to assign one of my materials to a new object I just select the object, open the "Info Box" and use the finger tool to assign the material from one of my cubes to the new object. It is a more or less point and click approach that doesn't mess with dialogs and long lists of materials. And I don't have to try to remember a cryptic material name that I created in a rush many years ago.

There is a potential problem here. If I call a material "shiny brass" and you define a material with the same name, all bets are off as to which material will be used in what file if your file and my file are open at the same time on the same machine.

DesignCAD user since 1987

Bluswede

Hi Again All,
I found my answer this morning while trying out what Y'all were suggesting.
"Right-click on any tool and the full list of toolbars appears" was the suggestion I was following.  Once I clicked on Materials and got that toolbar active, I had an "apply" button...one can conquer the world with an apply button!
Now, my custom "Cobalt Glass" is only three clicks and a drop arrow away.  Click on your object to select, click the drop arrow in the Materials toolbar, select "Cobalt Glass", (saved to a custom materials folder as suggested) hit the all-powerful apply button, and then re-do the shading...There's your pretty blue goblet!  As a test, I selected a cylinder from the "solids" menu and put it behind my creation...transparent as it should be!  As added fun, I selected "oak" for the cylinder...in the same drawing, different objects can have different materials...cool!
Thanks and Regards,
Scott   

Dr PR

Scott,

Thank you!

I have been using DesignCAD since 1987, and if I ever knew about the "Materials" toolbar I had forgotten it. I have been opening the "Info Box" every time I want to change materials. Now I have the "Materials" toolbar at the top of my screen.

Even us long time users can learn from newbies. Keep posting questions so we can all learn!

Phil
DesignCAD user since 1987

Adrian 2.0

Doc,
I'm confused as to why you can't change the colour of a material.
As you say, the colour of the wirefrme changes when you apply a colour, but for me it also changes the rendered colour - on ANY material.
Of course, if you re-click the 'apply material' to the same object it will change the colour back to the default colour.

When you re-generate in wireframe, is the new colour still visible or does that go back to 'white' too?

Aha..
I just checked the settings in the shading command - You must have 'enable colour material' checked?
If you un-check that box you will get your coloured glass -  I always wondered what that box did - I've never used it before.

Dr PR

adriank,

No, you don't get colored glass if the "Enable color material" option is not checked. You do get a colored object, but it us not transparent - it isn't glass.

Furthermore, you cannot get shiny surfaces, really black blacks, deeply saturated colors, etc. with this option disabled.

The "Enable color material" option was added a few versions back but there was no announcement. I was experimenting with it and discovered that with it enabled I could get true deep black and bright white objects, and not just the dark gray and light gray that you get when the option is disabled.

There is a definite downside to this option. Older drawings had a "General" material (I think that was the name) and newer drawings have the "Default" material. They do not display the same when the color material option is enabled. As I recall all "General" material objects that are imported display gray or black - no color. You have to select them all and assign the "Default" material - bummer! Then they will be colored. This should be an automatic conversion when the old file is opened in a newer version of the program.

So there is a tradeoff here. With "Enable color material" disabled you can import old files and see the original colors, and you can happily alter the colors of standard materials. But you can't create images with good saturation, black blacks and white whites, and none of the material surface or transparency properties work.
DesignCAD user since 1987

Bluswede

Thanks Dr, for noticing my ability to be just the right kind of stupid! ;D
Before I post a question, I do a search of the past posts to see if my particular problem has been covered recently, so as to not be too much of a pest.
I would love to take credit for reminding you of the material toolbar, but it was adriank who mentioned that the materials toolbar should be open and to right-click any tool to get the list of available toolbars.
Regards,
Scott

Bluswede

Hi Again All,
I am noticing just a little confusion on coloring objects.  Am I right in saying that the color toolbox (default at right of workspace) affects the color of the wireframes and the default "material", but does not affect the color of any other "materials"?  That is, the only way to affect the color of most "materials" is through the "material dialog box", provided that the selected material is editable...correct?
Again, thanks to all who answer the newbies' questions...it makes the climb up the learning curve MUCH easier!
Regards,
Scott