Irr Tech Demo and Troubles

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Irr Tech Demo and Troubles

Post by ACE247 »

Image
So here's my issue, Several Hundered Trees, all should be animated by wind.
What's the best way? I've already for optimization combined all the tree meshes sharing the same material/texture.
Now how will I go about animating them for wind?
I've been thinking of just animating sectors of trees with an armature, but is there a better way of going about this? Maybe in Code at runtime?
PS: What you're seeing is a tiny part of an Irr Tech Demo ;)
Last edited by ACE247 on Wed Aug 01, 2012 6:26 pm, edited 1 time in total.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: 'Many-mesh' troubles

Post by greenya »

You can animate far away trees less often then closer ones.
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: 'Many-mesh' troubles

Post by ACE247 »

Just some specs
For only the trees:
19 Meshes with 202343 Faces all together.... That's just the trees!
Now all the Rocks:
9 Meshes with 588245 Faces
The Terrain Geometry with special Meshes:
127 Objects with a total 55237 Faces
The River and windmill:
5 Meshes with 1889 Faces
In total 850094 Faces, adds up to about ~200MB Of Mesh and Texture Data
It's gona be on heck of a Demo :twisted:
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: 'Many-mesh' troubles

Post by hendu »

My eyes, please enable alpha and take a new screenie ;)

Anyway, you can do that with a vertex shader. I did that in my old grass demo, scaled the effect by the vertex height (higher bends more).
Also you really should be instancing each type of tree instead of duplicating them as meshes.
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: 'Many-mesh' troubles

Post by ACE247 »

Actually, the trees with the same textures are all one mesh as such, instancing is still a bit dodgy. The Mesh.3284 is just a remnant name from before I merged all similar texture trees. I'll be sure to provide screens for the whole Scene when some things have been sorted. :)
Also how would you do the vertex shader, for instance how do I decide which vertices of the trees to pass to the Shader? Should I just animate the edges of leaf planes? (That's still alot, to pick out of the soup of Geometry)
I'm also using a vertex shader to animate the Grass planes on the forest floor.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: 'Many-mesh' troubles

Post by hendu »

You pass everything, and use some metric on how much wind to apply. So your problem becomes one of picking a nice-looking metric.

edit: See this crappy drawing for an example. Here you would hijack the vertex color for this, darker = wind applies more. Of course you'll need to disable the vertex color's effect on textures.

Image

edit2:
Actually, the trees with the same textures are all one mesh as such, instancing is still a bit dodgy.
Yes, you've batched them, but it's still duplicate data. You have one tree N times in vram, in different positions etc, when you could have it there once, just specifying the variations (position, color, scale) independently.
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Images

Post by ACE247 »

WARNING These Images may cause asphixiation or even death if viewed incorrectly. :D
Some raw images of the current state of things, no lighting whatsoever yet.
This is purely diffuse Color.

Image
The River, the water textures will be fully animated you can see the Waterfall normal map.

Image
A small hut in the Forest

Image
The River again

Image
Boyscouts Tent Site, white objects are not textured

Also bear in mind the Scene is still without a lot of Dynamic Physics Props

Edit: Ok, about the Instancing, get what you mean now. There's just the issue of having to re-organize the whole scene in Blender Now so that I use placeholders instead and then let the code load a mesh and rotate them around, not going to be easy. Luckily I did keep a copy of the Original File :)
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Irr Tech Demo and Troubles

Post by Mel »

Looks incredibly promising! :)

The good thing is that if you put all the objects that share the same texture in a single object inside the 3D program, normally, they export into a single meshbuffer. The drawback... Well, it would be cool that Irrlicht did that on its own >∨<
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Re: Irr Tech Demo and Troubles

Post by Virion »

Looks good. There are some feedbacks though by looking at the screenies:
1. the waterfall looks purple-ish which looks very different from the river's color
2. you need some blending between the textures at the cliff
3. there are some obvious seams on the rock texture

overall looks good! can't wait to see shadow being added to the scene :D
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: Irr Tech Demo and Troubles

Post by devsh »

ONE WORD... Anti-Aliasing is A MUST!!!


you need reflections on the water and a complex shader there

I'd recommend occlusion queries to increase the FPS of everything.

You need parallax occlusion mapping on the tents because otherwise they will look like they are from the dx8 era

Post processing would be nice (SSAO, HDR, DoF)
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: Irr Tech Demo and Troubles

Post by ACE247 »

Ok Ok, guys! This is just preliminary testing stuff etc. Currently there is no Shaders or anything other than mesh data and diffuse color textures in that scene yet. The Waterfall is just a Normal Map texture you see there. Also this demo Will be OpenGL 'ONLY'. @devsh, those tents will get overhauled entirely to have an interior aswell. Also on the ground multiple 'clutter' layers are still missing ie grass layer, debris layer, decal layer.
For the Moment I'm still screwed managing all of the Scene Data. If all the meshes aren't batched atc, there are over 9000! Yes over 9000 and Irrlicht crawls like a twice dead zombie then. With simple Batching it's massivley improved to around 200FPS on some machines. But there's still Instancing and Grid Cell/Sector based scene Management to be worked on to really get this going somewhere.

Fact is I'm primarily a 3D Modeller and Mapper, Programming is more my second Hobby/Job. I really would like to get someone else onboard here to work together with, particularly as I'm yet no good with 'more than simple' Shaders.

I'm going to start a new thread where i'll outline more entirely the details. But give me some time for that, ok? ;)
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: Irr Tech Demo and Troubles

Post by devsh »

grid/cell system lends itself wonderfully to occlusion queries (GPU GEMS!!)
Post Reply