Procedural galaxy and streaming

That’s an interesting system! But I think a simpler approach can be beneficial.

For my own project I use a dynamic floating origin: the camera can move but if it gets too far from the origin (let’s say a few kilometers), I translate everything back in place.

This way I get maximal precision where the camera is, and it plays more nicely with physics engine than having the camera always at the origin.

I think it is also simpler to manage as the logic is simpler and no hierarchy is required :+1:

as @crashmaster already mentioned:

https://doc.babylonjs.com/features/featuresDeepDive/scene/floating_origin

Good ressource! I just feel this one is a bit weird because we have to create entities for everything somehow? I just take all the root nodes of the scene and translate them by the opposite of the camera position and it works nicely ^^

1 Like

yep, I am already using that. I think I will have to a make “planet root origin entities” as well.

This probably means I then cannot leverage BJS local/world/absolute coordinates (on an orbit) and have to compute that myself.

I have an idea, but not sure what the best way would be to:
1 take a node rotation vector (rotation was previously set using mesh.rotation.x|y|z)
2 from this vec3, build two normalised vectors normal to it, but also normal to one another

For precision issues maybe storing rotations as quaternions can be an improvement as well. If you have the position and the rotation, then it is not far fetched to use your own coordinate systems :slight_smile:

I also wondered, did you use a LineMesh for the orbit rendering? Your orbital lines looks really nice :ok_hand:

Yep simple line meshes

FYI, on my slow poke machine, line meshes (as in MeshBuilder.CreatelLine) are very slow. I use them for debugging and do get fps hits with only a few lines active. GreasedLine (or TubeMesh) is a good replacement.

ho :frowning: and have you tried flying around a galaxy? Did you experience crap perf?

GreasedLine - the non camera facing version is the best option, I believe. One thing is especially helpful here:

const position = BABYLON.GreasedLineTools.GetPositionOnLineByVisibility(
  planet.lineSegments, planet.orbitLength, planet.planetOnOrbitPosition
)

Yes, it’s like yours, just wanted todo it myself too: :slight_smile:

2 Likes

Sorry for the confusion. No slow downs yet. Just a heads-up!

This looks really nice :ok_hand:

Thanks but Nope! :smiley: This looks very basic! :smiley: just playin’ around

ah right, thanks :slight_smile:

Thank you for your comments guys – I have not been updating the online explorer(s) for a (little) while now, as I have started (going back to) studying tech tree, skills options, etc.

This is time consuming as hell! :nerd_face:

1 Like

Hi guys,
just added the ability to create and account//logging in… just in case some would like to comment. :blush:
but as briefly described here, there are currently some problems with cloudflare and chromium based browsers - so their challenge token doesn’t always work… -_-

many thanks!

1 Like

silly question… when scaling is applied to mesh supposed to represent a radius… is the scaling applied to its “diameter” (i.e., full size) or to its actual radius? :slight_smile:

I am not sure I understand, if the radius is doubled then so is the diameter :thinking:

You can see it that way: the position of each point of your mesh is multiplied by the scaling in local space, I don’t know if it helps :slight_smile:

1 Like

yeah sorry and thanks - brain crash :-%

No problem :wink: our brains were not made for computer graphics but for hunting and gathering in the savana after all ^^ It is bound to happen sometimes

1 Like

Hello all!

I haven’t commented here for while, but a few minor(ish) features are now available: ability to save bookmarks server-side with an account.
This is taking a lot of time – but a first tech tree is released (not related to BJS, but interesting nonetheless :p).

Hoping you will like it!

1 Like