Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
jimmyh
Posts: 12
Joined: Sun Feb 19, 2012 8:40 pm

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by jimmyh »

Ok manage to find out why this was happening.

The computer this is being run on is getting the following error:
Could not load file or assembly 'IrrlichtLime.dll' or one of its dependencies. The specified module could not be found.

There are 3 files in the directory, the exe and the 2 Irrlicht dll's.

Any one got any idea why this might be happening?


jimmyh wrote:
greenya wrote:Don't know why controls become unresponsive after you just resized rendering area.
I managed to get around the unresponsiveness by not using the background worker, instead it uses the on paint event to render the frame.

However on some computers the panel shows with a big red cross over it. Both dll's are in the same directory as the exe.
Image
Hilarius
Posts: 5
Joined: Tue Feb 19, 2013 8:10 pm

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by Hilarius »

Hi, my name is Felix and I am new to Irrlicht and IrrlichtLime. Working on a Project with requires C# and some display of 3D models. I am trying some engines at the moment and while installing IL I got a few error messages.

First of all I am working with a Win7 x64 maschine with Visual Studio 2012 Premium in German so I hope my translations are accurate.
I tryed importing either version 1.2 or version 1.3 from Sourceforge but with the following results:

01.HelloWorld.csproj opens with 20 errors and 1 warning. Errors are pretty much types and namespaces not found for IrrlichtLime.
Warning is that the component IrrlichtLime could not be found where it is linked to.
I tryed to use the project explorer to redirect to the IrrlichtLime.dll in bin/Debug because the property path was blank, but i wasn't able to insert anything there.
So I deleted it from the list and browsed for the file via insert link. It seems fine and he also shows the path to the .dll but when trying to build the example I get an FileNotFoundException.

Anyone an idea what I am doing wrong?
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by greenya »

