Exporting particle grass from Blender
Exporting particle grass from Blender
Hi,
my friend made me a nice particle grass model in Blender, but when i export it, i get just a green plane. I am exporting to .obj. How should i properly export it? Should I use some other format?
my friend made me a nice particle grass model in Blender, but when i export it, i get just a green plane. I am exporting to .obj. How should i properly export it? Should I use some other format?
I am not sure what exactly a particle grass model is. You can't export effects if that is what you need. You can only export stuff like textured polygons.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
Memorial76
- Posts: 103
- Joined: Mon Aug 10, 2009 8:22 pm
- Location: France
Well, to be honest, i don't know what particle grass is too
He just told me it is called like that. If it helps, i can upload the file in .blend format.
Last edited by ent1ty on Mon Mar 08, 2010 6:05 pm, edited 2 times in total.
-
Memorial76
- Posts: 103
- Joined: Mon Aug 10, 2009 8:22 pm
- Location: France
well write your own particle system for this. static grass like that seams reasonable to me when using VBOs. but dynamic with thousands of particles hmmm...dunno
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
At the moment you can't export a particle system in blender and import it into irrlicht. The systems are completely different (one is optimized for raytracing, the other is optimized for gameplay)
The irrb is a project that can export blender to irrlicht, but can't export particle systems (and even when it does, it will be limited)
I've modified the grass scene node for putting a grass mesh on a ground mesh. If you are interested I can post if here, though you might find it difficult to implement (it uses a texture to figure out where to put the grass)
If you're using a ground terrain and a image for grass you can simply use the grass scene node in the scripts forum
The irrb is a project that can export blender to irrlicht, but can't export particle systems (and even when it does, it will be limited)
I've modified the grass scene node for putting a grass mesh on a ground mesh. If you are interested I can post if here, though you might find it difficult to implement (it uses a texture to figure out where to put the grass)
If you're using a ground terrain and a image for grass you can simply use the grass scene node in the scripts forum
My ground is made from terrain(heightmap) and i already implemented calculating of position for all the grasses and also hiding them depending on their distance from camera(screen http://img709.imageshack.us/img709/694/23872444.jpg ). Now I will just replace all the cubes with some nice grass models, but I am a bit afraid of the fps. When i set their hardware mapping hint to static, is there any chance that they will render faster than cubes?
But that would make impossible for me to hide the distant grass nodes, wouldn't it? Anyway, here is my current grass model showing also fps on the screen(nvidia 9500gt)http://img14.imageshack.us/img14/7051/55344849.jpg
The model has about 20 000 polys.
Now I am facing another problem; is there any way to get terrain's rotation in exact coordinations? Want to align the grass nicely to the terrain.
The model has about 20 000 polys.
Now I am facing another problem; is there any way to get terrain's rotation in exact coordinations? Want to align the grass nicely to the terrain.
It depends on the bottleneck. how do you calc visibility?maybe patching several grassnodes together will speed it up as well.ent1ty wrote:But that would make impossible for me to hide the distant grass nodes, wouldn't it? Anyway, here is my current grass model showing also fps on the screen(nvidia 9500gt)http://img14.imageshack.us/img14/7051/55344849.jpg
The model has about 20 000 polys.
Now I am facing another problem; is there any way to get terrain's rotation in exact coordinations? Want to align the grass nicely to the terrain.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
I calc it from a ray cast on every node, then get the rays lenght and maybe hide it, depending on the distance
Anyway, how can one patch several scenenodes into one?
Code: Select all
if(timer->getTime()%10==0)
{
grassesShowed=0;
for(int i=0; i< grasses.size(); i++)
{
ISceneNode* grassNode= grasses[i];
if(!strcmp(grassNode->getName(), "grass"))
{
line3d<f32> grassRay;
grassRay.start= grassNode->getPosition();
grassRay.end= camera->getPosition();
if(grassRay.getLength()>50)grassNode->setVisible(false);
else if(grassRay.getLength()>40 && i%4==0){grassNode->setVisible(false); grassesShowed++; }
else if(grassRay.getLength()>30 && i%2==0){grassNode->setVisible(false); grassesShowed++; }
else {grassNode->setVisible(true); grassesShowed++;
}
}
}
}