mini rant something I'm working on put me on collision course with Collada ! dear god it's effing awful.... who ever created it didn't know anything about 3d models and didn't know anything about xml absolute dogs dinner of a format. Think they looked @ obj and though yeah we can do worse than that . Interleaved face indexing who the fuck does that (oh yeah obj) !!!! And if you have a polygon word of advice the first thing you'll want to know is how many sides it's got! And sometimes you don't want to lose your triangulation or sometimes you want triangles with their edge visibility nope the only option is all tris with all edges visible or polygons and on the fly retriangulation hoping that it comes out the way the creator intended.
Is it not structured roughly like fbx? I.e unintuitive but actually fine once you've dragged your balls across all the broken glass. I've only ever mucked around with injecting material data into collada and honestly can't remember
Are we talking about Collada or gltf? Because the former hasn't been touched in ages. Gltf is seeing much more widespread use, have you looked at it? It's Khronos Group's much more recent format, intended to be 'the jpg for 3d', in terms of ubiquitous support in browsers, asset stores (Sketchfab etc)...
I have no idea how it's written and have no intention of finding out I'll just go looking for a lib that will provide me with a string of bytes if I give it a file name. I just found it mildly amusing that it was being compared to a format, that in max requires 65 code files @ about 850k in size to implement
Are we talking about Collada or gltf? Because the former hasn't been touched in ages. Gltf is seeing much more widespread use, have you looked at it? It's Khronos Group's much more recent format, intended to be 'the jpg for 3d', in terms of ubiquitous support in browsers, asset stores (Sketchfab etc)...
that was collada - as in the original
gltf looks like a good way forward to me - it'll be interesting to see if it actually gets adopted or if fbx will steamroller it like everything else though.
fwiw and imo.. fbx hasn't beaten everything else because it's better, it's beaten everything else because there is a de-facto 'correct' set of libraries from autodesk for reading and writing the files. Ugly as the fbx SDK is - it forces consistent behaviour - which you don't get when every DCC implements the import/export process independently.
Blender's FBX tooling is a good illustration of that - it can't use the autodesk SDK and as a result has been flaky as hell for years.
A decent number of us are old enough to remember what things were like before FBX stabilised - I dont miss those days at all
ran into some odd "clumping" on my distribute along spline stuff.... turns out I was running foul of the too tight a curve on the inside of the spline thang resulting in some overlap.... wrote a nice little routine to correct for it (culls the least significant points involved in any overlap) before... after.... the axis helpers show whats been culled then the points are generated between the remaining points (the wireframe is a loft of the spline with the same dimensions to illustrate the overlap but has nothing to do with the point generation )
I've been mucking round in Godot lately trying to get some nice npr/toon shading stuff going and I got upset with reflections because they look smooth and realistic and boring.
I don't want smooth and realistic and boring, I want my reflections to look like they're toon shaded as well.
so..
To get toon lighting you posterize the result of your lighting calculations. The obvious answer to this would be to do the same thing to your reflections. sadly though, Godot does not let you get at the reflection calculations (neither do most engines afaik) so you must build your own.
Sampling a cubemap is simple enough so no problem there but then you're kinda knackered. Making a nice toon style cubemap or posterizing a normal looking one kinda work but cubemaps exhibit a wide range of nasty artefacting (filtering/texel density etc.) and I don't like nasty artefacting. Throwing resolution at the problem kinda works but not really
so - I became sad and angry
But then I realised that if I posterized the vector used to sample the cubemap I'd get what I want. This isn't a 1 size fits all solution, but it works very well for what I'm trying to achieve.
it's really simple too - just calculate the vector as normal then floor( (v * levels) / levels) before sampling the cubemap texture
This is a bit "nerdy" I added some custom attribute handling to my max com server so I could attach values to objects so I could change those values with out having to recompile the prototyping utility client app all the time to see the effect.
so the client app grabs the spline and the attached custom attributes... generates the random points and normal then sends them back to max in the form of a point emitter which drives the meshing object creating the leaves..... the custom attributes on the spline are as so and I'm just pressing the create points button which is calling shelllaunch on the client Though I have some good tools for updating plugins on the fly prototyping shit this way is really much quicker as once it's up and running max is relatively incidental in the process and it's much easier to debug as it's not having to deal with max and if the client crashes max is oblivious Boy that escalated quickly! though I had a epiphany.... in that as the points and their normals can depend on the state of the previous point along the spline or share the same point but have a different orientation you have to create a pre stage "discrete points" then you can generate a lookup list of all the possible options e.g. point 10 radial segment 3. You then randomize this list and your new random point is just looked up from the next point on the list. not a big fan of lots of dialog options and a gazillion sliders..... it's a pain that you need to change any effect over the length of the spline so you need a start and end setting
got a hx370 based minipc found bug in my shader editor fixed it went upstairs and implemented a glsl version of (slightly wonky) UVs along a quadratic bezier curve I did in substance a while back.
think I've finally found the droids I was looking for Well that and my own stupidity! In some circumstances you need another vector or things will never align the way you want.
spline aligned.... world aligned I added another point parameter to my emitter objects that could store a direction vector so I could have more control over object orientation using them for instancing points. The time I spent flogging a dead horse... the shame
created a modifier so a ray generator could spawn other ray generators..... the spawn radius being increase from 1 to 20 then randomizing the base object... net result mutant bushes
created a new modifier plugin that uses a vector field that manipulates an "emitters" normals..... pretty basic vector field with just a falloff power... you can add any number of the direction vectors to the field (they are just max helpers). even though I've been working on this for ages i'm still surprised by the "wacked" geometry it produces !
added a constrain to gizmo option (some interesting maths to solve it) so the field can be moved "as one"..... unfortunate this led to some dreadful flicker in the modifier ui I was going to show the code solution but it's a waste of time struggling with the nutty formatting on here!
had a go at creating mapping gaussian blur.... obviously gets progressively slow as the window size increases and it goes up in steps on regular geometry which is to be expected
a bit of pre Christmas "fluff" custom toolbar/palette window more in keeping with general look of the interface (it uses the user settings for bg, hilite and shadows etc) as the default system can look a little clashing
I also "stole" photoshop transparent during drag and beveled corners and in a dark theme.... working in max..... it's not without some weirdness, if you close max with the window open.... the window reverts to a "normal" window for half a second so you have to register NOTIFY_SYSTEM_SHUTDOWN handler to close it before shutdown and hide the magic! Also max does something that stops the window transparency on drag..... It will work on the first mouse down but something then kills it
Replies
(there's no bong cos I don't have the right fonts installed)
I wasn't seeing that flickering on ghostty - I think I need to add double-buffering
i call this game "shit flappy bird"
I'm trying really hard to not get sidetracked and render a spinning cube btw
Interleaved face indexing who the fuck does that (oh yeah obj) !!!! And if you have a polygon word of advice the first thing you'll want to know is how many sides it's got! And sometimes you don't want to lose your triangulation or sometimes you want triangles with their edge visibility nope the only option is all tris with all edges visible or polygons and on the fly retriangulation hoping that it comes out the way the creator intended.
I've only ever mucked around with injecting material data into collada and honestly can't remember
can't imagine why the format hasn't caught on ...
But it’s designed specifically to be runtime friendly. Meshes are always triangulated, etc.
People use it for interop, because it’s so well documented, but that’s just a secondary market for the format.
as a tag line all that says to me is "don't bother just look for a third party implementation"
I have no idea how it's written and have no intention of finding out I'll just go looking for a lib that will provide me with a string of bytes if I give it a file name.
I just found it mildly amusing that it was being compared to a format, that in max requires 65 code files @ about 850k in size to implement
gltf looks like a good way forward to me - it'll be interesting to see if it actually gets adopted or if fbx will steamroller it like everything else though.
fwiw and imo..
fbx hasn't beaten everything else because it's better, it's beaten everything else because there is a de-facto 'correct' set of libraries from autodesk for reading and writing the files.
Ugly as the fbx SDK is - it forces consistent behaviour - which you don't get when every DCC implements the import/export process independently.
Blender's FBX tooling is a good illustration of that - it can't use the autodesk SDK and as a result has been flaky as hell for years.
A decent number of us are old enough to remember what things were like before FBX stabilised - I dont miss those days at all
before...
after....
the axis helpers show whats been culled then the points are generated between the remaining points
(the wireframe is a loft of the spline with the same dimensions to illustrate the overlap but has nothing to do with the point generation
I don't want smooth and realistic and boring, I want my reflections to look like they're toon shaded as well.
so..
To get toon lighting you posterize the result of your lighting calculations. The obvious answer to this would be to do the same thing to your reflections.
sadly though, Godot does not let you get at the reflection calculations (neither do most engines afaik) so you must build your own.
Sampling a cubemap is simple enough so no problem there but then you're kinda knackered.
Making a nice toon style cubemap or posterizing a normal looking one kinda work but cubemaps exhibit a wide range of nasty artefacting (filtering/texel density etc.) and I don't like nasty artefacting.
Throwing resolution at the problem kinda works but not really
so - I became sad and angry
But then I realised that if I posterized the vector used to sample the cubemap I'd get what I want.
This isn't a 1 size fits all solution, but it works very well for what I'm trying to achieve.
it's really simple too - just calculate the vector as normal then floor( (v * levels) / levels) before sampling the cubemap texture
so the client app grabs the spline and the attached custom attributes... generates the random points and normal then sends them back to max in the form of a point emitter which drives the meshing object creating the leaves.....
the custom attributes on the spline are as so and I'm just pressing the create points button which is calling shelllaunch on the client
Boy that escalated quickly!
though I had a epiphany.... in that as the points and their normals can depend on the state of the previous point along the spline or share the same point but have a different orientation you have to create a pre stage "discrete points" then you can generate a lookup list of all the possible options e.g. point 10 radial segment 3. You then randomize this list and your new random point is just looked up from the next point on the list.
not a big fan of lots of dialog options and a gazillion sliders..... it's a pain that you need to change any effect over the length of the spline so you need a start and end setting
found bug in my shader editor
fixed it
went upstairs and implemented a glsl version of (slightly wonky) UVs along a quadratic bezier curve I did in substance a while back
spline aligned....
world aligned
I added another point parameter to my emitter objects that could store a direction vector so I could have more control over object orientation using
them for instancing points. The time I spent flogging a dead horse... the shame
net result mutant bushes
you can add any number of the direction vectors to the field (they are just max helpers).
even though I've been working on this for ages i'm still surprised by the "wacked" geometry it produces !
unfortunate this led to some dreadful flicker in the modifier ui
I was going to show the code solution but it's a waste of time struggling with the nutty formatting on here!
obviously gets progressively slow as the window size increases
and it goes up in steps on regular geometry which is to be expected
I also "stole" photoshop transparent during drag and beveled corners
and in a dark theme....
working in max.....
it's not without some weirdness, if you close max with the window open.... the window reverts to a "normal" window for half a second so you have to register NOTIFY_SYSTEM_SHUTDOWN handler to close it before shutdown and hide the magic! Also max does something that stops the window transparency on drag..... It will work on the first mouse down but something then kills it