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.

Open source rendering

Started by Bob P, August 04, 2011, 04:41:41 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Lar

#15
Good luck, Darkvil. Dcad needs a good renderer like 15 years ago.

Quote from: Dr PR on September 07, 2011, 10:38:53 PM
One problem is that DesignCAD can't export 3D solids to any program.

The only file formats available that work reliably are DXF and DWG (note, I haven't tried VRML because it is pretty much worthless until browsers start supporting it). When DesignCAD solids are exported they are exploded, and what should be smooth curved surfaces become a mess of flat facets. Who would want to render that?

Phil
I export to Cinema 4D all the time and get pretty good results (for lines and 3d surfaces) via DXF. Dcad's solid definitions are lost but using the C4D's option to import by layers/colors surfaces with the same color on the same layers become a single 'Polygon' entity (c4d's equivalent to dc's 'Solids'). Polygons have the same anatomy as Solids: dcad's 'grid surfaces' come across intact, ie, each facet shares adjacent points. Dcad's Planes don't end up sharing points with adjacent facets but they are all a part of the same C4D entity. C4D has the option to 'optimize', which combines all points within a certain radius into one. You may have to take off you dcad hat to comprehend the concept of surfaces sharing points. Think of it like a dcad Grid Surface that doesn't have to have the same number of points in each line, so a surface can stick off from any edge and connect to any other edge (imagine if model of a face could be made up of a single dcad Grid Surface). Now imagine that you could take any facet and detach it from it's adjacent facets and it is still one entity (image taking a dcad Text entity, exploding it so the letters become vectors, converting the vectors into planes and it is all still one entity).

The only problem when exporting is dcad's holes may come over as surfaces in c4d. Since I keep all my solids that were needed for a boole operation in dcad I export these rather than the resulting solid then apply the boole operation to them in c4d (I usually export a piece at a time as I build the model in dcad, so I boole as I go). I even have a dcad macro that will write a c4d macro to generate solid booled objects from flat lines imported from dcad.

I guess you may be wondering why I use dcad to model instead of c4d alone. C4D is extremely powerful, even magical, but it lacks dcad's accuracy (most important to me), viewing ability (except you can fly thru by moving cameras), ease of snapping and basiccad. Generally, what one of the programs excels in the other stinks in. So I can build a reliably accurate model in dcad (for construction purposes) and export it to c4d, fix it up and render or animate like crazy (for discussion and presentation purposes).

Attached are 2 image of a car I'm modeling. One shows the modeling process in dcad and the other shows the result in c4d. In dcad I have exact control over the lines created to generate the curved grid surfaces. In c4d I can pretty up to my heart's content. The 2nd car in the image is an 'instance' of the 1st (like a dcad 'block') that I'm using to study the reflections on the car's body.

Lar
ps: I have the studio bundle of C4D which costs about 30+ times as much as dcad.

Dr PR

Lar,

Cool! The reflections are especially nice. Unfortunately the C4D price is a bit steep for hobby use (at least for me).

I have found that exporting R12 DXFs from DesignCAD into AccuTrans3D ($25US) produces very nice surfaces. So, like C4D, it somehow reconstructs fragmented solids. It is also very layer dependent so everything in a single layer can be converted to a 3D object easily. It also works by color, so even when you have multiple objects of different colors on a layer it can sort them out.

About all I use AccuTrans3D for is generating STL stereolith files. I can't open any of the other formats it creates - it doesn't write DWGs.

Phil

DesignCAD user since 1987

MarkX

Hi Lar,

Those results are nice, but that sure seems like a lot of conversion work.

Which one of the C4 products do you use? It looks like you (or your employer?) must be paying somewhere from $1000 to $2500 for the ability to render.

It seems like if you have to do all that work to transport between DC and C4, and if you're paying big bucks to render, that you might as well buy a single product that can do precision drawing  and rendering. That other IMSI product, perhaps.

Mark

Lar

Mark,

How do you put a price on peace of mind. Prior to computers I specialized in high quality renderings by hand so I had a standard to live up to. Dcad was always an amazing cad program but when it came to high quality renderings it still can't deliver. After about 15 disappointing years trying numerous other cads and 3d packages a fellow forum member suggested C4D because the conversion was essentially trouble free. Best advice I ever had. I downloaded the trial version to test on a high quality fly-thru animation of a big project and it more than paid for itself before I even bought the full version. I only had time to learn the animation aspect so I modeled in dcad and animated in c4d. Over time I learned that dcad and c4d 'completed' each other so I still work that way today. I now can do modeling in c4d if I was forced to but what I can model to my satisfaction in 10 seconds in dcad I may take 30 minutes to do in c4d. C4d may have real time parametrics, materials that can literally do anything, and amazing animation ability but it has not a single intersection command, has unreliable snapping, doesn't like to be bothered about zooming in, is stuck on 3 decimal places and its coding is not as easy for me as basiccad. Converting from dcad via dxf is actually very reliable. Dcad's exporting works well, especially the 'selection only' feature and importing into c4d is a simple drag and drop. I export parts as I create them and it's so easy I normally go back and forth between the two programs tweaking the export. My description in my previous post may sound complicated but that's because I like to push programs to their limits and make them do things their creators are not aware of. Plus, describing something always sounds a lot more complicated than it is to perform.

The standard version of c4d cost about $700 but I decided to get the studio bundle, which cost me over $3,000. It has lots of components for animation related stuff (as opposed to architectural renderings) like dynamics, clothing, fire/smoke, character rigging, etc. I'm interested in animation because before getting into architecture I made stop-action movies. Unfortunately, architecture has kept me very busy, thankfully, and as yet I did not have time to get into the imaginative side of animation.

Lar

Dr PR

Lar,

Thanks for the information.

I recall when the "Myst" series of games came out with the beautifullly rendered (static) scenes, and thought it would be nice to create something like that. DesignCAD was barely into 3D at that time and did not even have shadows. So I thought creating the scenes in DesignCAD and rendering them in some other program would be the way to go - just as you are doing. This was how movies like "Shrek" and "Lord of the Rings" were made, using multiple programs each optimized for the job they do.

However, every program I looked at at that time either could not import any files DesignCAD created or they couldn't reconstruct the solids. Plus they had really primitive user interfaces that made doing any rework a major chore. It is good that you have found a combination of programs that allow you to create the nicely rendered scene from your DesignCAD drawings. Someday I may follow your lead. Of course, if IMSI every gets its act together with a rendering add-on for DesignCAD they will get my money instead of the makers of c4d. (IMSI has one for Sketchup!)

Phil
DesignCAD user since 1987

Lar

I exported a not too simple model from dcad to sketchup when it first came out. Don't remember having any difficulty via dxf or dwg. I did a good presentation on a building's shell with a structural engineer using the slice thru feature. It was impressive the way it faded from page to page. The only reason I didn't stick with sketchup was because the slice thru's were hollow, not closed off like when you do a dcad slice. They wanted feedback so I sent them an email lamenting this but of course they did nothing about it. Don't know if it has changed any now.

In c4d the booles are parametric but otherwise the result is the same as in dcad: each resulting surface takes on the properties of the original solid. In dcad this means if you can have 2 different colored surfaces in the resulting solid. C4d's extensive material properties takes this to another level. You can have a combination of any 2 materials imaginable in one solid. For building sections I can apply a material with a hatch look to the cutting solid so cuts thru objects look like the typical hatches we apply in architectural sections and details (eg: dotted for concrete, horizontal lines for brick, curved lines for stud walls, etc).

Lar

Darkvil

#21
Well I have been playing around and now it all works and for free too :)

