Search found 33 matches
- Sat Feb 09, 2013 9:31 pm
- Forum: Beginners Help
- Topic: [SOLVED]Make node transp using other transp node|xray effect
- Replies: 11
- Views: 3089
Re: Make node transparent using node alpha on top (x-ray eff
I guess something like that could happen when the rendering order is wrong. It should first draw the opaque object, and then the transparant one. If not then the z-test will make the part of the opaque object not drawn at all, which could indeed look like a hole. Problem with that is: it is not guar...
- Fri Feb 08, 2013 10:19 am
- Forum: Beginners Help
- Topic: [SOLVED] IMeshSceneNode Problem
- Replies: 4
- Views: 942
Re: IMeshSceneNode Problem
For each block, the mesh is the same, so you only load it once in your main program, and give the pointer every time when you add a scenenode. You don't need your own block class per se. In the onepiece class just use an empty scene node to hold the 4 block-mesh. And just call addMeshSceneNode 4 tim...
- Thu Feb 07, 2013 11:09 pm
- Forum: Beginners Help
- Topic: [SOLVED] IMeshSceneNode Problem
- Replies: 4
- Views: 942
Re: IMeshSceneNode Problem
First, you dont need to call drawall in your block class or any of your own classes, just let the scenemanager draw the scene in your main loop. Using ->remove is good, if you use ->removeall then you only remove children. You dont need to manually delete the node. it is reference counted so it dele...
- Tue Feb 05, 2013 10:21 pm
- Forum: Beginners Help
- Topic: Irr1.8c++| How can i project a useable grid on to my Terrain
- Replies: 57
- Views: 3564
Re: Irr1.8c++| How can i project a useable grid on to my Ter
Ok the patch size is not what I thought it was.... If you look at the code: the patchsize in the terrainscene node are not the render width of each ' square' in your heightmap, but these are used only for the LOD stuff... which is very nice, but also puts some restraints on what sort of heightmap yo...
- Tue Feb 05, 2013 6:28 pm
- Forum: Beginners Help
- Topic: Irr1.8c++| How can i project a useable grid on to my Terrain
- Replies: 57
- Views: 3564
Re: Irr1.8c++| How can i project a useable grid on to my Ter
You are creating this terrain scenenode yourself right? So you provide it with a heightmap (which you know the size of, or can get), and you also supply the patch size. Now if you heightmap is for example 256 wide, then you get 255 patches. So multiply that with patchsize and you should have the tot...
- Tue Feb 05, 2013 11:33 am
- Forum: Beginners Help
- Topic: Irr1.8c++| How can i project a useable grid on to my Terrain
- Replies: 57
- Views: 3564
Re: Irr1.8c++| How can i project a useable grid on to my Ter
what do you want to know, the amount (width and height) of heighpoints? or the amount (width height) of patches, or do you want to know the total size (width height in units) of the terrain it's drawing?
- Sat Feb 02, 2013 5:13 pm
- Forum: Beginners Help
- Topic: Irr1.8c++| How can i project a useable grid on to my Terrain
- Replies: 57
- Views: 3564
- Sat Feb 02, 2013 3:32 pm
- Forum: Beginners Help
- Topic: Irr1.8c++| How can i project a useable grid on to my Terrain
- Replies: 57
- Views: 3564
Re: Irr1.8c++| How can i project a useable grid on to my Ter
vertices != triangles. If you call drawvertexprimitivelist, you can specify what type of primive you want to draw. triangles is just one of them. the vertices you pass are just the points of your heightgrid, and the indices are references (array-indexes) to those vertices, and depending on what type...
- Sat Feb 02, 2013 11:35 am
- Forum: Beginners Help
- Topic: Irr1.8c++| How can i project a useable grid on to my Terrain
- Replies: 57
- Views: 3564
Re: Irr1.8c++| How can i project a useable grid on to my Ter
As far as I know, the terrainnode treats every pixel in the bitmap as a heightpoint. So if the bmp = 100x100, then you have 99x99 cells. What you can do is read the bmp as a texture (see loading texture tutotials) and get the width and height from there. (cells = width-1 etc.) not sure about the mal...
- Fri Feb 01, 2013 11:02 pm
- Forum: Beginners Help
- Topic: Irr1.8c++| How can i project a useable grid on to my Terrain
- Replies: 57
- Views: 3564
Re: Irr1.8c++| How can i project a useable grid on to my Ter
if you make your own scenenode you HAVE to implement some functions that it needs... they are OnRegisterSceneNode, render, getBoundingBox, getMaterialCount and getMaterial. see http://irrlicht.sourceforge.net/docu/example003.html for an example. they are not hard to implement. I don't fully understa...
- Fri Feb 01, 2013 10:46 pm
- Forum: Beginners Help
- Topic: Irr1.8c++| How can i project a useable grid on to my Terrain
- Replies: 57
- Views: 3564
Re: Irr1.8c++| How can i project a useable grid on to my Ter
Don't know if it matters to you but I'm guessing that you now draw 4 lines for each cell? That would mean you are drawing a lot of double lines if you draw the whole grid like that. If that's the case then you might consider making it draw only 2 lines per cell, except for the cells at the end. shad...
- Fri Feb 01, 2013 3:14 pm
- Forum: Beginners Help
- Topic: Irr1.8c++| How can i project a useable grid on to my Terrain
- Replies: 57
- Views: 3564
Re: Irr1.8c++| How can i project a useable grid on to my Ter
There shouldn't be a need for a raycast. You can use the data you created the TerrainSceneNode with, or you can use the getHeight (f32 x, f32 y) function of the TerrainSceneNode.
- Fri Feb 01, 2013 12:04 pm
- Forum: Beginners Help
- Topic: Irr1.8c++| How can i project a useable grid on to my Terrain
- Replies: 57
- Views: 3564
Re: Irr1.8c++| How can i project a useable grid on to my Ter
I edited my post, CSceneNode needs more work then I thought...
- Fri Feb 01, 2013 11:59 am
- Forum: Beginners Help
- Topic: Irr1.8c++| How can i project a useable grid on to my Terrain
- Replies: 57
- Views: 3564
Re: Irr1.8c++| How can i project a useable grid on to my Ter
A way to do it is to copy/paste the code from CGridSceneNode into your own class. then change the RegenerateGrid() function to take the height into account. You need to pass your heightgrid to the scenenode in the constructor, so it can read from it. And you need to tell the CGridSceneNode (or howev...
- Fri Feb 01, 2013 9:45 am
- Forum: Beginners Help
- Topic: Irr1.8c++| How can i project a useable grid on to my Terrain
- Replies: 57
- Views: 3564
Re: Irr1.8c++| How can i project a useable grid on to my Ter
I already asked in this thread but noone seems to understand my question or just can't answer it. Well to be honest, I'm pretty sure that is caused by how you ask your question. It's very vague, and very big and you don't say what exactly you are are tying to do, what you already tried and where yo...