HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log inLog in  

Share | 
 

 irrlicht and rain

View previous topic View next topic Go down 
AuthorMessage
sprocket



Messages : 2
Date d'inscription : 2009-12-03

PostSubject: irrlicht and rain   Thu Dec 03, 2009 4:14 am

I am trying to run the rain example in irrlicht. I managed to make it work but i have 2 main problems.
To make the rain follow the fps camera i use this code in the while loop:
Code:
 rainZone->setPosition(Vector3D(cam.X,5.0f,cam.Z));
This actually works but it has a delay and i cannot see the rain when i move. Also when the reposition is complete i cannot see the rain in a particular range when i rotate my camera.
My second problem is that from time to time it starts appearing some strange artifacts and it doesn' t stop unless i restart the program.

Any ideas??

Great job btw! I really like your library!
Back to top Go down
View user profile
Juff
Developer


Messages : 539
Date d'inscription : 2009-07-14
Age : 34

PostSubject: Re: irrlicht and rain   Thu Dec 03, 2009 1:00 pm

Hi,

first of all, are you using the latest svn version ? The Irlicht module of the version 1.04.00 was the first one and it has a fews bugs. You can download the latest version directly from here.

For the delay, it is normal, you got to tune the system so that it follows the camera. If their is too much delay, you can increase the radius of the ring used to generate the rain (it is not a ring but a aabox in the previous rain demo in 1.04), increase the gravity so that the drops falls faster, lower the altitude of the ring, increase the density of the fog so that we see less far... it is all a matter of tuning.

Another way of not having a delay at all, is making the entire system relative to the camera. You can enable that when constructing an irrsystem (by setting worldTransformed to false). In that case, when moving the irrsystem like any other node, the whole particles will move with it. So instead of moving only the zone, move the entire system. It can work for for example car games where the camera is moving very fast but with camera moving more slower, their will be no delay but the effect wont be that good (as the drops are moving with the camra).

For you other issues try to use the new version and tell me if you still got problems.
Back to top Go down
View user profile http://spark.developpez.com
sprocket



Messages : 2
Date d'inscription : 2009-12-03

PostSubject: Re: irrlicht and rain   Thu Dec 10, 2009 2:51 pm

Thank you for your fast replay.

I get what u mean about the delay. I thought that i was missing something because it rains so good in your non-irrlicht example Smile
The problem with the strange triangles that appear some times is not solved.
I am using the last svn version of spark and irrlicht 1.6

I also found another problem.
When i increase the rainRatio, after 24/100 (i think..) the program crashes or some times i just cant see the rain untill i decrease the ratio (the splashes and the drops are still visible)

That does not happen if i comment out the dropgroup in the killrain function but the rain is not complete without the drops Smile


Code:
bool killRain(Particle& particle,float deltaTime)
{
   if (particle.position().y <= -2.0f)
   {
      particle.position().set(particle.position().x,-2.01f,particle.position().z);
      splashGroup->addParticles(1,particle.position(),Vector3D());
      //dropGroup->addParticles(param(2,8),particle.position(),dropEmitter);
      return true;
   }
   return false;
}
Back to top Go down
View user profile
Juff
Developer


Messages : 539
Date d'inscription : 2009-07-14
Age : 34

PostSubject: Re: irrlicht and rain   Mon Dec 14, 2009 11:25 am

Hi, sorry for the late replys (i was quite busy those days)

Regarding the crash, it seems it is a problem with the validity of the dropEmitter pointer. The pointer must be valid at all times when the system is running.

For the problem with strange triangles, this is weird. Can you get a minimal code example that reproduces the issue so I can test it on my side ?
Back to top Go down
View user profile http://spark.developpez.com
Sponsored content




PostSubject: Re: irrlicht and rain   Today at 10:12 am

Back to top Go down
 
irrlicht and rain
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Notting Hill Carnival Ignores Rain

Permissions in this forum:You cannot reply to topics in this forum
 :: English Forum :: Questions (en)-
Jump to: