Page 5 of 6

svn

Posted: Mon Aug 28, 2006 1:58 pm
by buhatkj
yeh i would also say getting svn up for this would be cool. sourceforge provides svn service, and i think you could probably get this project approved. :-)

Mono 1.1.16.1 Got Examples working...

Posted: Mon Aug 28, 2006 4:02 pm
by ChrisTheAvatar
Hello Everyone,

I got the examples working this morning by copying the IrrlichtW.so to /usr/lib... I tried to set the LD_LIBRARY_PATH = to where I had the so but that didnt seem to work (odd that it didnt, come to think of it LD_LIBRARY_PATH wasnt even defined to begin with but that got me thinking to copy it to /usr/lib so thank you)... SuSe must not look for libraries in the running path. Hopefully this will help someone else with same problems I had out there.

I am going to try to port my isometric mmorpg using this in the near future: http://www.fantasyrealmonline.com

Ill let you know how it goes, this seems like a wonderful project

Thanks for help again

Posted: Mon Aug 28, 2006 5:05 pm
by DeusXL
Weird, I had such a problem when installing Ubuntu-Synaptic's Mono version (1.14) but anyway, on every computers I tried with 1.16, it worked with IrrlichtW.so on the directory so I hope it was just a stupid bug which will not need to copy each time IrrlichtW in /usr/lib :lol:

Good luck for the port, your project sounds interesting too and do not hesitate to ask anything if you have problems or if you find bugs ;)

PS : I think I'll register Irrlicht .NET CP to sourceforge tomorrow, if anyone is interested in making a website, do not hesitate to contact me :)

Posted: Tue Aug 29, 2006 2:29 pm
by dmoonfire
You might consider the Wikimedia with a forum approach a lot of the graphic sf.net sites seem to be using. It appears to mostly work and is fairly easy to setup (even if I'm a SMF fan over phpBB2 *grin*).

Problem with VideoDriver.Draw2DImage

Posted: Wed Aug 30, 2006 1:16 am
by ChrisTheAvatar
Hello Again Everyone,

I ported most of my graphics code to your library last night and did some testing, it seems like I am having trouble with the Draw2DImage function (really two problems)... I am currently just running this on my Windows Machine

1. Whenever I draw with the 2D image function using a sub rectangle of any given texture it seems scewed/pixelated/artifacts. I know my rectangles are correct because I use the same rectangles on my pure D3D implementation which works fine (see screen shots below). It does this for all the Irrlicht drivers including the software/openGL/D3D8/D3D9. Some drivers are slightly better than others but all seem to do it.

2. the color argument for Draw2DImage does not support partially translucent images IE (128,255,255,255) should be a half transparent image. (Unless this is intentional)

Screenshots
Bad
Image

Good
Image

I have only seen this kind of thing happen with a 2 intel drivers and Direct3D 9 in my pure D3D implementation.... People on the Microsoft forums told me some decent suggestions maybe it will give you all an idea of what the problem might be:

http://forums.microsoft.com/MSDN/ShowPo ... 5&SiteID=1

Any help would be greatly appreciated... Thanks for your time :-)

Example of how I use the call:

device.VideoDriver.Draw2DImage(SprImage.ImageSurface, new Rect(new Position2D(LocX, LocY),new Dimension2D(imgrect.Width,imgrect.Height)), Rect.FromBCL(imgrect),Color.FromBCL(Blender), true);

Posted: Wed Aug 30, 2006 3:03 am
by dmoonfire
I can't seem to use CollisionManager.GetCollisionPoint() (not ResultPoint) and apparently that is the best way of figuring out where the cursor is over. Is this something that can be easily fixed or am I doing something completely wrong. It always returns false.
// Figure out if we actually strike anything
SceneCollisionManager scm =
ClientState.Device.SceneManager.CollisionManager;
Position2D cursor = ClientState.Device.CursorControl.Position;
Line3D line =
scm.GetRayFromScreenCoordinates(cursor, ClientState.Camera);

// Figure out where it impacts
Vector3D point;
Triangle3D tri;

RegionNode.DynamicSelectorUpdate = true;

bool found = scm.GetCollisionPoint(
line,
RegionNode.TriangleSelector,
out point, out tri);

// Set the anchor
if (found)
SetPlacerAnchor((int) point.X, (int) point.Z);
http://mfgames.com/svn/turf-wars/trunk/ ... torMode.cs

Basically, this looks right from all the examples, it just doesn't return anything. Maybe the p/invoke isn't properly being mapped or something? I haven't gotten the non .NET dll's to compile yet to test it myself.

Posted: Wed Aug 30, 2006 9:18 am
by Silbermünze
I played around with the wrapper for a few days now and it really seems to be great work.
I am starting implementing my 3D app now and see if I can do all the things I planned to do.

Keep up the good work.

Silbermünze

Re: Problem with VideoDriver.Draw2DImage

Posted: Wed Aug 30, 2006 9:28 am
by hybrid
ChrisTheAvatar wrote: 1. Whenever I draw with the 2D image function using a sub rectangle of any given texture it seems scewed/pixelated/artifacts. I know my rectangles are correct because I use the same rectangles on my pure D3D implementation which works fine (see screen shots below). It does this for all the Irrlicht drivers including the software/openGL/D3D8/D3D9. Some drivers are slightly better than others but all seem to do it.

2. the color argument for Draw2DImage does not support partially translucent images IE (128,255,255,255) should be a half transparent image. (Unless this is intentional)
1. should be a problem with non-power-of-two textures which are software scaled to the correct size. This will give artifacts and has often been reported. As a first fix we'll support the non-POT extensions of the drivers in the future, but this is not yet implemented.
2. This has been fixed for OpenGL recently, but it has never been reported for DirectX (AFAIK). I just checked it and the methods in D3D9Driver and they also ignore the alpha value of the color. I'll fix it for Irrlicht 1.2 then.

Posted: Wed Aug 30, 2006 9:42 am
by DeusXL
ChrisTheAvatar => Both bugs are from Irrlicht, not from the wrapper actually. You should try to post in another forum section to report these :) (even if they are both well-known I think)

dmoonfire => You are perfectly right, there was a stupid bug in Line3D actually... Look at this code I found :

Code: Select all

		public float[] ToUnmanaged()
		{ return new float[] { Start.X, Start.Y, Start.Z, Start.X, Start.Y, Start.Z }; }
		
		
		public static Line3D From(float xMin, float yMin, float zMin, float xMax, float yMax, float zMax)
		{
			Line3D line = new Line3D();
            line.Start = new Vector3D();
            line.Start = new Vector3D();
            line.Start.Set(xMin, yMin, zMin);
            line.Start.Set(xMax, yMax, zMax);
            return line;
		}
As you can see, it does not export the End point and does not import the end point neither...

Remplace these two methods by :

Code: Select all

		public float[] ToUnmanaged()
		{ return new float[] { Start.X, Start.Y, Start.Z, End.X, End.Y, End.Z }; }
		
		
		public static Line3D From(float xMin, float yMin, float zMin, float xMax, float yMax, float zMax)
		{
			Line3D line = new Line3D();
            line.Start = new Vector3D();
            line.End= new Vector3D();
            line.Start.Set(xMin, yMin, zMin);
            line.End.Set(xMax, yMax, zMax);
            return line;
		}
I'll upload a corrected DLL soon but for now I'm organizing everything as an independent SDK that could be compiled by anyone so I can't upload anything :(

Anyway, thanks for reports :)

PS : Shoarc => I tested your code with the modifications above and it works perfectly !

Posted: Wed Aug 30, 2006 1:13 pm
by dmoonfire
DeusXL: Glad it was something simple, I've done the same type of mistakes myself all the time. Can't wait for the sf.net stuff since SVN is nice and this thread is going to get very crowded if much more people actually play with it.

I do have a question, I can't seem to use a terrain map over 128x128 or so, is that a Irrlicht limitation or the Irrlicht CP limitation? I get corrupted memory errors when I try to go much larger.

I'm writing a game for the 4E5 contest and actually started getting screenshots at my blog. Only 92 more days. :) But, the library is working out very well for me.

Posted: Wed Aug 30, 2006 1:19 pm
by DeusXL
Weird because I work all the time with 256*256 heightmaps without problem (even when I made this post :
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=15278 )
Anyway if there is a bug on your computer or whatever, I'd say it's Irrlicht because the wrapper acts with terrains, animated scene node or anything exactly the same way !

Good luck for your game :)

Posted: Wed Aug 30, 2006 2:16 pm
by hybrid
Irrlicht can only use 129x129 terrains. All sizes over 256x256 will introduce graphics artifacts (triangles covering the whole terrain) and all other sizes different from 129x129 make at least trouble with occasional render problems and collision response. This limit will be removed with 32bit indices or terrain strips, but I cannot say when these things will be available.

Posted: Wed Aug 30, 2006 4:36 pm
by dmoonfire
hybrid wrote:Irrlicht can only use 129x129 terrains. All sizes over 256x256 will introduce graphics artifacts (triangles covering the whole terrain) and all other sizes different from 129x129 make at least trouble with occasional render problems and collision response. This limit will be removed with 32bit indices or terrain strips, but I cannot say when these things will be available.
Does that also apply to textures applied to the terrain? 129x129 being the limit? That also explains why I get the occasional burps, I'll try 129x129 and see if that gets me more consistent results. Thank you.

Posted: Thu Aug 31, 2006 9:20 am
by DeusXL
Irrlicht .NET CP is now registered at Sourceforge right here :
http://sourceforge.net/projects/irrlichtnetcp

And the website :
http://irrlichtnetcp.sourceforge.net/in ... /Main_Page

And the forum :
http://irrlichtnetcp.sourceforge.net/phpBB2/

I also uploaded version 0.4.1 wich contains Minor Bugfixes (such as the one solving your problem dmoonfire).
And also created and uploaded a full SVN repository !
Take a look at the News Page of the website :)

Posted: Thu Aug 31, 2006 3:39 pm
by sRc
dmoonfire wrote:
hybrid wrote:Irrlicht can only use 129x129 terrains. All sizes over 256x256 will introduce graphics artifacts (triangles covering the whole terrain) and all other sizes different from 129x129 make at least trouble with occasional render problems and collision response. This limit will be removed with 32bit indices or terrain strips, but I cannot say when these things will be available.
Does that also apply to textures applied to the terrain? 129x129 being the limit? That also explains why I get the occasional burps, I'll try 129x129 and see if that gets me more consistent results. Thank you.
no textures are fine. its the number of triangles in the terrain, hits the limit of the 16bit indices for a single object (65536 triangles) at 256x256 (oddly enough, 257x257, which is a proper 256x256 terrain, gets the artifacts as well :? )