Jump to content

GDI+ 3D Engine (Models, Shading, Rotation, Scaling, etc.)


minxomat
 Share

Recommended Posts

Hi there again!

This 3D Engine is completely written in AutoIt, except for the drawing functions from GDI+. No 3D libraries were used, every calculation is done manually.

I seriously dislike GDI+. I wrote this Engine a few months ago in plain AutoIt (using virtually no Includes at all) only utilizing the Graphics Control. It came out that polygon drawing using only GDI is suprisingly fast. For AntiAliasings sake and because of a few people who would like to see how it's done in GDI+, i converted it. Now the smoothing can be used at the cost of FPS. (There is still a FPS drop even with no smoothing at all...).

So what features does it have?

  • Own scene file format, quite similar to OBJ.
  • Dynamic face size (3 to ~20 vertices)
  • Light-affected shading (flat shading of course, Gaussian/Phong is going to be implemented later)
  • Effective z-ordering, therefore culling is possible
  • Real perspective drawing (unlike UEZ textured cube which is parallel mapped for example)
  • Translation
  • Rotation
  • Fog emulation
  • Variable shading intensity
  • Zooming

 

The model format is easy to use. 4 models are included (standard geometry).

The framerates are acceptable. The plain GDI Version scored about 120 FPS (with buffering). This GDI+ version is a few lines shorter and has fancy smoothing, but runs with max. 80 FPS without AA and max 45 FPS with full AA for me in 800x600.

There is a fullscreen mode which if set, ignores the width / height paramter. (Remeber: FPS also heavily depend on resolution).

I know the code is a huge mess, but it is the fastest way to do it. Please do not recommend for loops instead of Do's etc. (newer Au3 version show a serious performance drop when using For...).

Have fun!  o:)

3da.zip

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

Good work minx!  :thumbsup: 

The parallel mapped textured cube is unfortunately a limitation of the GDI+ function (_GDIPlus_DrawImagePoints). I didn't find a way using built-in functions to map textured surfaces which are displayed in correct perspective.

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

I'm talking about GDI+ built-in functions and there is already a working solution using ASM ;)

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

I seriously dislike GDI+. I wrote this Engine a few months ago in plain AutoIt (using virtually no Includes at all) only utilizing the Graphics Control. It came out that polygon drawing using only GDI is suprisingly fast.

The plain GDI Version scored about 120 FPS (with buffering). This GDI+ version is a few lines shorter and has fancy smoothing, but runs with max. 80 FPS without AA and max 45 FPS with full AA for me in 800x600.

Could you share your plain GDI version? I am interested in the plain version with no includes and ultra speed. Thanks!

Edited by robertcollier4
Link to comment
Share on other sites

Thanks, just what I was looking for to start learning GDI Plain. If you also have any other links talking about advantages of using GDI Plain over using GDI Plus - that would be much appreciated.

Edit: Previous results were skewed due to GDIPlain version showing FPS with GUICtrlSetData instead of WinSetTitle which was slowing it down. GDIPlain indeed is faster than GDIPlus. With FPS() functions in both showing FPS using WinSetTitle(), showing Cube.3DA I get 440 fps with GDIPlain and 310 fps with GDIPlus. (Test machine is WinXP SP3 x86 with Intel HD 4000 Integrated Graphics). Thx!

Test cases of both with anti-aliasing off:

GDI Plain:

StartUp(800, 600, False, 0, 0, 0, 0, 0, 0, 900, 999, 0.5, True)
LoadModelFromFile(".\Cube.3DA")
GDI Plus:

ASE_Initialize(".\Cube.3DA", 800, 600, False, 0, 0, 0, 0, 0, 0, 900, 999, 0, 0.5, 0)
Edited by robertcollier4
Link to comment
Share on other sites

As i said, i didn't optimize the loops for the old Version, so it could be slower. If you want to see other advanced examples for plain GDI check my processing UDF and the examples given.

 

I do not recommend to use GDI instead of GDI+. But i like to use GDI, or, if it is a more graphic heavy application, i switch to ogl4au3-2 oder DirectDraw. It is just fun to see what is possible with the Graphics Control  :gradulated:

// Yes, the GuiCtrlSetData slows it down a bit due the doublebuffer apllied to all controls. But if it works now, fine :)

Edited by minx

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

  • 7 months later...

Hi

Does someone knows of a simple 3D modeling software that supports this "3DA" file format ?

P.S.
I found this: MetasequoiaLE R3.0 freeware (see at bottom of that page for the freeware version)  but it does not support "3DA".
Its native format "mqo" is similar but not compatible.

(it works without installation, just unzip it in a folder and run it)

thsnks

Edited by PincoPanco

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

Hi

Does someone knows of a simple 3D modeling software that supports this "3DA" file format ?

 

While well off topic, you might want to look for software capable of both importing and exporting 3da and convert between formats. Convert to .obj and then back to .3da when you need to.

Link to comment
Share on other sites

While well off topic, you might want to look for software capable of both importing and exporting 3da and convert between formats. Convert to .obj and then back to .3da when you need to.

 

