TomaszFurca Posted March 8, 2018 Share Posted March 8, 2018 Hi, For yesterday I was using bake particle system in blender to render nature elements in scene. By now i want to change that to SPS. This should be better (from optimization point of view) than instances and additional export scene with many elements take a lot of time. So i prepare asset with nature elements and simple scene with house. In scene is mesh named "Plane.004", which render particle system in blender, so I want use this plane to generate elements on it using SPS. PG: https://playground.babylonjs.com/#199KHL#17 My questions: 1. I need help with get random position of mesh. This can't be JS random int, because in center of plane is place for road, so there i don't need any element. 2. All of this SPS elements is static, so optimization used in PG enough? Thanks Tom Quote Link to comment Share on other sites More sharing options...
jerome Posted March 8, 2018 Share Posted March 8, 2018 #2 : you're already the best optimization by using a immutable SPS (updatable = false). No need for setting the computeParticleXXX properties to false then, they aren't just used. #1 : not sure to understand what you're trying to achieve Quote Link to comment Share on other sites More sharing options...
TomaszFurca Posted March 8, 2018 Author Share Posted March 8, 2018 I wrong wrote, i have custom mesh and i want to put SPS particles on random position of custom mesh. Quote Link to comment Share on other sites More sharing options...
TomaszFurca Posted March 10, 2018 Author Share Posted March 10, 2018 I finish create particle from SPS on random position of custom mesh - using Vertices Data. Just look https://playground.babylonjs.com/#199KHL#20 But i have another problem with SPS. There is 3 objects Fern, Spruce and ground_plants. In all of them i change Y position to see how it should look, but using SPS unfortunately, they look different. Spruce wood is broken. Fern and Ground plants looks like artifact. Is possible to fix that? Quote Link to comment Share on other sites More sharing options...
TomaszFurca Posted March 14, 2018 Author Share Posted March 14, 2018 Can anyone help with that? Quote Link to comment Share on other sites More sharing options...
Guest Posted March 14, 2018 Share Posted March 14, 2018 Pinging @jerome Quote Link to comment Share on other sites More sharing options...
jerome Posted March 14, 2018 Share Posted March 14, 2018 still not sure to understand what you're trying to achieve Quote Link to comment Share on other sites More sharing options...
TomaszFurca Posted March 15, 2018 Author Share Posted March 15, 2018 The problem is in different look of meshes genered via SPS than original. Just look on PG: https://playground.babylonjs.com/#199KHL#20 Quote Link to comment Share on other sites More sharing options...
jerome Posted March 15, 2018 Share Posted March 15, 2018 could you please isolate what is different in your code (and in what's displayed) to help me to understand ? Quote Link to comment Share on other sites More sharing options...
TomaszFurca Posted March 15, 2018 Author Share Posted March 15, 2018 Of course, there is cleaned code in PG: https://playground.babylonjs.com/#199KHL#29 Quote Link to comment Share on other sites More sharing options...
TomaszFurca Posted March 16, 2018 Author Share Posted March 16, 2018 Ehhh.... my mistake, i pin material to SPS not SPS builded mesh... - https://playground.babylonjs.com/#199KHL#30 GameMonetize 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.