Jump to content

Au3IrrLicht


A. Percy
 Share

Recommended Posts

  • Replies 231
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Nice muttley.

I like this alot exept that i got stuck in a latarn in the "Pk3Test.au3" test when pressing "j".

And i also have no sound.

I can see that this uses .bsp files that are inside the pk3 file?

Can this support bsp files from half-life?

Anyway this looks promising!

Dellairion

Edited by Dellairion
Link to comment
Share on other sites

Nice :).

I like this alot exept that i got stuck in a latarn in the "Pk3Test.au3" test when pressing "j".

And i also have no sound.

It doesn't have sounds yet. muttley

I can see that this uses .bsp files that are inside the pk3 file?

Rename as zip file and open it!

Can this support bsp files from half-life?

No...

Anyway this looks promising!

Thank you!

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

Maybe this: Posted Image holding thumbs really hard :)

Really like the new lights A.Percy, keep it up!

After my holidays I'll try muttley

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

Great, looks really nice with lights and skybox, what's gonna come next??

This:

http://www.box.net/shared/mhsexoi044

New update. See "EmbedIrrlicht.au3"

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

  • 2 weeks later...

Back from vacation, time to work again. Any comment?

:P

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

Wow. I'm very impressed, the sea demo rocks! You might want to set the ESC exit hotkey, but other than that, no complaints here!

Why can't I run the scripts unless they're compiled?

Link to comment
Share on other sites

I noticed that the embedded version would pause scene updates as you dragged the window around. I'll post an updated example using picassos CoProc as a means of separating the rendering from the input :P

How would I fix the flicker of any GUI elements placed on top of a scene? Check out the darth vader tooltip to see what i mean.

http://www.autoitscript.com/forum/index.ph...6&hl=coproc

Link to comment
Share on other sites

At any rate, the coproc or something similar is the only way we're gonna get any sort of framerate control, and separating the rendering from the rest is probably a good idea anyway.

Refreshing myself with the coproc stuff, this is neat :P

Link to comment
Share on other sites

Here we go: Embedded, bareboned example of (pseudo)multithreaded au3irrlicht. Very rough, but it should work. Drag your window around the screen and the scene still updates :P

CODE

#NoTrayIcon

#include <GUIConstants.au3>

#include "coproc.au3"

#region GUI Process

$CoProc1Process = _CoProc ("CoProc1")

AutoItSetOption( "TrayIconHide", 1 )

Opt( "WinTitleMatchMode", 3 )

$gui = GUICreate( "Autoit Irrlicht", 450, 260 )

$label = GUICtrlCreateLabel( "", 340, 10, 100 )

$button = GUICtrlCreateButton( "Change Rotation", 340, 50, 100, 20 )

GUISetState(@SW_SHOW)

While 1

$msg = GUIGetMsg( )

If $msg = $GUI_EVENT_CLOSE then

ExitLoop

EndIf

WEnd

ProcessClose($CoProc1Process)

Exit

Func CoProc1()

#include <GUIConstants.au3>

#include "IrrlichtPluginUtils.au3"

$gui2 = WinGetHandle("Autoit Irrlicht")

CreateDeviceOnWindow( $gui2, $EDT_OPENGL, 10, 10, 320, 240, 32, 0, 0 );

GUISetState( @SW_SHOW )

$Camera = AddCameraSceneNode( 0, 0, 20, -40, 0, 0, 0 )

$Node = AddCubeSceneNode( 20 )

$Au3Texture = GetTexture( "data\au3.bmp" )

SetMaterialTexture( $Node, 0, $Au3Texture )

SetMaterialFlag( $Node, $EMF_LIGHTING, 0 )

$Y = 0

$Direction = 2

BeginScene( true, true, 255, 50, 50, 100 )

While IrrRun( )

SetRotation( $Node, 0, $Y, 0 )

;GUICtrlSetData( $label, GetRotation( $Node, "Y" ) )

BeginScene( true, true, 255, 50, 50, 100 )

SceneDraw( )

GuiDraw( )

EndScene( )

sleep(1)

$Y += $Direction

If $Y > 360 Then $Y -= 360

If $Y < 0 Then $Y += 360

Wend

EndFunc

Edited by Jrowe
Link to comment
Share on other sites

Sorry, I forgot the link to the coproc files you'll need to get this to work.

Next up, combining the whole shebang with the png as gui background :P

Link to comment
Share on other sites

Well, the CoProc setup seems to be complicating things too much for simple use. It's only able to read mouse movement. Hotkeys, ControlSend, and other functions are made excessively complicated by the CoProc system, so I'm going to try something different. I could get the camera to move, but in order to control the movement, I'd have to add a list of global variables for every interaction with the engine, which would create a mess. There's gotta be a better method to keep it rendering while the window is in motion (and while other events are happening.)

Link to comment
Share on other sites

Well, the CoProc setup seems to be complicating things too much for simple use. It's only able to read mouse movement. Hotkeys, ControlSend, and other functions are made excessively complicated by the CoProc system, so I'm going to try something different. I could get the camera to move, but in order to control the movement, I'd have to add a list of global variables for every interaction with the engine, which would create a mess. There's gotta be a better method to keep it rendering while the window is in motion (and while other events are happening.)

Timers?

Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()
Link to comment
Share on other sites

Link to comment
Share on other sites

Interesting!

One thing: remove the first #include "IrrlichtPluginUtils.au3".

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

Removed it :P

I'm gonna explore some of the other "fake" multithreading techniques and see what happens. I've been plugging in the terrain demo in order to figure out how to distribute input, and the only way I've been able to get things to work is to use animators and superGlobals (a coProc construct to pass simple messages between processes.) The problem with that is calculating orientation and moveTo vectors. Maybe I should use the raw machine code udf...

Anyway, nice work A.Percy!

Link to comment
Share on other sites

This looks like a lot of fun. I didn't see AddSphereSceneNode() but seems to be a function in some of the other examples on their site. Are these just a subset of the functions or am I missing something?

Link to comment
Share on other sites

This looks like a lot of fun. I didn't see AddSphereSceneNode() but seems to be a function in some of the other examples on their site. Are these just a subset of the functions or am I missing something?

There are still many functions to "re-implement", but I will provide AddSphereSceneNode soon. :P

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

Olá a todos!

New version at:

http://www.box.net/shared/9wixvwog8o

Before any comment: It have a bug on input of FPS camera when using SceneDraw with SetViewPort or SetRenderTarget. Will be fixed when I implement a more stable event redirector. For while, you can try use SetCameraAsKeyEventReceiver( $Camera ), but it's very unstable yet :P

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

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...