These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

WebGL starmap questions

Author
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#1 - 2013-08-10 21:35:42 UTC  |  Edited by: Steve Ronuken
I have a few thoughts of things to do with this, but I'm currently running into 2 issues:


  • No neutral background (that I know about). Ideally a black, grey or deep blue one.
  • The png format for colors and sizes isn't documented.


I can create random ones, no problem, but knowing which pixel refers to which particular solarsystemid, that I've not got a clue about.

It's not as simple as subtracting 30000000, or similar, as it looks like there are some gaps.


(a hint on how to move the camera to point at a particular star would also be nice. I've tried changing the 0,1,2 of the camera poi, but that doesn't appear to do it)

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Liu Ellens
Sebiestor Tribe
Minmatar Republic
#2 - 2013-08-12 04:58:50 UTC
Are you working with ccpwgl? If so, instead of creating a scene with a background, create a chroma keyed one - one with a static color (ccpwgl.createScene(color))

As for mapping back from a screen pixel back to a solar system ID, you'll need a "pick" algorithm. The StarMap demo from ccpwgl has everything set up. This demo then also includes a "lookAt" method, although with the version in SCM it doesn't work as a call to TWEEN.update() is missing in the render callback.

Apart from the PNG issue, I believe all your answers are in the starmap.html demo.

Well, they oughta know what to do with them hogs out there for shure.

Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#3 - 2013-08-12 09:29:30 UTC
Liu Ellens wrote:
Are you working with ccpwgl? If so, instead of creating a scene with a background, create a chroma keyed one - one with a static color (ccpwgl.createScene(color))

As for mapping back from a screen pixel back to a solar system ID, you'll need a "pick" algorithm. The StarMap demo from ccpwgl has everything set up. This demo then also includes a "lookAt" method, although with the version in SCM it doesn't work as a call to TWEEN.update() is missing in the render callback.

Apart from the PNG issue, I believe all your answers are in the starmap.html demo.




I've been playing with that one, which is what set this all off for me Smile

Thanks a bundle for the createScene tip. That set it up perfectly.

The pixel I was referring to was the png pixel, rather than the on screen one. As far as I understand the system, you arrange the color and the magnitude of each star, by the color and the alpha of a particular pixel in the png that you hand to the code with sm.SetDataSet. That's the mapping I'm most curious about.

Once I know that, displaying data via the starmap becomes a lot easier (throw in a little more javascript to the canvas.addEventListener and display of data becomes easy)

https://www.fuzzwork.co.uk/webgl/demos/star.html

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#4 - 2013-08-12 10:57:22 UTC
Woo!

Now I've got it all working the way I want. Except for the png formatting bits, at least.

Click on a star, get the star name (using my handy dandy map api)

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#5 - 2013-08-12 14:21:26 UTC
Well, with some poking around in the data, I've pulled a working mapping from it.

However, there are some stars which appear more than once. Such as Otosela. And that's multiple times on the map, in slightly different positions, rather than just the mapping table.

Looks like this star map isn't complete.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter