Search found 149 matches

by blackMasoon
Tue Nov 29, 2011 4:07 pm
Forum: Advanced Help
Topic: wrong default texture scale in custom scene node
Replies: 2
Views: 580

Re: wrong default texture scale in custom scene node

Oh... thanks for the clue... I forgot to initialize the UV coords of each vertex... Thanks :)
by blackMasoon
Tue Nov 29, 2011 2:54 pm
Forum: Advanced Help
Topic: wrong default texture scale in custom scene node
Replies: 2
Views: 580

wrong default texture scale in custom scene node

Hello. I have a problem with texturing my custom scene node. I use a texture 128x128 px and by default it looks like the texture matrix is scaled and moved a bit in a wrong direction. I set the wrap mode to repeat and texture scale: (1.0, 1.0) and it looks like repeated few times. When I change the ...
by blackMasoon
Fri Nov 25, 2011 12:20 pm
Forum: Code Snippets
Topic: LensFlareSceneNode with occlusion query
Replies: 36
Views: 19780

Re: LensFlareSceneNode with occlusion query

I have compiled the latest version of Irrlicht from SVN and two interesting things happened:

1) Occlusion queries didn't make the lensFlareNode hiding behind other nodes like buildings.

2) Suddenly all collisions (triangle selectors etc.) stopped working thanks to new Irrlicht o.O

Why is that ...
by blackMasoon
Thu Nov 03, 2011 9:41 am
Forum: Beginners Help
Topic: custom scene node disappears while FPS camera movement
Replies: 4
Views: 435

Re: custom scene node disappears while FPS camera movement

Thank you, that helped :) One other thing... same happens with lighting. I had some flat horizontal surfaces as custom nodes so setting normals like (0.0f, 1.0f, 0.0f) was working for lighting. What about irregular shapes? How to calculate normals for them? I set (1.0f, 1.0f, 1.0f) but that doesn't ...
by blackMasoon
Wed Nov 02, 2011 7:43 pm
Forum: Beginners Help
Topic: custom scene node disappears while FPS camera movement
Replies: 4
Views: 435

custom scene node disappears while FPS camera movement

I have a strange problem with my custom scene nodes. I create them in the same way as in the tutorial but while moving in the scene with FPS camera there are moments when those nodes dissapear completely and appear when I move and rotate the camera somewhere else. What may cause that problem?'
by blackMasoon
Mon Aug 08, 2011 9:01 am
Forum: Advanced Help
Topic: How to load textures faster?
Replies: 29
Views: 2558

Re: How to load textures faster?

Lol... disabling mipmaps made it even slower... Is there any other simple API to draw images on an other layer of HUD which cooperates with irrlicht?
by blackMasoon
Mon Aug 08, 2011 8:51 am
Forum: Beginners Help
Topic: targetting problem
Replies: 5
Views: 377

Re: targetting problem

As I said it only gets the coords of one node... Here's the log:


pig0 pos: (524, 375)
pig1 pos: (-10000, -10000)
pig2 pos: (-10000, -10000)
pig0 pos: (523, 375)
pig1 pos: (-10000, -10000)
pig2 pos: (-10000, -10000)
pig0 pos: (523, 375)
pig1 pos: (-10000, -10000)
pig2 pos: (-10000, -10000)
pig0 ...
by blackMasoon
Mon Aug 08, 2011 6:57 am
Forum: Beginners Help
Topic: targetting problem
Replies: 5
Views: 377

Re: targetting problem

ok so here are the declarations and initialization of those variables:


core::array<IAnimatedMeshSceneNode*> pig;
core::array<vector3df> pigPos;
core::array<vector2di>pigPosXY;
int number_of_pigs = 3;

IAnimatedMesh* mesh = pScene->getMesh( (GetBaseAppPath() + "game/pig.x").c_str());
core ...
by blackMasoon
Sun Aug 07, 2011 9:53 pm
Forum: Beginners Help
Topic: targetting problem
Replies: 5
Views: 377

targetting problem

Hello everyone. I'm using irrlicght & Proton SDK for mobile 3D apps and I'm just curious about one problem... That method selects only one scene node out of my arraylist of them:


void DrawPigLifesStat()
{

for(int i = 0; i < number_of_pigs; ++i)
{
pigPosXY[i].X = GetIrrlichtManager ...
by blackMasoon
Fri Aug 05, 2011 6:57 pm
Forum: Advanced Help
Topic: How to load textures faster?
Replies: 29
Views: 2558

Re: How to load textures faster?

Ok so here is how do I do it. At the begining I init the img's and load all textures:



cam_rect[0] = core::rect<irr::s32>(10,10,273,223);
cam_rect[1] = core::rect<irr::s32>(283,10,556,223);
cam_rect[2] = core::rect<irr::s32>(566,10,839,223);
cam_rect[3] = core::rect<irr::s32>(566,230,839,440 ...
by blackMasoon
Fri Aug 05, 2011 5:30 pm
Forum: Advanced Help
Topic: How to load textures faster?
Replies: 29
Views: 2558

Re: How to load textures faster?

I only need to display those images. Not make textures of them... Any idea how could I simplify that process? Perhaps display them as a top layer with something else than irrlicht?
by blackMasoon
Fri Aug 05, 2011 11:22 am
Forum: Advanced Help
Topic: getRayFromScreenCoordinates problem
Replies: 4
Views: 1482

Re: getRayFromScreenCoordinates problem

Ok... so I took the method code from SVN and mofified:


if (camera->isOrthogonal())
ln.start = f->cameraPosition + (lefttoright * (dx-0.5f)) + (uptodown * (dy-0.5f));
else
ln.start =f->cameraPosition;


to:


if (camera->isOrthogonal())
ln.start = camera->getPosition() + (lefttoright * (dx-0 ...
by blackMasoon
Fri Aug 05, 2011 10:28 am
Forum: Advanced Help
Topic: How to load textures faster?
Replies: 29
Views: 2558

Re: How to load textures faster?

I did a little test and here are the results:

loading 640 JPG files & creating textures out of them takes 32 139 ms
loading 640 BMP files & creating textures out of them takes 26 700 ms.

One JPG file size is ~30 kB
One BMP file size is ~1.1 mB


Looks like that technique with uncompressed files is ...
by blackMasoon
Fri Aug 05, 2011 10:25 am
Forum: Advanced Help
Topic: getRayFromScreenCoordinates problem
Replies: 4
Views: 1482

Re: getRayFromScreenCoordinates problem

The problem looks like it doesn't take the right camera position to start the ray from. And the camera with it's position is initialized for sure before using that method...
Here is the code:


scene::IMeshSceneNode *surface = smgr->addCubeSceneNode(100,0,999,core::vector3df(0,-0.4,0), core ...
by blackMasoon
Fri Aug 05, 2011 9:04 am
Forum: Advanced Help
Topic: getRayFromScreenCoordinates problem
Replies: 4
Views: 1482

getRayFromScreenCoordinates problem

Hello. I have a serious problem with that method with getting ray from screen coordinates. I passed the right 2d pos and an active camera, but it casts the ray in a completely different place in the scene. And the start point is not the camera position... One important thing is.. that the scene is ...