Hello.
I didn't try VS2012 myself but Win7 x64 works just fine.
Do not try to open csproj files, you can only open full solution which is IrrlichtLime.sln (it is in the root).
But if you want to develop your own app and you have some experience with .NET then you need to use Irrlicht Lime as any other assembly you would use: create project, add reference to IrrlichtLime.dll and now you are able to use Lime. You can write your own code or copy-past source of some example (just make sure media is accessible if it uses it; for example 03.CustomSceneNode doesn't use any media, so its source is independet).
The only thing is left to remember is when you run your app make sure Irrlicht.dll is in your output folder (near you exe file) -- this is something which must be done manually (because for instance IrrlichtLime.dll will copied by Visual Studio automatically to output folder since you referenced it).
Hilarius
Posts: 5
Joined: Tue Feb 19, 2013 8:10 pm

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by Hilarius »

When trying to open the sln file I get the message that one part of the solution as been compiled using an older version of the C++ Compiler. When not running the update it needs updating when trying to run one example. If I try to do as VS needs i get this message:
Fehler 1 error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets 42 5 IrrlichtLime (Visual Studio 2010)
So I run the tool he asks for. It finishes succesful.

When trying to run a sample again I get the message that the project is to old but when trying to compile I get:
Fehler 1 error LNK1207: Inkompatibles PDB-Format in "C:\Users\Rognarak\Downloads\kinect\IrrlichtLime-1.3\bin\Debug\IrrlichtLime.pdb''; L÷schen und neu erstellen. C:\Users\Rognarak\Downloads\kinect\IrrlichtLime-1.3\source\LINK IrrlichtLime
stating that the PDB format is not compatible and that I should delete an recreate the Irrlicht.pdb File. I dont now how to do that. Maybe that would solve my problem?


As for your hint with a new project and copy/paste. As I havn't told you, I just started using C# and Visual Studio, so most options I either don't know or don't understand... Here is what I did when trying to follow your guidance:

I created a new console project. I copied the IrrlichtLime.dll to the root of my project (the one including the sln). Then I referenced it in the solution explorer by adding it and browsing through the files and activating the Checkbox for it.
Then I copied the 3rd example and pasted it to my Programm.cs. Now I get a warning:

Warnung 1 Konflikt zwischen Prozessorarchitektur des Projekts "MSIL", das erstellt wird, und der Prozessorarchitektur des Verweises, "IrrlichtLime, Version=1.3.0.0, Culture=neutral, processorArchitecture=x86", "x86". Dieser Konflikt kann zu Laufzeitfehlern führen. Ändern Sie ggf. mithilfe des Konfigurations-Managers die als Ziel angegebene Prozessorarchitektur Ihres Projekts so, dass die Prozessorarchitekturen zwischen Ihrem Projekt und den Verweisen ausgerichtet werden, oder wählen Sie eine Abhängigkeit von Verweisen mit einer Prozessorarchitektur, die der als Ziel angegebene Prozessorarchitektur Ihres Projekts entspricht. ConsoleApplication4

So there is a problem between the link architecture which is x86 and the project architecture which is any cpu...
So I try to set the required parameter in project>myname properties>build> target plattform from any cpu (with the suboption prefer 32 Bit) -> x86

When trying to run it, I get the same message as yesterday with an FileNotFoundException was not catched. In more details it states that the file or assemly "IrrlichtLime.dll" or some dependency wasn't found. There is also the hint that there might be a problem with relative pathes but mine is
C:\Users\Rognarak\Documents\Visual Studio 2012\Projects\ConsoleApplication4\IrrlichtLime.dll
and cause it's absolute it should be ok I guess.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by greenya »

When i siad "I didn't try VS2012 myself but Win7 x64 works just fine." i mean that i'm using win7 x64 and VS2010 and i compile and use x86 mode only. You cannot use Lime in x64 project since it requires x64 build of Lime and Irrlicht.dll (i do not provide this in SDK). That is why you can use only x86 mode with Lime referenced.

If you use VS2012 then do not open IrrlichtLime.sln. Simply create new project and add reference to /bin/Release/IrrlichtLime.dll. Basically to use lime in your project all you need is 3 files:
Irrlicht.dll
IrrlichtLime.dll
IrrlichtLime.xml
This is only files which is SDK. Others files are sources and example sources and compiled examples -- only for learning.

And this is the shortest Lime app:

Code: Select all

class Program
   {
      static void Main(string[] args)
      {
         IrrlichtLime.IrrlichtDevice device = IrrlichtLime.IrrlichtDevice.CreateDevice(
            IrrlichtLime.Video.DriverType.Direct3D9, new IrrlichtLime.Core.Dimension2Di(1024, 768));
 
         while (device.Run())
         {
            device.VideoDriver.BeginScene(true, true, IrrlichtLime.Video.Color.OpaqueBlue);
            device.VideoDriver.EndScene();
         }
 
         device.Drop();
      }
   }
(in most cases you will like to add "using IrrlichtLime" and other "usings" to get rid of those long lines).
Hilarius
Posts: 5
Joined: Tue Feb 19, 2013 8:10 pm

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by Hilarius »

The list of files you posted did the trick for me. Havn't heard anything about the .xml file before. Also I couldn't add the Irrlicht.dll but copying it to the bin/Debug folder allowed me to build your min example and also #3 of the examples. Now I will try to start my project. Thanks a lot.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by greenya »

Hilarius wrote:Havn't heard anything about the .xml file before. Also I couldn't add the Irrlicht.dll but copying it to the bin/Debug folder allowed me to build your min example and also #3 of the examples. Now I will try to start my project. Thanks a lot.
The IrrlichtLime.xml contains Visual Studio IntelliSense data. This file related to IrrlichtLime.dll only and necessary only for developing in Visual Studio (you do not need to provide this file for end user of your project). If you delete this file, all will continue work fine, the only IntelliSense will stop helping you with types, methods and their arguments. This file doesn't contain help for GUI and Scene namespaces; for those you can use Irrlicht online help -- http://irrlicht.sourceforge.net/docu/namespaces.html in more than 95% it will match.
Hilarius wrote:Also I couldn't add the Irrlicht.dll but copying it to the bin/Debug folder allowed me to build your min example and also #3 of the examples.
Irrlicht.dll is not assembly that is why you cannot add it as reference. But there is a trick i use: just add Irrlicht.dll to your project and tell VS to copy it for you:
- Project -> Add Existing Item, change filter to *.*, locate Irrlicht.dll, click Add
- Right click on Irrlicht.dll -> Properties -> set here: Build Action: None , Copy to Output Directory: Copy if newer.
Now each time you build and/or run your project, Irrlicht.dll will be right copied automatically.
I suggest you to set up your project to use Debug versions of IrrlichtLime.dll and Irrlicht.dll. When you will need Release build, you just do Release build from VS and manually copy release dlls to Release output folder. If you will not do so, all will work fine but a bit slower than Release builds of Irrlicht/Lime.dlls.
Hilarius
Posts: 5
Joined: Tue Feb 19, 2013 8:10 pm

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by Hilarius »

Hey Greenya (and others),

first of all, thanks for your latest advice.
Now I am working with Wavefront .obj and was able to import a textured mesh. But as you probably have encountered, it is flipped cause of differnt (left hand/ right hand) coordinate system definition beweeten the creating software and irrlicht. My google and API search offered me a setRotation method, but I can't access them.

Code: Select all

 
VideoDriver driver = device.VideoDriver;
            SceneManager smgr = device.SceneManager;           
 
            AnimatedMesh mesh = smgr.GetMesh("../../Modelle/Aachen_Kopie.obj");
            SceneNode node = null;           
            if (mesh != null)
                node = smgr.AddOctreeSceneNode(mesh.GetMesh(0), null, -1, 1024);
 
            if (node != null)
                node.Position = new Vector3Df(0,0,0);
                    
            Texture tex = driver.GetTexture("../../Modelle/Aachen2.jpg");
            AnimatedMeshSceneNode ani = smgr.AddAnimatedMeshSceneNode(mesh);
                        
            ani.SetMaterialTexture(0, tex);
            ani.SetMaterialFlag(MaterialFlag.Lighting, false);
 
 
Irrlicht API tells me that SceneNode has a virtual function called setRotation. AnimatedMeshSceneNode is derived from SceneNode so I should be able to call the method. But in IrrlichtLime I can't access setRotation in SceneNode nor in an AnimatedMeshSceneNode object. Something like
ani.setRotation(new Vector3Df(0.0f,0.0f,1.0f));
should work I guessed, but I get a compilation error.

Am I doing sth wrong? Or are those functions not implemented in IrrlichtLime yet or can't they be implemented cause of the property virtual?
How do I rotate an object just the one time to get rid of the problem? Already found sth to rotate the mesh using an animator, but that's not what I wanted to do.

Greets Felix

PS: Just found the hint on an older page as to use the Property Rotation and just assaign the Vector. It works but the question remains...
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by greenya »

Hilarius wrote:PS: Just found the hint on an older page as to use the Property Rotation and just assaign the Vector. It works but the question remains...
Hi.
Sorry, what kind of problem remains? You found right - Rotation is a property, to do setRotation() you have to assign a new value to Rotation property.
Please describe what else is a problem, you can show the screenshot - it can help a lot.
Hilarius
Posts: 5
Joined: Tue Feb 19, 2013 8:10 pm

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by Hilarius »

Silly little me :)

