[[three-js]]
[[3d modeling tools and resources]]
[[Procedural dungeon for rogue like]]
https://www.turbosquid.com/3d-models/low-poly-minotaurs-3d-2081447
So, you:
How do I add the animations to the model? How do I keep the model itself from moving (e.g. make walking animation in place). You are fairly sure this was part of the directions in the video you watched some time ago.
This video is low on information but does demonstrate a free tool called Plask
NOT this video: https://www.youtube.com/watch?v=Iy5m3jFo-EM
Here’s low poly female, not as low poly as the male: https://www.cgtrader.com/free-3d-models/character/woman/lowpoly-female-basemesh
You:
sword and shield walk.fbxScene Collection > Collection > Armature > Armature > mixamorig:Hipsmixamorig:Hips and unchecked X, Y, & Z locationgltf/glblow poly skeleton
https://sketchfab.com/3d-models/low-poly-skeleton-4866bd05df2d4febba463295cd24b564#download
Trying to export bump maps leads to bizarre situations where the walls has transparent parts. You believe that your attempts to export a gltf with a normal map is resulting a normal map with normals facing away from the surface (and so making it see through at that point).
This may be the result of the wrong color space being used?
“super quick bump map” https://www.youtube.com/watch?v=lB2BgBvwfeo Baking texture: https://www.youtube.com/watch?v=Se8GdHptD4A&list=PLsGl9GczcgBvJPh7D_ITafvmTW7ZzQTEr&index=2
https://gltf.report info about gltf file
Ugh you failed to write conclusions, but you did get it working. Maybe see v4.
So, a problem is that not all light will be coming from player or other players/entities. There will be environmental lights. To expensive to compute per-frame.
Typical solution is to bake the lighting. This is a lot of work. Luckily there appears to be something built in to threejs.
But how then do we illuminate characters passing through such a statically lit area? Ugh maybe we need both? Use baked light map to show “seen” areas, use both to show “visible” areas?
Enumerating the problems:
Possible solutions
ProgressiveLightMapSolutions 1 & 2 solve problems 1 & 2 but not problem 3.
Solution 3 solves all problems but is least performant and has a hard-to-predict maximum density (e.g. what happens if you have a long hallway lined with torches)
Might movable objects be rendered in a different pass? E.g.:
Something like that would solve problem 3 for solutions 1 & 2.
Looking at solution 1 (baked light maps). Have not yet got it working. Getting error: ‘WebGL warning: drawElementsInstanced: Texture level 0 would be read by TEXTURE_2D unit 1, but written by framebuffer attachment COLOR_ATTACHMENT0, which would be illegal feedback.’.
Not sure if worth pursuing given inflexibility of this lighting (e.g. can’t turn lights on or off once baked)
A way for solution 2 might be the emissive property on a material. Color could be set to white (or whatever) and intensity set. If material clone is shallow we should be able to reuse the textures and just have, say 32 copies of a material with varying levels of emissive intensity.
Update 2023-07-28
First pass at solution 2 is ugly. Apart from “resolution” of illumination levels, there isn’t a way to cast light on one side of a corner quadrant but not the other.
![[Screenshot_2023-07-28_at_10_55_47_AM.png]]
Adding the floor did not help; Mach band effect is bad.