Hello,
I given that I have a bitmap which is used as a texture for a Sphere - I would like to write a function which gets a point coordinate on that bitmap and a sphere geometry (U,V,Sphere) and returns a Vector3f of the closest sphere vertex to that given bitmap U,V
Does anyone knows the Math or does JME3 has a ready to use function for calculating it?
I need to maintain all kind of “events” around the globe. each event can be represented by some special effect. An event might happen in a geographic location which is currently hidden but still I want to do something there (start a particle system for example) therefore I don’t think that finding a picking point is good for this use case
We’ll you said “shoot at”. I guess you mean it as in shoot a meteorite at London or whatever. Use a cube sphere. You can work out the cords easily then. It’s just 6 quads.
Let’s say I want to make it simple and track just the first Vertex position - I wrote this code in the simpleUpdate() func:
FloatBuffer buff=sphereMesh.getFloatBuffer(VertexBuffer.Type.Position);
float x = buff.get(0);
float y = buff.get(1);
float z = buff.get(2);
But even though I constantly rotate my sphereGeo I always get the same values for x,y,z. What am I missing?
I need to write a 3D simulation at work where things happens in a specific geographic points (things might be data flowing to that points or some kind of alerts raised).
I want to present those things (events) with an effect or particle system node but the globe (earth) is always rotating and i need in real-time to find the current position of a geographic location (say Eiffel Tower) on my globe so I can correctly position the effect node.
Do you want to do this in a shader? If so, I do have some glsl code that I wrote for damage splating. I pass the collision point point to the material and the shader has a buffer of locations that it translates to texture coordinates so that it can overlay the damage texture at that point on the mesh. I can dig up the code. It translates, in the shader, the mesh position to the texture position regardless of the mesh complexity or UV mapping.
Splatting things on planet earth is pretty trivial in comparison. Though I gather from OPs posts that it’s real objects they are trying to locate on the earth… not just a splat.
My contention is that he doesn’t even need that. (But to be fair, it’s a little unclear what OP wants… a picture would be worth a thousand words here.)