Awesome, ship it! When is the next release?
I’m not asking for another feature on this one. Is it possible to update arbitrary parts of the texture/normal/height bitmap(s) on every frame render?
https://www.babylonjs-playground.com/#JKRLKH#6
different texturing densities
I see the updating of vertex u, v coords and the updating of vertex colors, this is awesome. And I’m very excited to have this feature, intend to use it heavily.
On a tangent from the original topic, what I’m wondering is if it’s also possible to dynamically generate the pixels in the texture bitmap via a Uint8Array, or something similar, ie dynamically changing pixel values at specific u, v coordinates.
From a procedural generation perspective, what I’m struggling to get my head around is whether it’s better to dynamically generate vertex colors, vertex positions, and vertex normals. This approach is definitely simple and flexible, but at the cost of memory, getting a good result requires using high poly meshes. I don’t think this is a big problem.
In order to save memory, one could rely on the vertex u,v coordinates indexing into displacement textures, normal/bump textures, and color textures. But I’m not sure it makes sense to modify these textures at runtime via the ArrayBuffer concepts like Uint8Array. The complexity definitely increases with this approach as well, probably more than my tiny brain can handle. There would also be mip mapping/antialiasing concerns. Forgive me thinking out loud, just trying to make sure I’m not missing anything.
I could well be not understanding what you want to attempt. My first off the top of my head thought was dynamicTextures which as it is a canvas you can update pixels. My second thought was that shaders could be better which led to procedural textures.
Not sure if they are any good for you but probably worth a look.
@JohnK
That’s exactly what I was looking for, thanks!
I’ve done shaders before, and found they drain the battery really fast for noise w/ many octaves. DynamicTextures look perfect for my needs. Render the texture once, as needed, rather than every frame on the gpu.
https://www.babylonjs-playground.com/#JKRLKH#7
https://www.babylonjs-playground.com/#JKRLKH#8
https://www.babylonjs-playground.com/#JKRLKH#9
vertical alpha variation + facet depth sort
https://www.babylonjs-playground.com/#JKRLKH#10
https://www.babylonjs-playground.com/#JKRLKH#11
https://www.babylonjs-playground.com/#JKRLKH#12
@jerome , very nice!
One thing I’m starting to realize, anti-aliasing will be something I’ll have to wrestle with. Think it’s doable based off of camera distance from the vertex position, combined w/ some s-surves.
no idea as I don’t know how antialiasing works
https://www.babylonjs-playground.com/#JKRLKH#13
[EDIT] different sections https://www.babylonjs-playground.com/#JKRLKH#14
swapping u and v : https://www.babylonjs-playground.com/#JKRLKH#15
animated : https://www.babylonjs-playground.com/#JKRLKH#16
documented (please wait for the documentation build process)
and here are 100 dancing glow-worms : https://www.babylonjs-playground.com/#1X7SUN#13
Thanks @jerome!
and if you displace the vertices according to the UV u value, you get 2 spheres from one : https://www.babylonjs-playground.com/#JKRLKH#17
or funny shapes :
https://www.babylonjs-playground.com/#JKRLKH#18
https://www.babylonjs-playground.com/#JKRLKH#19
https://www.babylonjs-playground.com/#JKRLKH#20
https://www.babylonjs-playground.com/#JKRLKH#21
https://www.babylonjs-playground.com/#JKRLKH#22 yes, this is a sphere
https://www.babylonjs-playground.com/#JKRLKH#23
https://www.babylonjs-playground.com/#JKRLKH#24
endless fun
https://www.babylonjs-playground.com/#JKRLKH#25
https://www.babylonjs-playground.com/#JKRLKH#26
https://www.babylonjs-playground.com/#JKRLKH#27
https://www.babylonjs-playground.com/#JKRLKH#28
https://www.babylonjs-playground.com/#JKRLKH#29
What lives in this shell? Babylon.js Playground
beautiful
Thank you for the changes that gives this opportunity to play.
Shell variations https://www.babylonjs-playground.com/#WVQV0M#1
can’t stop playing
https://www.babylonjs-playground.com/#WVQV0M#5
no need for double sided model imho
inverting the texturing on some parts :
https://www.babylonjs-playground.com/#JKRLKH#30
https://www.babylonjs-playground.com/#JKRLKH#31
https://www.babylonjs-playground.com/#JKRLKH#33
animated https://www.babylonjs-playground.com/#JKRLKH#34
sphere instead icosphere : https://www.babylonjs-playground.com/#JKRLKH#35
https://www.babylonjs-playground.com/#JKRLKH#36
with displacement : https://www.babylonjs-playground.com/#JKRLKH#37
https://www.babylonjs-playground.com/#JKRLKH#38
https://www.babylonjs-playground.com/#JKRLKH#39
https://www.babylonjs-playground.com/#JKRLKH#40
https://www.babylonjs-playground.com/#JKRLKH#41
https://www.babylonjs-playground.com/#JKRLKH#42
That displacement option will be very very useful.