New Tiled Terrain Scene Node [works with Irr 1.5]

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
varholl
Posts: 22
Joined: Thu Jul 12, 2007 6:59 pm
Location: Argentina
Contact:

Post by varholl »

One Question... yesterday i was testing the terrain.. it works awesome.. so i've started to build my world... i need to add some water... because there is the coast of the sea.. and a long river to the final mountains..

The only way i figure out how to do this.. was creating a mesh with the same size of the terrain... (believe me... it's huge) it worked.. but i don't know if there are better ways to do this.. maybe not rendering the entire mesh... i don't know... Someone Knows how to do this??

Thanks
A caos world where only the strongest lives, weak is not an option... you must fight.. Nokturna!!

http://nokturna.varholl.com.ar
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Yes another mesh is good solution. If your water is flat, no waves, just some animated texture, it can be just one plane = 2 triangles.
varholl
Posts: 22
Joined: Thu Jul 12, 2007 6:59 pm
Location: Argentina
Contact:

Post by varholl »

My water has wave effect.. just like in the example from irrlicht...

now i have only one huge mesh... but.. let me show you how my terrain is..

Image

if you see the image.. it hast a long coast.. and then a curved river all the way to the mountains..

i have created a mesh with the same size of the terrain... it would be ok in my scenario??

Thanks!
A caos world where only the strongest lives, weak is not an option... you must fight.. Nokturna!!

http://nokturna.varholl.com.ar
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Do you mean vater mesh of the same size as terrain? ...As I see your terrain is 256x256 pixels large. That would mean vater mesh of 255x255=65025 tiles = 130050 polygoons. In my opinion its quit lot. That would cut my fps to standstill.

My terrain node can be updated on runtime. Try to create another terrain which would represent your water. It would move along your camera just like real terrain itself. You just need to code wave efect ...which is not so dificult, it is based on cosinus function. Look at sourcecode of Irrlicht water, there is such function.
mhack
Posts: 38
Joined: Sun Apr 01, 2007 2:13 am
Location: Montana, USA

Bug in getMaterialCount()

Post by mhack »

Hi arras, I would like to report a bug in the currently posted version (http://www.spintz.com/arras/Files/ShTlT ... 070430.zip),

the function getMaterialCount() is missing a return:

Code: Select all

// returns amount of materials used by terrain
u32 ShTlTerrainSceneNode::getMaterialCount()
{
    Material.size();
}

arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Right.

Corrected and updated with elvmans code.

Thansk all.
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

Here is the terrain scene node using TriangleSelectors:
Download

Yesterday I found an incredible tool/terrain manager for Ogre here (check out the wiki). It is an editable terrain which is nothing impossible for Irrlicht too. I suggest starting to make something like this with ShTlTerrainSceneNode. What we need and what ShTlTerrainSceneNode does not support is: LOD, splatting and automatic lightmap generation. I could make lightmap generation using BlindSide's shader pack, but we should find some coders for splatting and LOD implementation. What do you think?
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

I think it'd be great to have. From what it looks like you can edit the terrain and the texture. Does that mean you can also save the heightmap and colormap? As for lightmaps and such, I'm sure there's a way to do it without shaders.. Not everyone can use them xD
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

Yes, I am making a terrain editor wich is able to save the heightmap and lightmap as a BMP. Ok, I will use RTT for lightmap calculations. Wait the release of the editor. The only two things I ask is LOD and splatting. The second thing (splatting) is a little bit harder (or impossible with Irrlicht) to implement, but LOD is not so hard. I don't have time for these thing (otherwise I would do it by myself).
varholl
Posts: 22
Joined: Thu Jul 12, 2007 6:59 pm
Location: Argentina
Contact:

Post by varholl »

This editor that you are making will be able to add objects like the irredit??

It would be really great to do that..

One suggestion... let the possibility to add water... it would be nice :D
A caos world where only the strongest lives, weak is not an option... you must fight.. Nokturna!!

http://nokturna.varholl.com.ar
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

I will leave functions like adding scene nodes etc. for IrrEdit. I will post the first release of it in a few days. We should discuss its features and make suggestions afterwards.
varholl
Posts: 22
Joined: Thu Jul 12, 2007 6:59 pm
Location: Argentina
Contact:

Post by varholl »

How could i use this tiled terrain with IrrEdit? Is that possible?

Thanks!!
A caos world where only the strongest lives, weak is not an option... you must fight.. Nokturna!!

http://nokturna.varholl.com.ar
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

Simply load the heightmap and lightmap generated with my editor and use it with IrrEdit's terrain. When loading the .irr file, you should replace the Irrlicht's terrain with this one. I guess this is the only choice.
varholl
Posts: 22
Joined: Thu Jul 12, 2007 6:59 pm
Location: Argentina
Contact:

Post by varholl »

It should be the same way if i want to use it right now right?? I can load the hegithmap and textures of my terrain on irredit.. set the correct scale and then start adding nodes..

then in my game... i replace the irr terrain for the shlterrain...

that should work too right?
A caos world where only the strongest lives, weak is not an option... you must fight.. Nokturna!!

http://nokturna.varholl.com.ar
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

LOD is something i am planing to make. In fact I already did it with some older versions of my terrain. Problem with LOD is texture. As you know texture is applied per tile ...but howe to apply texture if you have tiles which are not the same size?

You can use largest LOD tile but this would result in les detailed terrain.

Splatting? ...Can you explain? ...English is not my mother tongue and I cant find this word in dictionary.

I was also planing to make "sea scene node". It would work in similar way as terrain node. With controlable size and direction of waves and animated texture.

Now my last plans are:
To rework terrain scene node. I want to change way textures are handled. I want to implement kind of automatic texture blending, on tiles where diferent textures meet. I already have some idea howe to do it. Problem is there are some bugs in Irrlicht with OpenGL and some materials I want to use for that. I dont know if these are going to be corected. I was already reporting them.

This new terrain should have some kind of LOD.

Now problem is I dont have time for coding right now and I will probably not have it soon.
Post Reply