Thanks, but it's exactly what I am not finding.

sorry for the off topic trespassing.

anyway I tryed to build this double piramid (by hand) but some strange contorsions are shown...

8
v 1 1 0
v 5 1 0
v 5 5 0
v 1 5 0
v 3 3 5
v 1 1 10
v 5 1 10
v 5 5 10
v 1 5 10
9
f 3 4 3 2 255 255 0
f 3 4 2 1 255 0 0
f 3 4 1 0 0 255 0
f 3 4 0 3 0 0 255
f 4 0 1 2 3 100 100 100
f 3 4 8 7 255 255 0
f 3 4 7 6 255 0 0
f 3 4 6 5 0 255 0
f 3 4 5 8 0 0 255
f 4 5 6 7 8 0 255 255

What rules are to be respected to correctly compile the points and the lines (that delimits the faces) in the 3da file?

any advise is welcome

thanks

Edited by PincoPanco

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

Well 3DA is a proprietary format. It was just made for this script. While it may share some features with OBJ or other plain ASCII/ANSI model formats, I'm not aware of any 3rd party software using this. The format is only usable with convex objects and objects with no hole. You can get it to work, but there are some serious flaws in the format definition resulting from unnecessary code in the parser itself.

Due the fact that i won't maintain this weekend-project anymore, the format will not improve.

Here is the basic definition (Cube.3DA):

3dab54c.png

 

Your double pyramid model is correct in theory. What ruins it is the missing depth testing and background clipping in the engine itself. You can see the effect more clearly here (Knot.3DA):

3dabf5c.png

Edited by minx

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

Hi @Minx
thanks for the clarification (and for this nice script of course! :thumbsup: )

Hi @James1337

hey!  your function to extract data from an OBJ file is really ok :dance:

I modified it a bit so to convert and save an OBJ file to an 3DA file
This is the draft script I came out by modifying your function

PeekFile()

Func PeekFile()
    Local $sFile = FileOpenDialog("Select an obj file", "", "files (*.OBJ)")
    If @error Then
        MsgBox(0, "", "No file selected.")
    Else
        LoadOBJ($sFile, 255)
    EndIf
EndFunc   ;==>PeekFile

Func LoadOBJ($sFilename, $iColor)
    $output = FileOpen(StringTrimRight($sFilename, 3) & "3DA", 2) ; create output file
    Local $sData = StringReplace(FileRead($sFilename), @CR, "")
    Local $T1 = StringRegExp($sData, "(?m)^v (.+?)$", 3), $i, $T2, $j
    $VerNum = UBound($T1) - 1
    FileWrite($output, $VerNum & @CRLF)
    For $i = 0 To $VerNum
        $T2 = StringSplit($T1[$i], " ", 2)
        FileWrite($output, "v")
        For $j = 0 To 2
            FileWrite($output, " " & $T2[$j])
        Next
        FileWrite($output, @CRLF)
    Next
    $T1 = StringRegExp($sData, "(?m)^f (.+?)$", 3)
    $LineNum = UBound($T1) - 1
    FileWrite($output, $LineNum & @CRLF)
    For $i = 0 To $LineNum
        $T2 = StringSplit($T1[$i], " ")
        FileWrite($output, "f " & $T2[0])
        For $j = 1 To $T2[0]
            FileWrite($output, " " & $T2[$j] - 1)
        Next
        ; $iColor = 0xRRGGBB
        FileWrite($output, " " & BitShift($iColor, 16) & " " & BitAND(BitShift($iColor, 8), 0xFF) & " " & BitAND($iColor, 0xFF) & @CRLF)
    Next
    FileFlush($output)
    FileClose($output)
EndFunc   ;==>LoadOBJ

here two examples of 3D models

Autoit string in 3d (this stops rotating after few seconds, anyway here it is...)

