MasterK Posted July 14, 2016 Share Posted July 14, 2016 rotate the sps mesh. in some place look the particle is not face to camera... see this: http://www.babylonjs-playground.com/#WCDZS#34 Quote Link to comment Share on other sites More sharing options...
jerome Posted July 14, 2016 Share Posted July 14, 2016 I'll check this in some time, this looks like a bug. Actually, if you need only planar particles and billboard, you should consider using the standard particle system or the sprite manager that are both more performant than the SPS in this very case (bilboard + planar particles) Quote Link to comment Share on other sites More sharing options...
MasterK Posted July 14, 2016 Author Share Posted July 14, 2016 9 minutes ago, jerome said: I'll check this in some time, this looks like a bug. Actually, if you need only planar particles and billboard, you should consider using the standard particle system or the sprite manager that are both more performant than the SPS in this very case (bilboard + planar particles) Yeah, i know that.. I would love to wait for you~ And can you guys make the stretched billboard, horizontal billboard (it's easy one) and vertical bill board too?? like unity3D... I did these hardly and there's still something wrong, especially Stretched billboard, too difficult to calculate the rotation. Quote Link to comment Share on other sites More sharing options...
jerome Posted July 14, 2016 Share Posted July 14, 2016 I guess that I understand : your camera is not looking at the mesh position but towards a fixed direction. The SPS billboard mode only works on the camera-mesh axis. Billboarding means rotating each particle so it faces the camera position, not the camera direction, what can be impossible in some cases. Quote Link to comment Share on other sites More sharing options...
jerome Posted July 14, 2016 Share Posted July 14, 2016 So for now, it's not a bug but the expected behavior. I need to think if I can take in account the camera direction to compute differently the rotation needed by the billboarding. This will take a little time. BTW, I just modified the current billboard algo so it doesn't use any longer the normals final recomputation. So a big re-iteration less ... this means the billboard is now supposed to be as fast as the standard mode. Quote Link to comment Share on other sites More sharing options...
gryff Posted July 14, 2016 Share Posted July 14, 2016 2 hours ago, jerome said: I just modified the current billboard algo so it doesn't use any longer the normals final recomputation. So a big re-iteration less ... this means the billboard is now supposed to be as fast as the standard mode. @jerome : You referring to billboarding with the SPS system or billboarding across all BJS ? cheers, gryff Quote Link to comment Share on other sites More sharing options...
jerome Posted July 14, 2016 Share Posted July 14, 2016 Just billboarding inside the SPS what is a per particle rotation dedicated computation, for my answer. The BJS billboard rotates a whole mesh. So you can billboard the SPS mesh but all the particles will kept in the same orientation relatively to each other. BTW, I think I found a way to billboard the particles according to the direction looked at the camera and not only its position. But I need to get confirmation from the BJS grand masters that all the cameras used to render a scene are actually TargetCameras... so they have a target and then a direction looked towards. MasterK and gryff 2 Quote Link to comment Share on other sites More sharing options...
jerome Posted July 14, 2016 Share Posted July 14, 2016 ok, I just checked all classes of cameras, they seem to be TargetCameras making my PR [EDIT] ok, added a better computation for billboard. Now the direction looked to by the camera is taken in account and not only the cam-mesh axis. This will give a better expected result with FreeCamera if it doesn't look at the SPS but some particles are still in its frustum. MasterK 1 Quote Link to comment Share on other sites More sharing options...
MasterK Posted July 15, 2016 Author Share Posted July 15, 2016 5 hours ago, jerome said: ok, I just checked all classes of cameras, they seem to be TargetCameras making my PR [EDIT] ok, added a better computation for billboard. Now the direction looked to by the camera is taken in account and not only the cam-mesh axis. This will give a better expected result with FreeCamera if it doesn't look at the SPS but some particles are still in its frustum. awesome~~~~ toooooo nice~~ i'll check it now~~~~~ thank you~~~ Quote Link to comment Share on other sites More sharing options...
MasterK Posted July 15, 2016 Author Share Posted July 15, 2016 @jerome i update the latest code from github. but all billboard sps don't work... display nothing. Quote Link to comment Share on other sites More sharing options...
MasterK Posted July 15, 2016 Author Share Posted July 15, 2016 mat.backFaceCulling = false; display only when add this. Maybe you make wrong side... others are good~ Quote Link to comment Share on other sites More sharing options...
jerome Posted July 15, 2016 Share Posted July 15, 2016 I'm checking this... you're right, I missed this because I had the backFaceCulling off too [EDIT] fixed : https://github.com/BabylonJS/Babylon.js/pull/1263 thank you for the bug report :-) MasterK 1 Quote Link to comment Share on other sites More sharing options...
MasterK Posted July 15, 2016 Author Share Posted July 15, 2016 It's perfect now. thank you and all others for contribution to BABYLON. It's best. jerome 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.