Search found 246 matches

by smso
Fri May 07, 2021 9:28 am
Forum: Advanced Help
Topic: Matrix Rotation Around Local Axes
Replies: 23
Views: 5052

Re: Matrix Rotation Around Local Axes

I wrote something similar long time ago, these may be of some help:

To rotate / revolve node in world space & in local space:
http://irrlicht.sourceforge.net/forum/v ... =9&t=47924
Look at rotateNodeInLocalSpace() or revolveNodeInLocalSpace()

Regards,
smso
by smso
Mon Aug 04, 2014 10:16 am
Forum: Code Snippets
Topic: Automatic Texture reload
Replies: 9
Views: 4849

Re: Automatic Texture reload

user
lolgamegd01
is a spammer
by smso
Sat Jun 28, 2014 6:39 am
Forum: Advanced Help
Topic: Draw highlited 2d region on golf field
Replies: 8
Views: 1730

Re: Draw highlited 2d region on golf field

The following code fragments maybe helpful: using namespace irr;   core::array<video::S3DVertex> Vertices; core::array<u16> Indices;   void setupPixmapQuad() {     Vertices.set_used(4);       //S3DVertex => pos, normal, color, texcoords     video::SColor color(128, 255, 255, 255);     Vertices[0] = ...
by smso
Fri Jun 20, 2014 3:54 pm
Forum: Beginners Help
Topic: Drawing a truncated cone
Replies: 4
Views: 557

Re: Drawing a truncated cone

See my code snippet to create a frustrum mesh:

http://irrlicht.sourceforge.net/forum/v ... =9&t=45413

Regards,
smso
by smso
Mon Jan 20, 2014 5:48 am
Forum: Beginners Help
Topic: getHeight for animatedmesh or polygon mesh
Replies: 3
Views: 462

Re: getHeight for animatedmesh or polygon mesh

I used the transformed bounding box for finding the y-offset to prevent the character from walking below the ground, e.g. f32 getAnimatedMeshSceneNodeYOffset(scene::IAnimatedMeshSceneNode*  node) {     f32 scale = 1.0f;     scene::ISceneNode* parent = node->getParent();     if (parent)         scale...
by smso
Mon Jan 20, 2014 5:39 am
Forum: Advanced Help
Topic: Drawing an icosahedron sphere with drawVertexPrimitiveList?
Replies: 9
Views: 1471

Re: Drawing an icosahedron sphere with drawVertexPrimitiveLi

Sure this can be done in irrlicht. Extract the vertices and indices from the data files by parsing with std::ifstream and std::stringstream. Then set up a scene::SMesh from the vertices and indices and create a scene::IMeshSceneNode for rendering. Cautious: Index in irrlicht starts from 0 instead of...
by smso
Mon Dec 30, 2013 7:16 pm
Forum: Advanced Help
Topic: [SOLVED] screen space decals
Replies: 11
Views: 75863

Re: screen space decals - inverse world-view matrix problem

@arnir:
... (but follow geometry "under the decal" - it's good!)...
Then you should update invFinalMat only when firing the gun,
i.e. calculate invFinalMat outside the shader callback and send it to the shader callback at the proper moment.

Regards,
smso
by smso
Sun Dec 29, 2013 10:46 pm
Forum: Advanced Help
Topic: [SOLVED] screen space decals
Replies: 11
Views: 75863

Re: screen space decals - inverse world-view matrix problem

hendu wrote:No, the function does correspond to the multiplication (the fourth component of a 4-wide vector is simply ignored), and OP's case should indeed work.
Sorry, my fault.
I looked at the source code "matix4.h" and confirm hendu's saying.

Regards,
smso
by smso
Fri Dec 27, 2013 3:52 pm
Forum: Advanced Help
Topic: [SOLVED] screen space decals
Replies: 11
Views: 75863

Re: screen space decals - inverse world-view matrix problem

The transformVect() function is not the same as "multiplication of vector by a matrix". Think about this:
matrix4 is 4x4 and vector3df is 3x1 (or 1x3 ?)...

Regards,
smso
by smso
Wed Nov 06, 2013 5:12 pm
Forum: Beginners Help
Topic: how to make a smooth rotation?
Replies: 6
Views: 673

Re: how to make a smooth rotation?

You may be interested in this:

http://irrlicht.sourceforge.net/forum/v ... =9&t=47304

Regards,
smso
by smso
Sun Sep 22, 2013 5:30 pm
Forum: Beginners Help
Topic: Apply a texture on a 3D model
Replies: 1
Views: 264

Re: Apply a texture on a 3D model

You should disable lighting for the node if no light was used:

Code: Select all

Nroom->setMaterialFlag(irr::video::EMF_LIGHTING, false);
Regards,
smso
by smso
Sun Sep 22, 2013 3:58 pm
Forum: Beginners Help
Topic: Rotating an Animated mesh scene node
Replies: 7
Views: 1122

Re: Rotating an Animated mesh scene node

It seems that your model is not centered at the origin. Try revolveNodeInLocalSpace() instead.

Code: Select all

void revolveNodeInLocalSpace(scene::ISceneNode* node, f32 degs, const core::vector3df& axis, const core::vector3df& pivot)
...
pivot is the offset from the origin

Regards,
smso
by smso
Fri Sep 13, 2013 8:22 pm
Forum: Beginners Help
Topic: Camera Stuck In Mesh
Replies: 4
Views: 396

Re: Camera Stuck In Mesh

Try another mesh and/or turn on the debug data of the node.

Regards,
smso