Can Blender generate a scene based on a text file?

I wrote a Python program that generates a coordinate plane of 10,000 tiles with each plate having characteristics such as texture, temperature, height, etc. I am doing this for a project and I think that a much better way to show this part of the project was to show 3D rendering, and the best program I know is Blender. I know that scripts can be written in Python for Blender, but I'm not sure how blender can generate things based on a text file that my Python program writes. If anyone knows if and how Blender can generate things from a text file or in some other way, I could write a Python program in Blender, that would be great!

~ Thanks

+4
source share
1 answer

You will need to make a Python script for this that will read your text file and use the blender API to create fragments and scenes. Blender can only display files if they have programs (plugins) that do this. In fact, most file formats can be read by the blender only thanks to the plugins implemented in Python that come with the program.

Alternatively, you can adapt your program that generates a scene so that, in addition to generating a text file, you can draw it inside a blender using your API. This approach may be easier than writing separate logic to parse your own file.

If your script is Python2.x, you will need to use blender 2.49 - since Blender 2.5 and newer versions use Python 3 for scripting.

+1
source

Source: https://habr.com/ru/post/1384232/


All Articles