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
Post Reply
grunt
Posts: 96
Joined: Tue Aug 17, 2004 9:14 pm
Contact:

Post by grunt »

just wanted to share how I got this working with Jitter Physics:

http://jitter-physics.com/phpBB3/viewto ... p=161#p161
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

grunt,
looks good, and fps is also high enough (what i see from window' title bar).
johnktbk
Posts: 1
Joined: Sun Dec 12, 2010 4:14 pm

Post by johnktbk »

i've registered special for this thread to say thank you for amazing .net wrapper :------------------------------)
grunt
Posts: 96
Joined: Tue Aug 17, 2004 9:14 pm
Contact:

Post by grunt »

Do you think you could enable the forums on your sourceforge page so that we can have a board solely for irrlicht lime and not just keep replying to this thread.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

grunt,

I can enable forum on sourceforge, but I see there is not many questions on Lime here. If we get more activity (more question and more users) here I would set up a dedicated forum. For now i do not see a reason doing so.
grunt
Posts: 96
Joined: Tue Aug 17, 2004 9:14 pm
Contact:

Post by grunt »

maybe someone can help me find out why methods are being called for my custom scenenode even when putting:

Code: Select all

AddHandler me.OnRegisterSceneNode, AddressOf CDecal_OnRegisterSceneNode
			AddHandler Me.OnRender, AddressOf CDecal_OnRender
			AddHandler Me.OnGetBoundingBox, AddressOf CDecal_OnGetBoundingBox
			AddHandler Me.OnGetMaterialCount, AddressOf CDecal_OnGetMaterialCount
			AddHandler Me.OnGetMaterial, AddressOf CDecal_OnGetMaterial
grunt
Posts: 96
Joined: Tue Aug 17, 2004 9:14 pm
Contact:

Post by grunt »

Code: Select all

Public Class CDecal
		Inherits SceneNode
		Private bbox As New AABBox()
		Private vertices As New List(of vertex3d)
		Private material As New Material()
		
		Public Sub New(parent As SceneNode, smgr As SceneManager, id As Integer, size as Single, byval tex as string)
			MyBase.New(parent, smgr, id)

			AddHandler OnRegisterSceneNode, AddressOf me.CDecal_OnRegisterSceneNode
			AddHandler OnRender, AddressOf me.CDecal_OnRender
			AddHandler OnGetBoundingBox, AddressOf me.CDecal_OnGetBoundingBox
			AddHandler OnGetMaterialCount, AddressOf me.CDecal_OnGetMaterialCount
			AddHandler OnGetMaterial, AddressOf me.CDecal_OnGetMaterial
			
			material.Wireframe = false
			material.Lighting = False
			
			vertices.Add(New Vertex3D(New Vector3Df(-1, 1, 0)))
			vertices.Add(New Vertex3D(New Vector3Df(1, 1, 0)))
			vertices.Add(New Vertex3D(New Vector3Df(1, -1, 0)))
			vertices.Add(New Vertex3D(New Vector3Df(-1, -1, 0)))
			
			dim t as Texture = dev.VideoDriver.GetTexture(tex)

			me.SetMaterialTexture(0, t)
		End Sub

		Private Sub CDecal_OnRegisterSceneNode()
			If Visible Then
				SceneManager.RegisterNodeForRendering(Me)
			End If
		End Sub

		Private Sub CDecal_OnRender()
			Dim indices As New List(Of UShort)()

			indices.Add(0)
			indices.Add(1)
			indices.Add(2)
			indices.Add(1)
			indices.Add(2)
			indices.Add(3)
			
			dev.VideoDriver.SetMaterial(material)
			dev.videodriver.SetTransform(TransformationState.World, AbsoluteTransformation)
			dev.videodriver.DrawVertexPrimitiveList(vertices, indices)
		End Sub

		Private Function CDecal_OnGetBoundingBox() As AABBox
			Return bbox
		End Function

		Private Function CDecal_OnGetMaterialCount() As Integer
			Return 1
		End Function

		Private Function CDecal_OnGetMaterial(index As Integer) As Material
			Return material
		End Function
	End Class
My methods are not being called, can anybody tell me why?
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

I do not know VB.NET sorry.
BlackCheetah
Posts: 1
Joined: Tue Jan 11, 2011 10:52 pm

Post by BlackCheetah »

Grunt does the Scenemanager for a Device add this node? or Do you add the node to that scenemanagers parent? (Don't know VB very well)



Thank you for this rapper, GreenYa! I had trouble trying to get it to work because of assembly not loading, but it was fixed by convert my project to .net 4.0 and rebuilding the lime code into 4.0 visual 2010.

I having been making a 2D game engine with csscripting for a year and irrlicht.net has been great to me, but because of Lime I am up to date with a very good framerate!
grunt
Posts: 96
Joined: Tue Aug 17, 2004 9:14 pm
Contact:

Post by grunt »

not sure what the problem is here but if I add a shadowvolumescenenode, then the shadowing gets all messed up as you can see in this image:

Image

If I change it to direct3d8, the shadow works but then the reflections are garbled as seen in this image. Not sure if this has to be doing with the fact that it is embedded in windows forms and Im running it in a thread.

Image

I just wish both would work at the same time. OpenGL doesnt work at all for me in winforms. Same thing happens on my laptop.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

I wouldn't expect much from shadows implementation in Irrlicht. As i know it unable to build shadow with correct projection (I have described this in http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=25717). Also i have tested on different video cards (actually Radeon 200M, Radeon X1650, GF 9600M and GF 8600) and noticed that shadows renders not very good for all video cards (Radeons has weeker implementation of OpenGL, but maybe this is not truth for top Radeon cards): i have transparent dots all over the shadow volume, some times complete triangles are transparent (of a shadow volume).

So I think that in your example, it is one of the same problems. Anyway, I don't think that this is wrapper's bug. But, I can test it for you, if you write small as possible test case (in C#) - I will translate it in C++ and check and post the result.
grunt
Posts: 96
Joined: Tue Aug 17, 2004 9:14 pm
Contact:

Post by grunt »

yeah, a bug with irrlicht not wrapper.

On another note, Im looking for quaternions in irrlichtlime.core? Have those been implemented yet?
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

grunt wrote:On another note, Im looking for quaternions in irrlichtlime.core? Have those been implemented yet?
No, for now this is not ported. I will port it in next release when get some time for it.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

Version 0.8 has been released

New examples: 19.MouseAndJoystick and L05.ScreenshotToTexture.

Release Notes

~
Added attributes support. Added Attrbiutes class and all (or almost all) which uses it. It is possible now to read and write VideoDriver.Attributes and SceneManager.Attributes. You can create your own empty attributes collection by FileSystem.CreateAttributes().

~
Added JoystickInfo class and IrrlcihtDevice.ActivateJoysticks().

~
Added class Quaternion, ViewFrustum and CameraSceneNode.ViewFrustum prop.

L05.ScreenshotToTexture
This example demonstrates how easily to grab screenshot data from the desktop. Indeed it uses 512x512 window and the texture of the same size; each frame it updates the texture using 512x512 rectange on the desktop with the center of mouse cursor. This example also demonstarates how to convert .NET Bitmap object to Irrlicht Lime Texture object on the fly, see getDesktopTexture() method for details. It runs at about 20 fps (on two machines that i checked) just because i believe desktop cannot be grabbed more often.

Sceenshot:
Image

~
Updated Irrlicht SDK to trunk rev. 3601.

See changes.txt for full list of changes.
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

Hi, i'm using your wrapper, and I found It very helpful!
I'm using it on a Managed C++ Project, I added a Panel to show the irrlicht's output..but...everything is blank! The panel doesn't change his color, but the FPS counter works! I found that the problem is in the irrlicht's parameters initialization:

Code: Select all

params->WindowID = this->panel1->Handle;
It seems that the Handle is not correct...In fact, if I overwrite the code with this one

Code: Select all

params->WindowID = 0;
or with this

Code: Select all

params->WindowID = this->Handle; //Form handle


The graphics still appears...why that?!
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
Post Reply