3DWorld
msdfgen
Our great sponsors
3DWorld | msdfgen | |
---|---|---|
54 | 27 | |
1,062 | 3,699 | |
- | - | |
9.9 | 6.5 | |
7 days ago | 8 days ago | |
C++ | C++ | |
GNU General Public License v3.0 only | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
3DWorld
-
Generating Master of Orion 2 like starmap
You mean you want to draw the individual stars themselves? It's likely just a texture, probably white so that it can be colored differently for each star. This is how I've done it. Try a Google image search for "flare texture". You can find some of the ones I used here (flare*.jpg): https://github.com/fegennari/3DWorld/tree/master/textures
-
Map Generation by Diamond Square with Shading and Raycasted Shadows.
I remember it being called "wave surfing", where you start at the current pixel and draw a line to the light source, checking the elevation vs. the altitude value of the line (Y or Z) at every step. I have the code in my mesh_shadow_gen class here: https://github.com/fegennari/3DWorld/blob/master/src/visibility.cpp
-
How to manage a buffer containing objects of varying size? For sparse chunk loading/unloading
This all sounds complex, but the system can be made to work well. I've written something similar myself, except with VBOs rather than SSBOs. My code can be found in these two files: https://github.com/fegennari/3DWorld/blob/master/src/buildings.h
-
Procedurally Generated Spider Model and Animation
C++ code for drawing spiders can be found in my GitHub project, in the spider_draw_t class: https://github.com/fegennari/3DWorld/blob/master/src/building_animal_draw.cpp
-
Procedurally generated 8km Octree Terrain using Compute Shaders and WGPU (Rust)
Filling the cracks properly generally gives better performance and fewer drawing artifacts compared to skirts. If you use indexed triangles and set them up in neat rows and columns, it's pretty easy to get right. No lookup tables or big switch cases, and it works with any number of LODs. See the crack_ibuf_t code starting around like 1800 here: https://github.com/fegennari/3DWorld/blob/master/src/tiled_mesh.cpp
-
Pixel planets with Pygame and OpenSimplex
I wrote a planet name generator that combines multi-character combinations. It may not do as good as a proper Markov Chain, but may produce names that sound better than your simple approach. If you're interested, the code can be found here: https://github.com/fegennari/3DWorld/blob/master/src/Universe_name.cpp
-
Reusing vertices while using marching cubes/tetrahedra
The code for this is in my voxel_manager::add_triangles_for_voxel() on line 497 here: https://github.com/fegennari/3DWorld/blob/master/src/voxels.cpp
- Memory Management for infinite procedural generation algorithm (please help me I beg)
-
Best approach to render a lot of text.
Thanks. Yes, I was looking at this. The problem is that the texture atlases are in a different format than the ones I currently use. The MSDF versions don't have all of the ASCII characters and some characters have a different number of pixels. So it's not a drop in replacement for my system, which is using texture atlases like this: https://github.com/fegennari/3DWorld/blob/master/textures/atlas/text_atlas.png
-
Rigid Body Physics with rotation question
I have some code for this here, but it's part of a large project and not easy to read/understand: https://github.com/fegennari/3DWorld/blob/master/src/free_obj.cpp
msdfgen
-
Shader Park Is Kinda Neat
This very well explained here https://github.com/Chlumsky/msdfgen and with more details in link d pdf.
Basically, signed distance fields allow high resolution renders from low resolution rasters which represent character shape.
-
SDF font rendering & cuttoff parameter value
No idea how to help you but I will just drop this since it improved the quality for me by 1000 https://github.com/Chlumsky/msdfgen
-
Best approach to render a lot of text.
And that's the complicated state of the art version for 3D perspective. Other versions are even simpler.
-
Leveraging Rust and the GPU to render user interfaces at 120 FPS
This is known as a “multi-channel signed distance field”, or “msdf”.
https://github.com/Chlumsky/msdfgen
-
Font question: What software do you use to create "Signed Distance Field" from OTF or TTF?
I use this, free and has been very good for me https://github.com/Chlumsky/msdfgen
- MelonJS – a fresh and lightweight JavaScript game engine
- What is the maximum number of texture2D's I can have in a single texture array uniform binding?
-
Why are SDF editors not more popular for creating assets?
Distance fields are not slow to render. They don't need a powerful gpu. Valve was already using SDF for textures in 2007 and released a paper about it. MSDF (multi channel signed distance fields) is a popular text libraries for game engine devs that uses distance fields. Distance fields are fast to render in 2D and even 3D. The problem is with everything around it. Lighting, shadows, shading will all require specialized tooling and likely a specialized engine for very little benefit (imo).
-
Vector Graphics on GPU
Signed distance fields only work well for relatively simple characters.
If you have highly detailed characters like Chinese or emojis, you need larger resolution to faithfully represent every detail. One way to get around excessive memory requirements is to store the characters in their default vector forms and only render the required characters on demand, but then you might as well render them at the required pixel resolution and do away with the additional complexity of SDF rendering.
SDFs are still useful though if you have to render text at many different resolutions, for example on signs in computer games, as seen in the original paper https://steamcdn-a.akamaihd.net/apps/valve/2007/SIGGRAPH2007...
In the past, SDFs also had problems with sharp corners, which has been solved in https://github.com/Chlumsky/msdfgen
-
Adventures in Text Rendering: Kerning and Glyph Atlases
MSDFGen looks pretty sweet. https://github.com/Chlumsky/msdfgen
What are some alternatives?
tinygltf - Header only C++11 tiny glTF 2.0 library
msdf-atlas-gen - MSDF font atlas generator
FastNoise - Fast Portable Noise Library - C# C++ C Java HLSL GLSL JavaScript Rust Go
8SSEDT - Tutorial about 8-points Signed Sequential Euclidean Distance Transform
single_file_libs - List of single-file C/C++ libraries.
vello - An experimental GPU compute-centric 2D renderer.
MarkovNameGenerator - :black_nib: Markov process-based procedural name and word generator demo
troika - A JavaScript framework for interactive 3D and 2D visualizations
PolyWorld - A world generator that is based on Voronoi diagrams
nanovg - Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.
Cities - Procedural city & road placement
msdfgl - OpenGL implementation of the MSDF algorithm