aframe-environment-component icon indicating copy to clipboard operation
aframe-environment-component copied to clipboard

[Question] saving ground hills geometry

Open arpu opened this issue 7 years ago • 7 comments

for network aframe i need to save the ground hill geometry so every user get the same ground is this possible?

arpu avatar Dec 23 '17 16:12 arpu

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 .

feiss avatar Dec 23 '17 19:12 feiss

perfect! i will test this asap

arpu avatar Dec 23 '17 21:12 arpu

screenshot-socialvr app-1514317084473 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)

arpu avatar Dec 26 '17 17:12 arpu

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

arpu avatar Jan 01 '18 17:01 arpu

yeahh this works for me! i overwrite the the verts[i].z with a saved heightmap

arpu avatar Jan 01 '18 17:01 arpu

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

jamesdeantv avatar Oct 02 '18 13:10 jamesdeantv

there must be a bug in the generator, two terrains with the same seed should look the same. I will look at it

feiss avatar Oct 04 '18 15:10 feiss