nfwu Posted March 3, 2006 Share Posted March 3, 2006 (edited) v0.2 : InputManger now works.Short-Term todo list:> the camera is fixed at (0,0,0). Even though the tree can move toward or away from this point along the z-axis, you want to be able to move the camera around freely.> When the tree is very close to the camera, the polygon is drawn in strange ways. Also, when you zoom in too far (past the tree), the tree appears upside down! This is because polygons are not clipped to the view frusum.> Finally, the tree is flat, which is kind of boring. Solid trees and other solid shapes will be more interesting.ok... now back to the demo...Test exe:(Whenever an "ASSERT" box pops up, click Ignore.)Libraries: http://www.autoitscript.com/fileman/users/nfwu/AutoIt3D.zip(Source code for test is in /test/ of the ZIP, as usual)Controls for demo:ESC : QuitUp Arrow : Zoom InDown Arrow : Zoom Out#)NOTES:1) The libraries are pretty complicated to use *for now*. I will create an easier to use version soon after I have completed the short-term goals listed above.Please make suggestions!!! Edited December 28, 2012 by Jon onlineth 1 TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
rambo3889 Posted March 3, 2006 Share Posted March 3, 2006 NICE : D My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! Link to comment Share on other sites More sharing options...
death pax Posted March 3, 2006 Share Posted March 3, 2006 Wow! never thought it would be possible Link to comment Share on other sites More sharing options...
greenmachine Posted March 4, 2006 Share Posted March 4, 2006 That's pretty cool. It reminds me a lot of my physics class.. the inversion effect of a lens when you get to a certain angle (in this case, when you zoom in enough). Nice work so far. Link to comment Share on other sites More sharing options...
Oxin8 Posted March 5, 2006 Share Posted March 5, 2006 that's pretty sweet. ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
jvanegmond Posted March 6, 2006 Share Posted March 6, 2006 I think it's cool. But man, you really need to switch to J or C for these kind of things. I haven't looked at the code but what you're doing really is trying to make a 2D environment react like a 3D one, so it looks like 3D. Real 3D needs a different engine. github.com/jvanegmond Link to comment Share on other sites More sharing options...
The Kandie Man Posted March 7, 2006 Share Posted March 7, 2006 Can't you import Direct X libraries and use Direct X API functions to create 3d objects and such? I did it in visual basic, but i am pretty sure you could import the same libraries. Maybe, no? "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
nfwu Posted March 8, 2006 Author Share Posted March 8, 2006 (edited) Can't you import Direct X libraries and use Direct X API functions to create 3d objects and such? I did it in visual basic, but i am pretty sure you could import the same libraries.Maybe, no?I can... i was planning tio use OpenGL, but it was a bit complicated...Can you supply some srce code and the libraries?#)EDIT: I am busy until Saturday afternoon Edited March 8, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
cppman Posted March 8, 2006 Share Posted March 8, 2006 awesome... i agree with manadar. Its pretty cool though. Also, i agree with what the Kandie Man Said. Miva OS Project Link to comment Share on other sites More sharing options...
nfwu Posted March 8, 2006 Author Share Posted March 8, 2006 I think it's cool. But man, you really need to switch to J or C for these kind of things. I haven't looked at the code but what you're doing really is trying to make a 2D environment react like a 3D one, so it looks like 3D. Real 3D needs a different engine.Errmmm... I happen to do 3d programming in Java and C++ as well, and ALL "3d" graphics are projected onto the screen. Using points in "imaginary 3d" space and projecting them on the screen.... #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
BigDaddyO Posted March 8, 2006 Share Posted March 8, 2006 I am very very very interested in your progress with this 3d Graphics stuff. Once you get things how you want them I am going to try to make a 3D Construction program. I am going to build a playset/Fort for my Son this spring but I haven't found any good construction software that will tell me how many 2x4's or 1x6's I need for a specified area (Wall/Floor). I was going to do this without any graphical representation, just output as text but if you get this working it will be AWSOME!!!. Mike Link to comment Share on other sites More sharing options...
GrungeRocker Posted March 8, 2006 Share Posted March 8, 2006 NICE! [font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font] Link to comment Share on other sites More sharing options...
nfwu Posted March 11, 2006 Author Share Posted March 11, 2006 I just completed version 0.3 of this, which has all the short-term goals sorted out. The only problem is that it takes 2 minutes to draw 1 frame!!!! I'm going to switch the calculations, etc, etc into a C++ DLL and only let AutoIt handle the keyboard/mouse input and the GUI. (Starting everything from scratch again...) #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted March 12, 2006 Share Posted March 12, 2006 make some UDF's possible Link to comment Share on other sites More sharing options...
blindwig Posted March 13, 2006 Share Posted March 13, 2006 If you're looking for some 3d-to-2d translation functions and 3d rotation functions, check out my 3d stars screen saver post My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
nfwu Posted March 14, 2006 Author Share Posted March 14, 2006 Thanks, but's that's not required... i've already done stuff like this in Java... Now it is just a preformance issue.. I hope that converting this to a Plugin or DLL will increase the speed... because it is Native code... no translation required, not like AutoIt. #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
nfwu Posted May 4, 2006 Author Share Posted May 4, 2006 It's ~2 months after my last post in this thread... I have recently just profiled my application amd realized that it takes a long time in this function: (1~2 minutes) (v0.3 - not yet released) Func ScreenManager_ClearScreen($p_color=0x000000) For $i = 0 to $ScreenWidth For $j = 0 to $ScreenHeight $ScreenBuffer[$i][$j] = $p_color Next Next EndFunc $ScreenWidth is usually ~600 $ScreenHeight is usuallly ~450 Is there any alternative to this that is much faster? #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
blindwig Posted May 4, 2006 Share Posted May 4, 2006 It's ~2 months after my last post in this thread... I have recently just profiled my application amd realized that it takes a long time in this function: (1~2 minutes) (v0.3 - not yet released) Func ScreenManager_ClearScreen($p_color=0x000000) For $i = 0 to $ScreenWidth For $j = 0 to $ScreenHeight $ScreenBuffer[$i][$j] = $p_color Next Next EndFunc $ScreenWidth is usually ~600 $ScreenHeight is usuallly ~450 Is there any alternative to this that is much faster? #)You're trying to flood-fill a buffer using loops in an array in a high-level language? Yeah, that's going to be slow. I'd say instead of using a 2-d array, just use 1 big binary string. And work with it using DLLs whenever possible. My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
Busti Posted May 5, 2006 Share Posted May 5, 2006 (edited) how about making it multithreading ? this took me ~18 sec : Dim $MaxH = @DesktopHeight Dim $MaxW = @DesktopWidth Dim $ScreenBuffer[$MaxH+1][$MaxW+1] Func ScreenManager_ClearScreen($p_color=0x000000) For $H = 0 to $MaxH For $W = 0 to $MaxW $ScreenBuffer[$H][$W] = $p_color Next ToolTip ( "Heigh Scanning :" & $H & @CRLF & "Widht Scanning : " & $W & @CRLF & "Set with Color : " & $p_color ) Next EndFunc ScreenManager_ClearScreen() please take a look at this, its not 100% working now, and the math is not 100% correct, but i shall work much faster! this is what i meant with multithreading expandcollapse popupDim $MaxH = @DesktopHeight Dim $MaxW = @DesktopWidth Dim $ScreenBuffer[$MaxH + 1][$MaxW + 1] Dim $1DesktopXMax = $MaxH / 2 Dim $1DesktopYMax = $MaxW / 2 ;=====================; MULTITHREAD 1 Dim $1MultiH = 1;-> $1DesktopXMax Dim $1MultiW = 1;-> $1DesktopYMax ;=====================; MULTITHREAD 2 Dim $2MultiH = $1DesktopXMax;-> $MaxH Dim $2MultiW = $1DesktopYMax;-> $1DesktopYMax ;=====================; MULTITHREAD 3 Dim $3MultiH = 1;-> $1DesktopXMax Dim $3MultiW = $1DesktopYMax;-> $1DesktopYMax ;=====================; MULTITHREAD 4 Dim $4MultiH = $1DesktopXMax;-> $MaxH Dim $4MultiW = $1DesktopYMax;-> $MaxW ;=====================; END Func ScreenManager_ClearScreen($p_color = 123456789) $timer = TimerInit() For $1MultiH=1 To $1DesktopXMax ; MULTITHREAD 2 If $2MultiH <= $MaxH Then $2MultiH += 1 EndIf ; MULTITHREAD 3 If $3MultiH <= $1DesktopXMax Then $3MultiH += 1 EndIf ; MULTITHREAD 4 If $4MultiH <= $MaxH Then $4MultiH += 1 EndIf For $1MultiW=1 To $1DesktopYMax - 1 ; MULTITHREAD 2 If $2MultiW <= $1DesktopYMax Then $2MultiW += 1 EndIf ; MULTITHREAD 3 If $3MultiW <= $1DesktopYMax Then $3MultiW += 1 EndIf ; MULTITHREAD 4 If $4MultiW <= $MaxW Then $4MultiW += 1 EndIf $ScreenBuffer[$1MultiH][$1MultiH] = $p_color $ScreenBuffer[$2MultiH][$2MultiW] = $p_color $ScreenBuffer[$3MultiH][$3MultiW] = $p_color $ScreenBuffer[$4MultiH][$4MultiW] = $p_color ToolTip("#" & @CRLF & _ "Rest der Hälfte 1 X : " & $1MultiH & "/" & $1DesktopXMax & @CRLF & _ "Rest der Hälfte 1 Y : " & $1MultiW & "/" & $1DesktopYMax & @CRLF & @CRLF & _ "Rest der Hälfte 2 X : " & $2MultiH & "/" & $MaxH & @CRLF & _ "Rest der Hälfte 2 Y : " & $2MultiW & "/" & $1DesktopYMax & @CRLF & @CRLF & _ "Rest der Hälfte 3 X : " & $3MultiH & "/" & $1DesktopXMax & @CRLF & _ "Rest der Hälfte 3 Y : " & $3MultiW & "/" & $1DesktopYMax & @CRLF & @CRLF & _ "Rest der Hälfte 4 X : " & $4MultiH & "/" & $MaxH & @CRLF & _ "Rest der Hälfte 4 Y : " & $4MultiW & "/" & $MaxW & @CRLF) Next Next ;check #cs For $H = $1MultiH To $MaxH For $W = $1MultiW To $MaxW -1 $ScreenBuffer[$H][$W] = $p_color Next ToolTip ( "Heigh Scanning :" & $H & @CRLF & _ "Widht Scanning : " & $W & @CRLF & _ "Set with Color : " & $p_color & @CRLF & _ "ScreenBuffer : " & $ScreenBuffer[$H][$W] & @CRLF & _ "Rest der Hälfte X : " & $1MultiH & @CRLF & _ "Rest der Hälfte Y : " & $1MultiW ) Next #ce MsgBox(0, "", "TimeNeedet : " & TimerDiff($timer)) EndFunc ;==>ScreenManager_ClearScreen ;test() ScreenManager_ClearScreen() Edited May 5, 2006 by Busti My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity Link to comment Share on other sites More sharing options...
Busti Posted May 7, 2006 Share Posted May 7, 2006 push....nfwu could you answer if this is something like you searched? My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now