193
v -12.75634766 -3.52050781 0.50000000
v -11.75048828 -3.52050781 0.50000000
v -10.96435547 -1.35253906 0.50000000
v -7.97119141 -1.35253906 0.50000000
v -7.13623047 -3.52050781 0.50000000
v -6.05712891 -3.52050781 0.50000000
v -8.98681641 3.63769531 0.50000000
v -10.00732422 3.63769531 0.50000000
v -10.69091797 -0.58105469 0.50000000
v -9.90478516 1.51855469 0.50000000
v -9.51904297 2.88574219 0.50000000
v -9.01123047 1.40136719 0.50000000
v -8.26416016 -0.58105469 0.50000000
v -12.75634766 -3.52050781 -0.50000000
v -11.75048828 -3.52050781 -0.50000000
v -10.96435547 -1.35253906 -0.50000000
v -7.97119141 -1.35253906 -0.50000000
v -7.13623047 -3.52050781 -0.50000000
v -6.05712891 -3.52050781 -0.50000000
v -8.98681641 3.63769531 -0.50000000
v -10.00732422 3.63769531 -0.50000000
v -10.69091797 -0.58105469 -0.50000000
v -9.90478516 1.51855469 -0.50000000
v -9.51904297 2.88574219 -0.50000000
v -9.01123047 1.40136719 -0.50000000
v -8.26416016 -0.58105469 -0.50000000
v -2.01416016 -3.52050781 0.50000000
v -1.22802734 -3.52050781 0.50000000
v -1.22802734 1.66503906 0.50000000
v -2.10693359 1.66503906 0.50000000
v -2.10693359 -1.11328125 0.50000000
v -2.25097656 -2.12646484 0.50000000
v -2.74169922 -2.67822266 0.50000000
v -3.48388672 -2.88085938 0.50000000
v -4.14794922 -2.68310547 0.50000000
v -4.49951172 -2.13867188 0.50000000
v -4.55322266 -1.21093750 0.50000000
v -4.55322266 1.66503906 0.50000000
v -5.43212891 1.66503906 0.50000000
v -5.43212891 -1.54785156 0.50000000
v -5.37841797 -2.36816406 0.50000000
v -5.10742188 -3.02001953 0.50000000
v -4.51660156 -3.46191406 0.50000000
v -3.65966797 -3.63769531 0.50000000
v -2.01416016 -2.75878906 0.50000000
v -2.01416016 -3.52050781 -0.50000000
v -1.22802734 -3.52050781 -0.50000000
v -1.22802734 1.66503906 -0.50000000
v -2.10693359 1.66503906 -0.50000000
v -2.10693359 -1.11328125 -0.50000000
v -2.25097656 -2.12646484 -0.50000000
v -2.74169922 -2.67822266 -0.50000000
v -3.48388672 -2.88085938 -0.50000000
v -4.14794922 -2.68310547 -0.50000000
v -4.49951172 -2.13867188 -0.50000000
v -4.55322266 -1.21093750 -0.50000000
v -4.55322266 1.66503906 -0.50000000
v -5.43212891 1.66503906 -0.50000000
v -5.43212891 -1.54785156 -0.50000000
v -5.37841797 -2.36816406 -0.50000000
v -5.10742188 -3.02001953 -0.50000000
v -4.51660156 -3.46191406 -0.50000000
v -3.65966797 -3.63769531 -0.50000000
v -2.01416016 -2.75878906 -0.50000000
v 2.06787109 -2.73437500 0.50000000
v 1.68212891 -2.76855469 0.50000000
v 1.38183594 -2.70507813 0.50000000
v 1.23046875 -2.53417969 0.50000000
v 1.18408203 -2.05078125 0.50000000
v 1.18408203 0.98144531 0.50000000
v 2.06787109 0.98144531 0.50000000
v 2.06787109 1.66503906 0.50000000
v 1.18408203 1.66503906 0.50000000
v 1.18408203 3.47656250 0.50000000
v 0.31005859 2.94921875 0.50000000
v 0.31005859 1.66503906 0.50000000
v -0.33447266 1.66503906 0.50000000
v -0.33447266 0.98144531 0.50000000
v 0.31005859 0.98144531 0.50000000
v 0.31005859 -2.00195313 0.50000000
v 0.41748047 -3.03955078 0.50000000
v 0.78857422 -3.43750000 0.50000000
v 1.53076172 -3.58886719 0.50000000
v 2.19482422 -3.51074219 0.50000000
v 2.06787109 -2.73437500 -0.50000000
v 1.68212891 -2.76855469 -0.50000000
v 1.38183594 -2.70507813 -0.50000000
v 1.23046875 -2.53417969 -0.50000000
v 1.18408203 -2.05078125 -0.50000000
v 1.18408203 0.98144531 -0.50000000
v 2.06787109 0.98144531 -0.50000000
v 2.06787109 1.66503906 -0.50000000
v 1.18408203 1.66503906 -0.50000000
v 1.18408203 3.47656250 -0.50000000
v 0.31005859 2.94921875 -0.50000000
v 0.31005859 1.66503906 -0.50000000
v -0.33447266 1.66503906 -0.50000000
v -0.33447266 0.98144531 -0.50000000
v 0.31005859 0.98144531 -0.50000000
v 0.31005859 -2.00195313 -0.50000000
v 0.41748047 -3.03955078 -0.50000000
v 0.78857422 -3.43750000 -0.50000000
v 1.53076172 -3.58886719 -0.50000000
v 2.19482422 -3.51074219 -0.50000000
v 2.60009766 -0.92773438 0.50000000
v 3.27148438 -2.93945313 0.50000000
v 5.03173828 -3.63769531 0.50000000
v 6.28417969 -3.32031250 0.50000000
v 7.15820313 -2.42919922 0.50000000
v 7.45849609 -0.85449219 0.50000000
v 6.77978516 1.08154297 0.50000000
v 5.03173828 1.78222656 0.50000000
v 3.40087891 1.20605469 0.50000000
v 3.50341797 -0.92773438 0.50000000
v 3.93798828 0.56152344 0.50000000
v 5.03173828 1.05468750 0.50000000
v 6.11816406 0.55908203 0.50000000
v 6.55517578 -0.89843750 0.50000000
v 6.12060547 -2.41699219 0.50000000
v 5.03173828 -2.91503906 0.50000000
v 3.93798828 -2.41943359 0.50000000
v 2.60009766 -0.92773438 -0.50000000
v 3.27148438 -2.93945313 -0.50000000
v 5.03173828 -3.63769531 -0.50000000
v 6.28417969 -3.32031250 -0.50000000
v 7.15820313 -2.42919922 -0.50000000
v 7.45849609 -0.85449219 -0.50000000
v 6.77978516 1.08154297 -0.50000000
v 5.03173828 1.78222656 -0.50000000
v 3.40087891 1.20605469 -0.50000000
v 3.50341797 -0.92773438 -0.50000000
v 3.93798828 0.56152344 -0.50000000
v 5.03173828 1.05468750 -0.50000000
v 6.11816406 0.55908203 -0.50000000
v 6.55517578 -0.89843750 -0.50000000
v 6.12060547 -2.41699219 -0.50000000
v 5.03173828 -2.91503906 -0.50000000
v 3.93798828 -2.41943359 -0.50000000
v 8.49365234 2.62695313 0.50000000
v 9.37255859 2.62695313 0.50000000
v 9.37255859 3.63769531 0.50000000
v 8.49365234 3.63769531 0.50000000
v 8.49365234 2.62695313 -0.50000000
v 9.37255859 2.62695313 -0.50000000
v 9.37255859 3.63769531 -0.50000000
v 8.49365234 3.63769531 -0.50000000
v 8.49365234 -3.52050781 0.50000000
v 9.37255859 -3.52050781 0.50000000
v 9.37255859 1.66503906 0.50000000
v 8.49365234 1.66503906 0.50000000
v 8.49365234 -3.52050781 -0.50000000
v 9.37255859 -3.52050781 -0.50000000
v 9.37255859 1.66503906 -0.50000000
v 8.49365234 1.66503906 -0.50000000
v 12.62939453 -2.73437500 0.50000000
v 12.24365234 -2.76855469 0.50000000
v 11.94335938 -2.70507813 0.50000000
v 11.79199219 -2.53417969 0.50000000
v 11.74560547 -2.05078125 0.50000000
v 11.74560547 0.98144531 0.50000000
v 12.62939453 0.98144531 0.50000000
v 12.62939453 1.66503906 0.50000000
v 11.74560547 1.66503906 0.50000000
v 11.74560547 3.47656250 0.50000000
v 10.87158203 2.94921875 0.50000000
v 10.87158203 1.66503906 0.50000000
v 10.22705078 1.66503906 0.50000000
v 10.22705078 0.98144531 0.50000000
v 10.87158203 0.98144531 0.50000000
v 10.87158203 -2.00195313 0.50000000
v 10.97900391 -3.03955078 0.50000000
v 11.35009766 -3.43750000 0.50000000
v 12.09228516 -3.58886719 0.50000000
v 12.75634766 -3.51074219 0.50000000
v 12.62939453 -2.73437500 -0.50000000
v 12.24365234 -2.76855469 -0.50000000
v 11.94335938 -2.70507813 -0.50000000
v 11.79199219 -2.53417969 -0.50000000
v 11.74560547 -2.05078125 -0.50000000
v 11.74560547 0.98144531 -0.50000000
v 12.62939453 0.98144531 -0.50000000
v 12.62939453 1.66503906 -0.50000000
v 11.74560547 1.66503906 -0.50000000
v 11.74560547 3.47656250 -0.50000000
v 10.87158203 2.94921875 -0.50000000
v 10.87158203 1.66503906 -0.50000000
v 10.22705078 1.66503906 -0.50000000
v 10.22705078 0.98144531 -0.50000000
v 10.87158203 0.98144531 -0.50000000
v 10.87158203 -2.00195313 -0.50000000
v 10.97900391 -3.03955078 -0.50000000
v 11.35009766 -3.43750000 -0.50000000
v 12.09228516 -3.58886719 -0.50000000
v 12.75634766 -3.51074219 -0.50000000
190
f 4 0 8 9 7 0 0 255
f 4 0 13 14 1 0 0 255
f 4 1 2 8 0 0 0 255
f 4 1 14 15 2 0 0 255
f 4 2 15 16 3 0 0 255
f 4 3 12 8 2 0 0 255
f 4 3 16 17 4 0 0 255
f 4 4 5 12 3 0 0 255
f 4 4 17 18 5 0 0 255
f 4 5 18 19 6 0 0 255
f 4 6 11 12 5 0 0 255
f 4 6 19 20 7 0 0 255
f 3 7 10 6 0 0 255
f 4 7 20 13 0 0 0 255
f 4 8 21 22 9 0 0 255
f 3 9 10 7 0 0 255
f 4 9 22 23 10 0 0 255
f 3 10 11 6 0 0 255
f 4 10 23 24 11 0 0 255
f 4 11 24 25 12 0 0 255
f 4 12 25 21 8 0 0 255
f 4 13 21 15 14 0 0 255
f 4 15 21 25 16 0 0 255
f 4 16 25 18 17 0 0 255
f 4 18 25 24 19 0 0 255
f 3 19 23 20 0 0 255
f 3 19 24 23 0 0 255
f 4 20 22 21 13 0 0 255
f 3 20 23 22 0 0 255
f 4 26 45 46 27 0 0 255
f 3 27 44 26 0 0 255
f 4 27 46 47 28 0 0 255
f 4 28 29 30 27 0 0 255
f 4 28 47 48 29 0 0 255
f 4 29 48 49 30 0 0 255
f 4 30 31 44 27 0 0 255
f 4 30 49 50 31 0 0 255
f 4 31 50 51 32 0 0 255
f 3 32 44 31 0 0 255
f 4 32 51 52 33 0 0 255
f 4 33 43 44 32 0 0 255
f 4 33 52 53 34 0 0 255
f 4 34 42 43 33 0 0 255
f 4 34 53 54 35 0 0 255
f 4 35 40 41 34 0 0 255
f 4 35 54 55 36 0 0 255
f 4 36 39 40 35 0 0 255
f 4 36 55 56 37 0 0 255
f 4 37 38 39 36 0 0 255
f 4 37 56 57 38 0 0 255
f 4 38 57 58 39 0 0 255
f 4 39 58 59 40 0 0 255
f 4 40 59 60 41 0 0 255
f 3 41 42 34 0 0 255
f 4 41 60 61 42 0 0 255
f 4 42 61 62 43 0 0 255
f 4 43 62 63 44 0 0 255
f 4 44 63 45 26 0 0 255
f 3 45 63 46 0 0 255
f 4 46 49 48 47 0 0 255
f 4 46 63 50 49 0 0 255
f 3 50 63 51 0 0 255
f 4 51 63 62 52 0 0 255
f 4 52 62 61 53 0 0 255
f 4 53 60 59 54 0 0 255
f 3 53 61 60 0 0 255
f 4 54 59 58 55 0 0 255
f 4 55 58 57 56 0 0 255
f 4 64 84 85 65 0 0 255
f 4 65 82 83 64 0 0 255
f 4 65 85 86 66 0 0 255
f 4 66 81 82 65 0 0 255
f 4 66 86 87 67 0 0 255
f 4 67 80 81 66 0 0 255
f 4 67 87 88 68 0 0 255
f 4 68 79 80 67 0 0 255
f 4 68 88 89 69 0 0 255
f 4 69 78 79 68 0 0 255
f 4 69 89 90 70 0 0 255
f 4 70 71 72 69 0 0 255
f 4 70 90 91 71 0 0 255
f 4 71 91 92 72 0 0 255
f 4 72 75 78 69 0 0 255
f 4 72 92 93 73 0 0 255
f 4 73 74 75 72 0 0 255
f 4 73 93 94 74 0 0 255
f 4 74 94 95 75 0 0 255
f 4 75 95 96 76 0 0 255
f 4 76 77 78 75 0 0 255
f 4 76 96 97 77 0 0 255
f 4 77 97 98 78 0 0 255
f 4 78 98 99 79 0 0 255
f 4 79 99 100 80 0 0 255
f 4 80 100 101 81 0 0 255
f 4 81 101 102 82 0 0 255
f 4 82 102 103 83 0 0 255
f 4 83 103 84 64 0 0 255
f 4 84 103 102 85 0 0 255
f 4 85 102 101 86 0 0 255
f 4 86 101 100 87 0 0 255
f 4 87 100 99 88 0 0 255
f 4 88 99 98 89 0 0 255
f 4 89 92 91 90 0 0 255
f 4 89 98 95 92 0 0 255
f 4 92 95 94 93 0 0 255
f 4 95 98 97 96 0 0 255
f 4 104 113 114 112 0 0 255
f 4 104 121 122 105 0 0 255
f 4 105 120 113 104 0 0 255
f 4 105 122 123 106 0 0 255
f 4 106 119 120 105 0 0 255
f 4 106 123 124 107 0 0 255
f 4 107 118 119 106 0 0 255
f 4 107 124 125 108 0 0 255
f 3 108 118 107 0 0 255
f 4 108 125 126 109 0 0 255
f 4 109 117 118 108 0 0 255
f 4 109 126 127 110 0 0 255
f 4 110 116 117 109 0 0 255
f 4 110 127 128 111 0 0 255
f 4 111 115 116 110 0 0 255
f 4 111 128 129 112 0 0 255
f 4 112 114 115 111 0 0 255
f 4 112 129 121 104 0 0 255
f 4 113 130 131 114 0 0 255
f 4 114 131 132 115 0 0 255
f 4 115 132 133 116 0 0 255
f 4 116 133 134 117 0 0 255
f 4 117 134 135 118 0 0 255
f 4 118 135 136 119 0 0 255
f 4 119 136 137 120 0 0 255
f 4 120 137 130 113 0 0 255
f 4 121 130 137 122 0 0 255
f 4 122 137 136 123 0 0 255
f 4 123 136 135 124 0 0 255
f 3 124 135 125 0 0 255
f 4 125 135 134 126 0 0 255
f 4 126 134 133 127 0 0 255
f 4 127 133 132 128 0 0 255
f 4 128 132 131 129 0 0 255
f 4 129 131 130 121 0 0 255
f 4 138 142 143 139 0 0 255
f 4 139 140 141 138 0 0 255
f 4 139 143 144 140 0 0 255
f 4 140 144 145 141 0 0 255
f 4 141 145 142 138 0 0 255
f 4 142 145 144 143 0 0 255
f 4 146 150 151 147 0 0 255
f 4 147 148 149 146 0 0 255
f 4 147 151 152 148 0 0 255
f 4 148 152 153 149 0 0 255
f 4 149 153 150 146 0 0 255
f 4 150 153 152 151 0 0 255
f 4 154 174 175 155 0 0 255
f 4 155 172 173 154 0 0 255
f 4 155 175 176 156 0 0 255
f 4 156 171 172 155 0 0 255
f 4 156 176 177 157 0 0 255
f 4 157 170 171 156 0 0 255
f 4 157 177 178 158 0 0 255
f 4 158 169 170 157 0 0 255
f 4 158 178 179 159 0 0 255
f 4 159 168 169 158 0 0 255
f 4 159 179 180 160 0 0 255
f 4 160 161 162 159 0 0 255
f 4 160 180 181 161 0 0 255
f 4 161 181 182 162 0 0 255
f 4 162 165 168 159 0 0 255
f 4 162 182 183 163 0 0 255
f 4 163 164 165 162 0 0 255
f 4 163 183 184 164 0 0 255
f 4 164 184 185 165 0 0 255
f 4 165 185 186 166 0 0 255
f 4 166 167 168 165 0 0 255
f 4 166 186 187 167 0 0 255
f 4 167 187 188 168 0 0 255
f 4 168 188 189 169 0 0 255
f 4 169 189 190 170 0 0 255
f 4 170 190 191 171 0 0 255
f 4 171 191 192 172 0 0 255
f 4 172 192 193 173 0 0 255
f 4 173 193 174 154 0 0 255
f 4 174 193 192 175 0 0 255
f 4 175 192 191 176 0 0 255
f 4 176 191 190 177 0 0 255
f 4 177 190 189 178 0 0 255
f 4 178 189 188 179 0 0 255
f 4 179 182 181 180 0 0 255
f 4 179 188 185 182 0 0 255
f 4 182 185 184 183 0 0 255
f 4 185 188 187 186 0 0 255

