aframe-environment-component
aframe-environment-component copied to clipboard
[Question] saving ground hills geometry
for network aframe i need to save the ground hill geometry so every user get the same ground is this possible?
Sure. You just have to set the environment components with the same parameters. Seed parameter is the key so the randomness is the same, make sure all clients have the same seed
El 23 dic. 2017 17:48, "arpu" [email protected] escribió:
for network aframe i need to save the ground hill geometry so every user get the same ground is this possible?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/feiss/aframe-environment-component/issues/32, or mute the thread https://github.com/notifications/unsubscribe-auth/AAV9wN5FfjBw_IlbjzjQ_o_whLw2i0Cuks5tDS7IgaJpZM4RLtaE .
perfect! i will test this asap
testing with
<a-entity environment="shadow: true; flatShading: true;ground: hills; groundYScale: 25; seed: 17; skyType: none; skyColor: #14645f; horizonColor: #a3dab8; lighting: none; lightPosition: [object Object]; fog: 0.73; groundTexture: none; groundColor: #ae3241; groundColor2: #db4453; dressing: none; dressingAmount: 150; dressingColor: #a9313d; dressingVariance: [object Object]; gridColor: #239893; grid: none;"></a-entity>
on all clients but i get different results ( different hill height and position)
i think i need to save h in an array? https://github.com/feiss/aframe-environment-component/blob/master/index.js#L484
looks like the different come from this noise
yeahh this works for me! i overwrite the the verts[i].z with a saved heightmap
Hi @arpu can you provide your code changes that show networked entities sharing the same environment? @feiss is this possible without generating a heightmap? Can you provide a bit more insight to the discussion? In the end, I would like to be able to load randomly networked terrains with the option to sideload custom heightmap also. Thanks
there must be a bug in the generator, two terrains with the same seed should look the same. I will look at it