Setup:
Install Blender - install stand alone LuxRender with blender exporter plugin
(I didnt install PyLux python to see the materials in Blender directly as it slowed my machine down to much)
In Blender activate the LuxRender addon and select it as default renderer.

Workflow
1. Export models from DesignCAD using the obj macro

2. Import in into Blender
Select all the objects and Scale to appropriate size.

3. Setup the lights and background (I have a default file with all this done now to import obj into.)
Assign materials to objects in Blender using the LuxMaterials in the dropdowns or create your own, very easy.

4. Export from Blender as a lxs (LuxRender File)

Render Output
Open LuxRender and just open the file and process.
You can do it direct in blender but I like it as a separate tool and process.
To run on another machine so just have to transfer the lxs file.

The results are well stunning am doing a render tonight (as it takes a long time to process)
of the suspension arm example from DesignCAD (went crazy with the materials to see what it can do)
will post it here tomorrow hopefully.

Next need to persuade someone to integrate the LuxRender code into DesignCAD, how awesome would that be :)

Update: a sneak preview after 1.5 hrs on a standard small low spec laptop
LuxRender takes automatic snapshots as it goes which is handy
the full rendered image will be perfect in the morning hopefully :)
Zoom in here http://tinyurl.com/7ozkckf.
This is still working in progress not the final image



