Author Topic: Updates Blender export / DDA file format  (Read 1034 times)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10832
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Hi,

I had to add a 3D eggplant to one of my games and noticed, that my AC3D license was too old and the uppgrade fee was raised a lot and whatnot. So I installed the new Blender 2.9 and after a few videos, I got the hang of it. It improved a LOT! If you want to do 3D, try this out.
So, the Blender export filter was broken due to API changes. I had a few nights to get that running again. The old script was about 10+ years old. :)
(reminder to myself: always comment code. Code you wrote 5 years ago is code someone else might have written...)

So, I fixed the export and found, the dda files were quite big. I inserted a scale factor for normals and vertex coordinates and now... the dda (ASCII!) file format is more compact than the ddd binary file format I used to be so proud of.

The trick is, that the vertex positions*1000 often result in numbers like "5" or "15", which is 2-3 bytes including a separating space caracter. The binary always takes 4 bytes per float. Same for the normal directions*100.
The next update will bring both, the export filter and the dda 2.0 support to you.

Offline SnooPI

  • Dr. Type
  • ****
  • Posts: 421
    • View Profile
Re: Updates Blender export / DDA file format
« Reply #1 on: 2021-Nov-14 »
Although I don't like Blender's interface it's a very good news.

(reminder to myself: always comment code. Code you wrote 5 years ago is code someone else might have written...)
:D I confirm!


Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2771
    • View Profile
Re: Updates Blender export / DDA file format
« Reply #2 on: 2021-Nov-14 »
Nice work Gernot!  8)
Cheers,

Ian.

ā€œIt is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.ā€
(E. W. Dijkstra)

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4419
    • View Profile
    • FUED
Re: Updates Blender export / DDA file format
« Reply #3 on: 2021-Nov-16 »
Yep I could say that Blender is on a path to overthrown other 3d packages for quite a while and I do believe they are right there already.
I believe vanguard on that front is now on their room, other than open source, you get a neat script language :)
Heck, one can even video edit or kind of after effect into it :) So an upgrade on their file format support is just marvelous.
Also, one can look into their game engine... maybe that can be exported too?
Great work, will give a try as time pops in :)