The Leftover Posted January 24, 2018 Share Posted January 24, 2018 I am working a brand new application. Not a game. I am pushing Babylon in ways that may be unique. I could really use some advice on high mesh-count situations. Please! Here is the deal. I generate graphics about crime data on SVG. WebGL can look a lot better but it is still kinda balky. The first two images are Attempted Murder in San Francisco for the past three years. What you cannot see in those images but can see in the next two (aggravated assault) is that the whole city is tiled in hexagons. About 40K for San Francisco, more for Chicago. All results are delivered by presenting color, opacity (and now elevation) in hexes. Image 5 shows increases and decreases of theft from Motor Vehicle between two six-month periods. Right now, I create a scene as follows: ~ Generate individual meshes to correspond with all "visible" hexes ~ Pattern-match materials and merge the hexes down from 30K meshes to about 200. ~ Dispose of the unmerged meshes ~ Show the scene ~ Gradually dispose of the meshes These unused meshes are consuming a lot of time. Especially since, except for a handful that are not merged, none of them are shown to the user! It would be conceptually far more ideal to create the hexagonal geometries and group them directly rather than creating meshes. I lack the chops to do it but am reasonably sure it is possible. I welcome advice, snippets or . . . consulting offers? JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
The Leftover Posted January 24, 2018 Author Share Posted January 24, 2018 Uh. Further note on the rules: I realize I have not boiled this down to a code sample on the playground . . . or anywhere. This may be too vague. I will try another cut. I can express what I want in (30K++) individual meshes. I can merge those meshes down to fewer than 300. When they are merged and the temporary meshes are disposed, then performance is pretty damn good and the presentation is too. However, the current implementation takes far longer than is acceptable for my target audience; they hit a button and should see a graph after a bit. The supposition behind post this is that I am taking the long way 'round. I can further optimize creation, merging and disposal in the existing process . . . but I suspect that my core folly is that I am creating scads of full-fledged meshes, used only for their geometry. For example, if there was a way to generate arrays for the Positions and Normals and Kinds without creating the Meshes themselves, that would streamline things immensely. Anyway, that's all I got. Quote Link to comment Share on other sites More sharing options...
JohnK Posted January 25, 2018 Share Posted January 25, 2018 Have you had a look at SPS it might be one way of doing it. JackFalcon and The Leftover 2 Quote Link to comment Share on other sites More sharing options...
The Leftover Posted January 25, 2018 Author Share Posted January 25, 2018 JohnK that is a promising-looking lead! I shall try it out. Thank you. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 25, 2018 Share Posted January 25, 2018 a custom shader could handle this as well. Quote Link to comment Share on other sites More sharing options...
The Leftover Posted January 26, 2018 Author Share Posted January 26, 2018 JohnK, that was great! As Mikey (Trainspotting) would have said, SPS is "custom f**king designed for your needs." Let me know where to send the check . . . JohnK 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 26, 2018 Share Posted January 26, 2018 LOL Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.