Dr PR

Is the 9:16 AM image the final product? Or is this just one of the intermediate renders?

If this is the final product it illustrates the  major problem (in my opinion) with exporting solids from DesignCAD. Notice how the springs and the hub have obvious large facets. These are all supposed to be smooth surfaces and not faceted. When exported from DesignCAD as DXF or DWG (the only workable options - maybe VRML) many solids are exploded into facets. Grids may be saved as meshes.

I have thought about using Blender and the Lux Render renderer looks nice - I like the reflections in the "chrome" bars.

If we can find a way to export a DesignCAD file into a program that will reconstruct the solids and then export to a file that Blender can import we may be able totake advantage of Lux Render.

I occasionally use AccuTrans3D ($20) to create STL files from DesignCAD DXFs. AccuTrans does seem to reconstruct the solids reasonably well. Here is a list of the file formats that Accutrans can export to:

3D Metafile ASCII (.3Dmf)
3D Metafile binary (.3Dmf)
3D Studio ASCII (.asc)
3D Studio binary (.3ds)
CableMod (.xml)
Collada (.dae)
DirectX ASCII (.x)
DirectX binary (.x)
DXF (.dxf)
Imagine 1 original (.iob)
Imagine 2 huge objects (.iob)
Lightscape (.lp)
Lightwave 1 original (.lwo)
Lightwave 2 huge object (.lwo)
Maya MA (.ma)
Open Inventor (.iv)
POV-Ray 3.5 (.pov)
RealMation V4 (.rbs)
RenderWare (.rwx)
Satellite Tool Kit (.mdl)
Sculpt 3D/4D (Amiga) (.scene)
SoftimageXSI (.xsi)
Stereolithography ASCII (.stl)
Stereolithography binary (.stl)
trueSpace ASCII (.coa)
trueSpage binary (.cob)
Turbo Silver 3.0 (.iob)
VideoScape ASCII (.geo)
Viewpoint Scene (.mtx)
VRML 1 (.wrl)
VRML 2 (.wrl)
Wavefront (.obj)
X3D (.x3d)
XGL (.xgl)
XYZ (.xyz)
ZGL (.zgl)

Of course this list illustrates the problem with computer software - a complete babble of icompatible languages. Each program incompatible with the others, and thereby useless to most of the world.

Phil
DesignCAD user since 1987

Darkvil

#23
 This is still just a very rough image final is tomorrow,

the facets are no problem, in blender you just subdivide the surfaces with non destructive layers,
although this might be an issue if you just what to subdivide in one axis or plane.
didn't have time to do it on this image but will on the real work images I have to create.
I wonder if you could convert everything to a mesh before exporting ?

Am going to have a good look at the original mesh and see if I can work out whats going on.

Think I will try a selection of spheres with varying number of facets in DesignCAD and see what happens to them through the workflow
there may be a minimum resolutions needed before it looks smooth when it goes into blender, there may be some thresholding or averaging going on.

I will check out accutrans3d and will also look at this pure meshing and repair freeware http://meshlab.sourceforge.net/

The main struts are not chrome, but like a translucent plastic see through to some extent
there is some chrome near the ball joints just behind the break disc.


:) look forward to seeing the final image in the morning,

DrollTroll

QuoteNotice how the springs and the hub have obvious large facets. These are all supposed to be smooth surfaces and not faceted.

Many rendering packages have either a per-drawing or a per-surface smoothing option, where you can turn on surface smoothing, and possibly set a maximum angle that will be smoothed; typically the smoothing angle is less than 90, and for most DesignCAD-sourced drawings I'd probably set it to somewhere between 30 and 60 degrees.
25 years with DesignCAD

Dean

#25
"If we can find a way to export a DesignCAD file into a program that will reconstruct the solids and then export to a file that Blender can import we may be able totake advantage of Lux Render."
Hi Phil, I don't use lux render(don't have the patience for it) but I do use blender.Here is an example of something I put together using designcad 3d max v21 and blender. The picture below displays a sphere and a 2dprofile sweep created in designcad3d max then using a (magic macro) exported as an obj file. I then imported into blender and in blender there is a shade smooth option. There is also a non-destructive modifier (sub-division surface) that smooth's the object. Blender is a great program and in my opinion well worth going through the learning curve. Blender can import collada, 3ds, stl, wavefront(obj) and a few others.Another good example is I exported the DesignCad " plane 3d sample drawing using Magic's macro and when I imported into blender I was able to apply materials to all the different objects that make up the plane.
edit: just to be clear,you can render in blender. Blender has a powerful built-in render engine.
DesignCad 3D max 2021
Lenovo 17.3"Laptop Intel(R) Core(TM) i7-9750H CPU @ 2.6GHz/Turbo boost 6 cores 12 threads.16GB memory.SSD 256GB/HDD 1TB 7200 Rpm.Nvidia Graphics GeForce GTX 1660 Ti 6GB
Windows 10 Home 64 bit

Lar

Quote from: Dr PR on January 23, 2012, 12:22:50 PM
...
Notice how the springs and the hub have obvious large facets. These are all supposed to be smooth surfaces and not faceted. When exported from DesignCAD as DXF or DWG (the only workable options - maybe VRML) many solids are exploded into facets. Grids may be saved as meshes.

Phil,

I exported the same file to c4d via object and dxf. Both came over exactly the same (including the hierarchy), except the obj ignored the lines entities in the file. The brake disc came over chunky (like in Darkvil's image), as did the cone above the spring, but to a lesser degree. That's due to the way it was modeled in dcad, though. The creator should have used a bigger number when they were swept. The spring and everything else came over very smooth, the same as is how it looks in a dcad gouraude or phong shading.

Like I said in a previous post in this topic, dxf may lose the solid designation but otherwise the anatomy of a dcad solid is the same: plane surfaces are independent but grid surfaces are unified. Using the 'color/layer' import option in c4d, entities of the same color on the same layer (in dcad) become a single 'polygon' in c4d (although some or all of the surfaces can be detached from each other). The original point count of the surfaces in the file is 58,823. After optimization in c4d this was reduced to 37,969. If every grid surface had been broken into planes the point reduction would have been far greater.

I just did a vmrl export from dcad and it came over exactly as constructed in dcad, minus the solid designation (if you explode the solids in dcad you will see that the booled ones consist of planes). C4d's vmrl importer has no layer/color option so you end up with more entities. Layer names were totally ignored and everything was named 'Polygon', making it extremely difficult to select by names and recombine the fragments (the entities were named after their layers in the other imports). The point count was optimized from 57,990 to 21,710.

Quote from: Dr PR on January 23, 2012, 12:22:50 PM
If we can find a way to export a DesignCAD file into a program that will reconstruct the solids and then export to a file that Blender can import we may be able totake advantage of Lux Render.

The trick here is the modeler. He/she has to use whatever tricks available to minimize fragmentation of the export. You method of manually reconstructing solids is a good example. I would only do that in extreme cases. It's easier for me to clean up in c4d.

Maybe there is a way to maintain grid integrity in blender that Darkvil isn't aware of yet. His image shows promise but personally I don't like the graininess, so I'm anxious to see the final result. Blender takes very long to render, though. C4d would complete a high level rendering of that model in about 10 seconds, allowing me to constantly check the rendering as I create. Well worth the big bucks, I would say.

Lar




Darkvil

#27
Ok I have had a whole day on the problem and my head is spinning, but I have come to some conclusions.

Here is the final render from the DC3D to Blender to LuxRender
see full size image here http://tinyurl.com/8y7hryn



I really like this output, the materials and shadows are awesome, accuracy of the render is amazing,
you can see under the units perspex lower arm where the light is refracted and accumulates into a bright patch is really very realistic.

But and there is a big BUT, it took about 8 hours to render and there are still noise and render artifacts.

Seeing Deans post on just using the Blender render,
made me realise that I hadn't really explored this properly and mainly the materials needed more learning.

So I started to explore this and with the help of a blender materials database
managed to get this.
see full image size here http://tinyurl.com/6qg4df4



and I think this is pretty impressive,
yes the shadows are very basic, the light is not natural and so on but
for most of the things I need to do its adequate, nice clean image.
Best thing is, it only took a few minutes to render :)