When I use a vector to set a Property I am doing something else than calling a method. The API tells me to use the method, but there is none. Is this a problem I will encounter with all virtual functions? And is the hint always to look for a related property?
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by greenya »

When you set a Property, in most cases you call some "set" method. What API tells you to use method and you cannot find one? If you're looking into -- http://irrlicht.sourceforge.net/docu/index.html , then you see the help for native Irrlicht Engine, not the wrapper. Wrapper has some differences, like you have mentioned about setRotation() and "Rotation" property. There is no hint to look for a related property, I try to keep the name intact, so if you see getMaxValue() then you should look for MaxValue. Use Object Browser embedded in Visual Studio (or other assembly browser) to see everything which IrrlichtLime.dll has.

What do you mean when talking about virtual functions? Again if you're looking into native Irrlicht Documentation then the answer is -- you do not have same virtual method, the wrapper provides very small number of virtual stuff. You should use native Irrlicht Doc only for description of methods and arguments. For example you can inherit almost nothing in wrapper, which means you cannot override stuff too. You pretty much can inherit only SceneNode and GUIElement; and it has limited stuff which you can override.
kite_rich
Posts: 2
Joined: Fri Mar 22, 2013 10:55 pm

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by kite_rich »

Hello all and especially greenya,
I am playing around with the lime wrapper, me like!
I have an issue with the Maya Cam, it wont react on mouse movements when the device is initialize with a windows handle, if it is created in a standalone window the maya cams work normally.

I am using tutorial L02.winforms.
The original code

Code: Select all

    CameraSceneNode cam = smgr.AddCameraSceneNode();
            cam.Target = new Vector3Df(0);
 
            SceneNodeAnimator anim = smgr.CreateFlyCircleAnimator(new Vector3Df(0, 15, 0), 30.0f);
            cam.AddAnimator(anim);
            anim.Drop();
 
was replaced with:

Code: Select all

      CameraSceneNode cam = smgr.AddCameraSceneNodeMaya();
            cam.Target = new Vector3Df(0);
                       cam.Position = new Vector3Df(0, 10, 0);
Now if I run the example the maya cam works ok with the seperate window bu it fails when the panel that is part of the form is used for the drawing.
Does somebody have an idea how to fix for this?
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by greenya »

It should be possible to solve the issue by translating events to the Irrlicht Engine manually.
Please read couple of posts from http://irrlicht.sourceforge.net/forum/v ... 29#p277729 for more details.
kite_rich
Posts: 2
Joined: Fri Mar 22, 2013 10:55 pm

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by kite_rich »

Ok, I have got that Working, thanks everybody!
jimmyh
Posts: 12
Joined: Sun Feb 19, 2012 8:40 pm

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by jimmyh »

I've been trying to create a custom camera. It's seems that it's not possible to inherit from either CameraSceneNode or SceneNodeAnimator.

I get an error that either CameraSceneNode or SceneNodeAnimator don't have a constructor.

Does any one know how to create a custom camera or camera animator. Or am I just going about this the wrong way?
Post Reply