Hi, I have a lot of .dxf’s files with drawings of sheets with holes, I want to generate rendered .jpg’s images file like this one below of with that sheet with holes, how can I do this? (many images like this one, but with different holes patterns)
I can try to convert the dxf files into a black/white images to be used as a mask if this is needed as a previous step, but ideally I want to be able to do it if it is possible importing directly the .dxf.
As far I know this scene was made by a freelancer using Keyshot, so I can get the needed files that he used as input to keyshot or the keyshot file itself.
Please beware that I don’t know much about 3D or filetypes involved neither, I’m a programmer and I need to automate this with python.
If I got it right, this is what I understand you want to do:
You have a .dxf file, which seems to be AutoCAD’s way of storing 2D and 3D drawings several years ago.
You want to render that with some images on the background.
I apologize if this is not what you wanted. You might want to explain in detail.
I do not know how someone might be able to automate this, because I assume each image is going to be different.
But doing this can be done easily in blender if you have only a few images:
Install blender if you don’t have.
Install the .dxf importer-exporter addon from within blender.
Import the the .dxf you have.
Import the image as a backdrop and click render.
Simply googling these steps will let you know how to do it.
But the image you obtain might not be very realistic. That requires a bit more work.
See World Environment if you want.
Hi, @nerdishstuff Thanks for your kindly response, unfortunately I need to automate this stuff in order to process many, a lot of files, each file will have different holes pattern, some will round, some square, some with different or same sizes of holes, etc, and later new files will be added in the future… I can manage to convert the dxf into a jpg/image to act as a mask (black&white) to represent surface/holes.
But I need to get something similar to that image.
Maybe I could import a file (the sheet with that size, in that angle/perspective, etc, and later add the background as an image jpg external file, and it will be really useful to apply a colour or texture to the perforated sheet too.
I was reading messages here and I found that there is a screenshot function that allows to generate a jpg file… But I dont konw nothing about Panda3D and don’t know the previous steps to generate that.
May be someone can help me joining some snippets and get a sample code to be able to test it and modify it.
thanks @serega-kkz !
Great! I will try that code asap.
There is also a way to run this headless on a server right?
in loadModel I assume that I could load other file with a figure in 3D right?
and there is some way to change the 3D figure texture and assign that mask to have the holes, right?
I have lying around sketchup, I can create a 3d figure using it and exporting to some filetype right ?