And now the facets, well the original arm model is a very low res mesh so this is importing perfectly and rendering correctly.
It looks smooth in DC3D because its using a basic shading model that uses optical tricks to smooth it all out and helps to make it look nice.
You can smooth things in Blender and there seems to be several ways, subsurface division, hidef mesh resolution, smoothing etc.
Unfortunately all these method have their drawbacks with complex shapes and fine detail, and they all approximate stuff so you loose information.

see here I have smoothed out the top yellow cone and the break disc with lots of the mesh gone to produce a smooth result.
See the weird result at the top of the yellow cone where it connects to the joint.
The coil spring up the middle smoothed quite well.
See full size image here http://tinyurl.com/7zabtjm




In DC3D which I use it for very precise dimensioning of equipment down to the fraction of a milimeter etc, any smoothing or averaging can destroy the details I need to preserve especially when is goes on to CNC machining etc.

So the answer is in my case just to use fine meshing in the beginning from the start of a model in DC3D, using a sphere I would start with at least 20-30 vertex, when this then goes into blender the results are nice, and you can use just the smallest amount of smoothing to make it look perfect.

So this is where I will leave it for now,

Using the wavefront obj macro in DesignCad 3D to output your high res mesh to Object file,
Import into Blender, add your materials, lighting etc, and then render.


If you need a really basic step by step guide on this I might do one for the non blender people, as the interface is really not intuitive at all.

Its a quick easy workflow, you get the best of both worlds, the best user interface in DesignCAD for easy precise design, and great rendering in Blender, with seamless transfer of data between the two.

Update:
one last thing
if you ever want to clean a mesh coming out of DC3D then use this open source tool
http://meshlab.sourceforge.net/
Its pretty amazing at repairing, simplifying, optomising and joining meshes.
The drawback is it works only on one object at a time :(
I think this would be a great tool to use before sending a mesh to CNC or 3D printer :)
export from DC3D as obj and then meshlab will convert it into loads of formats.






Dr PR

Thank you all for your posts.

I have seen some very impressive work from Blender in the Ship Model Forum CAD section.

Darkvl's posts show a "problem" in the Blender renderings that is common to DesignCAD shading. If you create the brake disk and hub as a single solid the sharp junction between the two will be converted to a rounded edge. As DT said, if angles are broad they will be rounded while sharper angles will be shaded as sharp edges.

You can see another rendering problem at the edge of the brake disk and the edge of the yellow cone - here the edges are rounded, but in the original they are sharp. DesignCAD does a better job reproducing these edges. Perhaps there is a way in Blender to select an edge and make it render with a very small radius? If not, you could create the conical surface separate from the cylindrical surface so they would render as two separate items with a sharp edge between.

It looks like Blender can be used as a rendering engine for DesignCAD. I will keep this in mind and if I ever find time for experimenting I will try it.

Phil
DesignCAD user since 1987