Search found 11 matches

by twitchyliquid64
Sat Oct 27, 2012 9:59 am
Forum: Beginners Help
Topic: How to create a flat ground? & collision on rails (train)
Replies: 4
Views: 819

Re: How to create a flat ground? & collision on rails (train

Thanks guys. Now, How to make the tracks? Im guessing Ill need a custom scene node that draws the lines? Does anyone know the name of the Irrlicht function that draws a line? I had a quick look but didnt find anything. EDIT : Found irr::core::line3d But I dont see how I create the colour of the line...
by twitchyliquid64
Wed Jul 25, 2012 1:07 pm
Forum: Beginners Help
Topic: Manually creating meshes (from vertexes)
Replies: 17
Views: 4228

Re: Manually creating meshes (from vertexes)

I simply cannot get it to work.           irr::scene::SMesh* mymesh;         mymesh = new irr::scene::SMesh();                 irr::scene::SMeshBuffer *buf = 0;         buf = new irr::scene::SMeshBuffer();                         video::S3DVertex* a = new video::S3DVertex(0,0,10, 1,1,0,    video::SC...
by twitchyliquid64
Tue Jul 24, 2012 2:05 am
Forum: Beginners Help
Topic: Manually creating meshes (from vertexes)
Replies: 17
Views: 4228

Re: Manually creating meshes (from vertexes)

Thankyou all so much! Thats everything I need to make my chunk class and start building a cubic voxel engine. One absolutely final thing: adding different textures for each cube face, like the minecraft 'grass' block. How do I texture each face of the cube? Im guessing textures are called 'Materials...
by twitchyliquid64
Mon Jul 23, 2012 11:30 am
Forum: Beginners Help
Topic: Manually creating meshes (from vertexes)
Replies: 17
Views: 4228

Re: Manually creating meshes (from vertexes)

And lastly, indexs (as in IIndexBuffer) are the same as indices, right? Also,                       scenemgr->drawAll();                                         u16 indices[] = {   0,2,3, 2,1,3, 1,0,3, 2,0,1  };                     video::IVideoDriver* driver = scenemgr->getVideoDriver();           ...
by twitchyliquid64
Mon Jul 23, 2012 11:14 am
Forum: Beginners Help
Topic: Manually creating meshes (from vertexes)
Replies: 17
Views: 4228

Re: Manually creating meshes (from vertexes)

Irrlicht has some a function IMeshManipulator::recalculateNormals which you can use by the way. You only have to be careful that the winding of the vertices for each triangle is correct for this to work I suppose. Winding? So as it stands in my head, this is how I will write my voxel thing? 1. Gene...
by twitchyliquid64
Mon Jul 23, 2012 9:11 am
Forum: Beginners Help
Topic: Manually creating meshes (from vertexes)
Replies: 17
Views: 4228

Re: Manually creating meshes (from vertexes)

Would be pretty tough to "calculate" them, in most cases you should just know or import them. What I mean is this: I have a triangle with vertices (0,0,0) (0,1,0) (0,1,1) What value for the normal do I need to have if I want it to face the sky? likewise to the left? At this stage, I have ...
by twitchyliquid64
Mon Jul 23, 2012 8:03 am
Forum: Beginners Help
Topic: Manually creating meshes (from vertexes)
Replies: 17
Views: 4228

Re: Manually creating meshes (from vertexes)

Also, should I use driver->drawVertexPrimitiveList() or a mesh buffer of some sort?
by twitchyliquid64
Mon Jul 23, 2012 8:02 am
Forum: Beginners Help
Topic: Manually creating meshes (from vertexes)
Replies: 17
Views: 4228

Re: Manually creating meshes (from vertexes)

Does that mean that if I have

u16 indices[] = { 0,2,1 };

It will create a triangle that operates between Vertice[0], Vertice[2], Vertice[1]??

Also, how do you calculate the normal?
by twitchyliquid64
Mon Jul 23, 2012 12:15 am
Forum: Beginners Help
Topic: Manually creating meshes (from vertexes)
Replies: 17
Views: 4228

Re: Manually creating meshes (from vertexes)

Additionally: (This is a really simple question but I haven't been able to find the answer ANYWHERE)

Whats the difference between a vertex and an indice? The SD3Vertex Has 4 attributes; Colour, Normal, Position, and Texture. What is the normal (same as in math?)
by twitchyliquid64
Sun Jul 22, 2012 10:21 pm
Forum: Beginners Help
Topic: Manually creating meshes (from vertexes)
Replies: 17
Views: 4228

Manually creating meshes (from vertexes)

Hi, As part of a voxel engine I am trying to make (following this excellent tutorial: https://sites.google.com/site/letsmakeavoxelengine/ which sadly is focused on openGL rather than irrlicht), I need to specify vertices manually (in a mesh) and have the engine draw them. The world will be composed ...
by twitchyliquid64
Sun Jul 08, 2012 11:56 am
Forum: Beginners Help
Topic: How to create a flat ground? & collision on rails (train)
Replies: 4
Views: 819

How to create a flat ground? & collision on rails (train)

Hi all, I can spilt my problem into three main things, the first being the simplest. 1: How can I create a very very large flat ground? preferably texturable, but not required. I was thinking maybe there is a CreatePlaneNode function or something, but I dont think thats the correct way to do terrain...