I am wondering how can I to make a spawner that can replicate objects on a spherical world. I have the basic idea of how from the visual. I also made a spawner before on flat terrain. Just need to upgrade.
Using the below diagram, I can think of a uv noise perlin 3d (from 0 to 1), matching it to rotation (0-360 each angle), line trace to the surface, then if the value of the perlin is above a threshold, spawn a object.
The issue I have is making sure objects are spawned in the near proximity of the player first. Also, if the actor is not in the cull distance simply deleting it. Technically, I would like the player area to have the spawn objects and have it update in the background.
think. Align surfaces, normally, you use the impact normal provided by a trace perpendicular to the imaginary flat plane.
I was thinking vertex normal should be sufficient or face. The issue I do question, it would be smarter to figure out where the player is. Then calculate the surrending error. Originally, I was thinking using perlin3d(x,y,z) or perlin2d(xy) but it might not be ideal. I would have to get the location of the player corresponding to origin, the 4 coordinates between the area. Possibly using some noise value. :-/ Hmmm.
In the end all you need are valid coordinates. The engine should probably take care of culling and occlusion based on visibility.
mostly because spawning new things at runtime will cost you more then setting them up beforehand. Even with a proper HISM component I believe.
it also lessens the load when you can apply hlods and merge actors.
id you purely spawn things - like grass, at runtime, you will likely be limited as to what you can do…