a 3d sphere

91
v -4.25325404 -2.23606798 -1.38196601
v -4.89716043 -0.85819653 -0.53039463
v -4.89716043 0.85819653 0.53039463
v -4.25325404 2.23606798 1.38196601
v -4.27364415 -2.57458960 0.32780191
v -4.27364415 -0.85819653 -2.44938041
v -4.67086179 -0.93796237 1.51765500
v -4.67086179 0.93796237 -1.51765500
v -4.27364415 0.85819653 2.44938041
v -4.27364415 2.57458960 -0.32780191
v -3.65012787 -2.57458960 2.24678769
v -3.65012787 -0.85819653 3.30757694
v -3.65012787 0.85819653 -3.30757694
v -3.65012787 2.57458960 -2.24678769
v -3.26477362 -3.63537885 -1.06078925
v -3.26477362 -2.57458960 -2.77718232
v -3.26477362 2.57458960 2.77718232
v -3.26477362 3.63537885 1.06078925
v -2.62865556 -2.23606798 3.61803399
v -2.62865556 2.23606798 -3.61803399
v -2.88675135 -3.97327236 0.93796237
v -2.88675135 -0.93796237 -3.97327236
v -2.88675135 0.93796237 3.97327236
v -2.88675135 3.97327236 -0.93796237
v -2.01774106 -3.63537885 2.77718232
v -2.01774106 -0.85819653 4.49357538
v -2.01774106 0.85819653 -4.49357538
v -2.01774106 3.63537885 -2.77718232
v -1.63238681 -4.69616810 -0.53039463
v -1.78411045 -3.97327236 -2.45561737
v -1.63238681 -2.57458960 -3.96318076
v -1.63238681 2.57458960 3.96318076
v -1.78411045 3.97327236 2.45561737
v -1.63238681 4.69616810 0.53039463
v -1.00887053 -4.69616810 1.38859116
v -1.00887053 -2.57458960 4.16577348
v -1.00887053 -0.85819653 -4.82137729
v -1.00887053 0.85819653 4.82137729
v -1.00887053 2.57458960 -4.16577348
v -1.00887053 4.69616810 -1.38859116
v 0.0000000e+0 -5.00000000 0.0000000e+0
v 0.0000000e+0 -4.69616810 -1.71639307
v 0.0000000e+0 -3.63537885 -3.43278613
v 0.0000000e+0 -3.97327236 3.03530999
v 0.0000000e+0 -2.23606798 -4.47213595
v 0.0000000e+0 -0.93796237 4.91123473
v 0.0000000e+0 0.93796237 -4.91123473
v 0.0000000e+0 2.23606798 4.47213595
v 0.0000000e+0 3.97327236 -3.03530999
v 0.0000000e+0 3.63537885 3.43278613
v 0.0000000e+0 4.69616810 1.71639307
v 0.0000000e+0 5.00000000 0.0000000e+0
v 1.00887053 -4.69616810 1.38859116
v 1.00887053 -2.57458960 4.16577348
v 1.00887053 -0.85819653 -4.82137729
v 1.00887053 0.85819653 4.82137729
v 1.00887053 2.57458960 -4.16577348
v 1.00887053 4.69616810 -1.38859116
v 1.63238681 -4.69616810 -0.53039463
v 1.78411045 -3.97327236 -2.45561737
v 1.63238681 -2.57458960 -3.96318076
v 1.63238681 2.57458960 3.96318076
v 1.78411045 3.97327236 2.45561737
v 1.63238681 4.69616810 0.53039463
v 2.01774106 -3.63537885 2.77718232
v 2.01774106 -0.85819653 4.49357538
v 2.01774106 0.85819653 -4.49357538
v 2.01774106 3.63537885 -2.77718232
v 2.88675135 -3.97327236 0.93796237
v 2.88675135 -0.93796237 -3.97327236
v 2.88675135 0.93796237 3.97327236
v 2.88675135 3.97327236 -0.93796237
v 2.62865556 -2.23606798 3.61803399
v 2.62865556 2.23606798 -3.61803399
v 3.26477362 -3.63537885 -1.06078925
v 3.26477362 -2.57458960 -2.77718232
v 3.26477362 2.57458960 2.77718232
v 3.26477362 3.63537885 1.06078925
v 3.65012787 -2.57458960 2.24678769
v 3.65012787 -0.85819653 3.30757694
v 3.65012787 0.85819653 -3.30757694
v 3.65012787 2.57458960 -2.24678769
v 4.27364415 -2.57458960 0.32780191
v 4.27364415 -0.85819653 -2.44938041
v 4.67086179 -0.93796237 1.51765500
v 4.67086179 0.93796237 -1.51765500
v 4.27364415 0.85819653 2.44938041
v 4.27364415 2.57458960 -0.32780191
v 4.25325404 -2.23606798 -1.38196601
v 4.89716043 -0.85819653 -0.53039463
v 4.89716043 0.85819653 0.53039463
v 4.25325404 2.23606798 1.38196601
179
f 3 0 4 1 0 0 255
f 3 0 14 4 0 0 255
f 3 0 15 14 0 0 255
f 3 1 5 0 0 0 255
f 3 1 6 2 0 0 255
f 3 1 7 5 0 0 255
f 3 2 7 1 0 0 255
f 3 2 8 3 0 0 255
f 3 2 9 7 0 0 255
f 3 3 9 2 0 0 255
f 3 3 17 9 0 0 255
f 3 4 6 1 0 0 255
f 3 4 10 6 0 0 255
f 3 4 20 10 0 0 255
f 3 5 15 0 0 0 255
f 3 5 21 15 0 0 255
f 3 6 8 2 0 0 255
f 3 6 11 8 0 0 255
f 3 7 12 5 0 0 255
f 3 7 13 12 0 0 255
f 3 8 16 3 0 0 255
f 3 8 22 16 0 0 255
f 3 9 13 7 0 0 255
f 3 9 23 13 0 0 255
f 3 10 11 6 0 0 255
f 3 10 18 11 0 0 255
f 3 10 24 18 0 0 255
f 3 11 22 8 0 0 255
f 3 11 25 22 0 0 255
f 3 12 21 5 0 0 255
f 3 12 26 21 0 0 255
f 3 13 19 12 0 0 255
f 3 13 27 19 0 0 255
f 3 14 20 4 0 0 255
f 3 14 28 20 0 0 255
f 3 14 29 28 0 0 255
f 3 15 29 14 0 0 255
f 3 15 30 29 0 0 255
f 3 16 17 3 0 0 255
f 3 16 32 17 0 0 255
f 3 17 23 9 0 0 255
f 3 17 33 23 0 0 255
f 3 18 25 11 0 0 255
f 3 18 35 25 0 0 255
f 3 19 26 12 0 0 255
f 3 19 38 26 0 0 255
f 3 20 24 10 0 0 255
f 3 20 34 24 0 0 255
f 3 21 30 15 0 0 255
f 3 21 36 30 0 0 255
f 3 22 31 16 0 0 255
f 3 22 37 31 0 0 255
f 3 23 27 13 0 0 255
f 3 23 39 27 0 0 255
f 3 24 35 18 0 0 255
f 3 24 43 35 0 0 255
f 3 25 37 22 0 0 255
f 3 25 45 37 0 0 255
f 3 26 36 21 0 0 255
f 3 26 46 36 0 0 255
f 3 27 38 19 0 0 255
f 3 27 48 38 0 0 255
f 3 28 34 20 0 0 255
f 3 28 40 34 0 0 255
f 3 28 41 40 0 0 255
f 3 29 41 28 0 0 255
f 3 29 42 41 0 0 255
f 3 30 42 29 0 0 255
f 3 30 44 42 0 0 255
f 3 31 32 16 0 0 255
f 3 31 49 32 0 0 255
f 3 32 33 17 0 0 255
f 3 32 50 33 0 0 255
f 3 33 39 23 0 0 255
f 3 33 51 39 0 0 255
f 3 34 43 24 0 0 255
f 3 34 52 43 0 0 255
f 3 35 45 25 0 0 255
f 3 35 53 45 0 0 255
f 3 36 44 30 0 0 255
f 3 36 54 44 0 0 255
f 3 37 47 31 0 0 255
f 3 37 55 47 0 0 255
f 3 38 46 26 0 0 255
f 3 38 56 46 0 0 255
f 3 39 48 27 0 0 255
f 3 39 57 48 0 0 255
f 3 40 52 34 0 0 255
f 3 40 58 52 0 0 255
f 3 41 58 40 0 0 255
f 3 41 59 58 0 0 255
f 3 42 59 41 0 0 255
f 3 42 60 59 0 0 255
f 3 43 53 35 0 0 255
f 3 43 64 53 0 0 255
f 3 44 60 42 0 0 255
f 3 45 55 37 0 0 255
f 3 45 65 55 0 0 255
f 3 46 54 36 0 0 255
f 3 46 66 54 0 0 255
f 3 47 49 31 0 0 255
f 3 47 61 49 0 0 255
f 3 48 56 38 0 0 255
f 3 48 67 56 0 0 255
f 3 49 50 32 0 0 255
f 3 49 62 50 0 0 255
f 3 50 51 33 0 0 255
f 3 50 63 51 0 0 255
f 3 51 57 39 0 0 255
f 3 51 63 57 0 0 255
f 3 52 64 43 0 0 255
f 3 52 68 64 0 0 255
f 3 53 65 45 0 0 255
f 3 53 72 65 0 0 255
f 3 54 60 44 0 0 255
f 3 54 69 60 0 0 255
f 3 55 61 47 0 0 255
f 3 55 70 61 0 0 255
f 3 56 66 46 0 0 255
f 3 56 73 66 0 0 255
f 3 57 67 48 0 0 255
f 3 57 71 67 0 0 255
f 3 58 68 52 0 0 255
f 3 58 74 68 0 0 255
f 3 59 74 58 0 0 255
f 3 59 75 74 0 0 255
f 3 60 75 59 0 0 255
f 3 61 62 49 0 0 255
f 3 61 76 62 0 0 255
f 3 62 63 50 0 0 255
f 3 62 77 63 0 0 255
f 3 63 71 57 0 0 255
f 3 63 77 71 0 0 255
f 3 64 72 53 0 0 255
f 3 64 78 72 0 0 255
f 3 65 70 55 0 0 255
f 3 65 79 70 0 0 255
f 3 66 69 54 0 0 255
f 3 66 80 69 0 0 255
f 3 67 73 56 0 0 255
f 3 67 81 73 0 0 255
f 3 68 78 64 0 0 255
f 3 68 82 78 0 0 255
f 3 69 75 60 0 0 255
f 3 69 83 75 0 0 255
f 3 70 76 61 0 0 255
f 3 70 86 76 0 0 255
f 3 71 81 67 0 0 255
f 3 71 87 81 0 0 255
f 3 72 79 65 0 0 255
f 3 73 80 66 0 0 255
f 3 73 81 80 0 0 255
f 3 74 82 68 0 0 255
f 3 74 88 82 0 0 255
f 3 75 88 74 0 0 255
f 3 76 77 62 0 0 255
f 3 76 91 77 0 0 255
f 3 77 87 71 0 0 255
f 3 77 91 87 0 0 255
f 3 78 79 72 0 0 255
f 3 78 84 79 0 0 255
f 3 79 86 70 0 0 255
f 3 80 83 69 0 0 255
f 3 80 85 83 0 0 255
f 3 81 85 80 0 0 255
f 3 81 87 85 0 0 255
f 3 82 84 78 0 0 255
f 3 82 89 84 0 0 255
f 3 83 88 75 0 0 255
f 3 83 89 88 0 0 255
f 3 84 86 79 0 0 255
f 3 84 90 86 0 0 255
f 3 85 89 83 0 0 255
f 3 85 90 89 0 0 255
f 3 86 91 76 0 0 255
f 3 87 90 85 0 0 255
f 3 87 91 90 0 0 255
f 3 88 89 82 0 0 255
f 3 89 90 84 0 0 255
f 3 90 91 86 0 0 255

for those interested I can describe how I have easily created these two 3d examples:

  • download this simple freeware program http://www.wings3d.com
  • create your 3d model using it
  • Use the File -> Export -> WaveForm (. obj) ... to save the file
  • using the above script to convert the saved file from OBJ to 3DA
  • use the converted file with the script of MR. Minx

Thanks again

bye

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...