I've been implementing my own com server for max (going through mxs can be a bit of a faff ) to add addition dev tools anyway it paid dividends straight away helping to get a better algorithm for find what in or not in a polygon not matter what the depth or heirarchy.
now onto how to deal with intersections, my brain hurts!
Wow, that is impressive Klunk. When I first saw some of your posts about this, I was wishing I had an easy way to create something like this for a terrain shader I had developed. The shader mixed materials based on vertex color so certain terrain features would require specific vertex placement to retain material transitions. For example a dirt path would need the vertices along the edges to blend into the terrain nearby, and my only method at the time was painting in subdivisions essentially. When the terrain was a grid, it was too easy to spot the "resolution" even with height blending and soft vertex color changes. This would be awesome to have(if I were in max) becuase I can't trust maya's booleon operations, especially with history. Developing solutions that cause brain pain isn't all bad (in healthy doses). Its just a sign you are pushing your understanding of some very technical processes.
playing around with a different triangulation routine I stumbled upon..... top is the new one, middle is the sweepline (which is what I tend to use though it's not without it's issues) and max's good ol' ear clipping standard bottom. You can get a similar result for the sweepline for the circle if you scale it down in x or y just to resolve the topology but you would need to know this before hand. in conclusion, on what you would normally come across it does a pretty good job the x & c would be a pretty rare occurance in the "wild" that said it does a pretty good job on the c
ear clipping sucks - i've been getting good results using a version of the old triangle library I ported to python but I don't think it would work that well on the circle
Not I , found it in a book.... mathematics for 3d game programming and computer graphics Eric Lengyel page 270 (IIRC he did a method for generating tangent space vectors)
had a bit of a doh! moment and a humble brag I wrote a documentation generator a while back to handle my MXS extension function libraries (i tried DOxygen but never really liked it's output). It basicaly works by using embedded xml snippets describing functions and it arguments but also as documentation within the code too, it the converts the snippets in html. Its then called post build and pipped to HCC compiler. Anyway I recently needed to update it for documentation of the max com server I was working on which is a cpp interface. Anyway to cut a long story short I discovered the wonders of style sheets and the em tag. Everything is just so easy now what the fuck was I thinking !!! It's about 3 times faster a gizillion times less complicated and files are now miniscule! I've included a sample file (though note the colors and fonts are just messing around and one of the font may not display as intended)
working on how my tree generator operates as a point emitter -- how fronds and or leaves are distributed, well partularly how the normal directions are aligned (the position bit is a piece of piss)
had the idea of a wheel like control with regions that turn on and off when on the normals can go in that direction and off they can't.
then it hit me, thats a gradient ramp of sorts with a radial output and actually a gradient could be useful.
cool I've got one of those but it takes up a lot of bloody room and not very intuitive with a radial output
what about an actual radial gradient control much like the gradient ramp, bit more compact....
so off we go, and now I'm working how render "3d" marker stops that work correctly in any direction
least it will look "pretty" how it might look in a max rollout
perhaps a little busy , might be best in it's own dialog
in the above example the emitter normals would be most likely point in the direction where the gradient is whitest when looking end on to a branch (radial angle), the longitudinal angle is pretty simple. the most obvious example would be to make something like....
using something like....
or something like....
with...
have also been considering a "3d ball with cones (think spotligh cones hotspot & fall off)" gizmo one for the start and one for the end think that may get busy too. I do have a working solution already...
just needs tweaking for more specialist cases so to speak.
playing around with a different triangulation routine I stumbled upon..... top is the new one, middle is the sweepline (which is what I tend to use though it's not without it's issues) and max's good ol' ear clipping standard bottom. You can get a similar result for the sweepline for the circle if you scale it down in x or y just to resolve the topology but you would need to know this before hand. in conclusion, on what you would normally come across it does a pretty good job the x & c would be a pretty rare occurance in the "wild" that said it does a pretty good job on the c
This is rly cool! Is it possible to have the top one has a modifier and with the option of only doing quadringulation?
yeah, it's a bezier ease control (it's actually a "double" bezier to give it more of a kick ), same as the one at the top (which is an overall control where as the bottom one is a per stop variant).
on a side note this is quite weird, I'm not sure whats causing it but when adding the gradient with noise as a vertex color angled across a 100 by 100 segment plane you get an odd interference pattern when the octives are 8 or higher. And It only happens when angled.
I don't think it's a "real world" issue anyway it's a pretty unlikely scenario though there not a tool on the planet an artist can't break in short order
been mucking about with a simple stone generator for max
it's basically a geosphere with random clipping planes (the demo object has a mesh smooth with 2 iterations on it plus some box mapping). Anyway the script is attached for anyone who wants to play
interestingly (well to me anyway ) I can randomize scripted plugin objects in my scatter tools.... you can invalidate the mesh using SimpleObject::MeshInvalid(); which forces the mesh to be rebuilt then in the script you change seed rseed to seed (random 0 65535) and voilà a new mesh at every spot
for some applications using my point/ray clouds I need some objects to use all the points and some to use only some of the points. So I created a limiter helper (I would have used a modifier but then it's still up to the caller to decide which to use the mod or the base object and that created some issues). So the limiter just create a point cloud with a percentage of the original point with the ability to bias that pick with the color of the point). And as now all my point clouds are pipeline objects I can use all my vertex shading mods to handle the bias
the above demo wasn't what it was designed to do but is a useful idiot Also I could get a similar result with map based distribution with fractal noise shading
thanks, the maths is really "weird" especially getting the light and view directions for the pixel shader (screen space) and a different light direction for the vertex shader (view space) as the lighting and normals come in two parts.... one for the overall clump of points handled in vertex shader and then each billboard handled in the pixel shader. Tuning the 2 together is a bit hit and miss too
seems like old ground and it is in a way created an Outliner interface to better integrate some of my tools.... basically anything with an "outline" mesh, spline or modifier can be can be used as a "cutter",
a plane in plane
Crawling back to the forums nearly 4 years later since I initially posted the question to re-ask if this had become available for use in the meantime by any chance? The "cut 'n' stitch" dynamic here is just wonderful and would save a lot of manual work. Fingers crossed!
I've been building a little OpenGL shader development environment loosely inspired by shadertoy. notable features: you can use any editor you like (nvim or you're weak) works on linux autoloads saved glsl files supports #includes reports shader compilation errors properly poops out your full shader with line numbers to the console so you can debug the aforementioned errors clicking on a pixel prints the output color as 32f - which is good saves output to a 32bit exr
It's in python 3.12 and untested on windows - I'll likely open it up on github at some point fairly soon here's a really exciting picture of a test shader and some windows with text in...
Edit: didn't think it was worth a new post really but since last time.. rewrote fragment shader construction code added texture includes made sure it works on windows
wrote (i.e stole from IQ) some sdf libraries and mucked around with them (picture below)
There's some quality of life stuff to sort out before I open this up but I'm getting there, mainly I want to make use of all uniforms optional so I can get rid of the filthy hack at the top of main()
found a way to conform the cutter to the surface it's cutting... requires a reference to the surface otherwise you'd end up in "death loop of hell" followed by max going down
useful clean drop in mesh... it requires a pre "normals to map mod" with a post "map to normals" to appear seamless
added an option for a look at constraint node for the projection direction for the conform.... the plane has a path constraint to a circle with a noise on the radius and conformed to the sphere.
Replies
now onto how to deal with intersections, my brain hurts!
When I first saw some of your posts about this, I was wishing I had an easy way to create something like this for a terrain shader I had developed. The shader mixed materials based on vertex color so certain terrain features would require specific vertex placement to retain material transitions. For example a dirt path would need the vertices along the edges to blend into the terrain nearby, and my only method at the time was painting in subdivisions essentially. When the terrain was a grid, it was too easy to spot the "resolution" even with height blending and soft vertex color changes. This would be awesome to have(if I were in max) becuase I can't trust maya's booleon operations, especially with history.
Developing solutions that cause brain pain isn't all bad (in healthy doses). Its just a sign you are pushing your understanding of some very technical processes.
top is the new one, middle is the sweepline (which is what I tend to use though it's not without it's issues) and max's good ol' ear clipping standard bottom. You can get a similar result for the sweepline for the circle if you scale it down in x or y just to resolve the topology but you would need to know this before hand.
in conclusion, on what you would normally come across it does a pretty good job the x & c would be a pretty rare occurance in the "wild" that said it does a pretty good job on the c
what's it called? or did you invent it?
ear clipping sucks - i've been getting good results using a version of the old triangle library I ported to python but I don't think it would work that well on the circle
working on how my tree generator operates as a point emitter -- how fronds and or leaves are distributed, well partularly how the normal directions are aligned (the position bit is a piece of piss)
had the idea of a wheel like control with regions that turn on and off when on the normals can go in that direction and off they can't.
then it hit me, thats a gradient ramp of sorts with a radial output and actually a gradient could be useful.
cool I've got one of those but it takes up a lot of bloody room and not very intuitive with a radial output
what about an actual radial gradient control much like the gradient ramp, bit more compact....
so off we go, and now I'm working how render "3d" marker stops that work correctly in any direction
least it will look "pretty"
how it might look in a max rollout
perhaps a little busy , might be best in it's own dialog
I dont care about the UI - what's the logic as you run up the tree?
the most obvious example would be to make something like....
using something like....
or something like....
with...
have also been considering a "3d ball with cones (think spotligh cones hotspot & fall off)" gizmo one for the start and one for the end think that may get busy too.
I do have a working solution already...
just needs tweaking for more specialist cases so to speak.
this is coming on rather well.
death to speedtree!!
still trying to find ways of improving the middle of the gradient
on a side note this was a fun bit of coding.... radial checker (to show transparency)
a few issues on closed spline with max sdk returning some funky tangent values on corner knots
https://www.youtube.com/watch?v=uM5UJWxy6TM
does it happen at not 45 degree rotation?
I've seen this sort of artefacting before but the exact cause escapes me for the moment
it's basically a geosphere with random clipping planes (the demo object has a mesh smooth with 2 iterations on it plus some box mapping). Anyway the script is attached for anyone who wants to play
seed rseed to seed (random 0 65535)
and voilà a new mesh at every spot
the above demo wasn't what it was designed to do but is a useful idiot Also I could get a similar result with map based distribution
with fractal noise shading
the top and bottom spheres are actual spheres for reference all the others are just quads which in reality looks like...
though enlarged somewhat.
something a bit more subtle...
probably not that subtle without the phong spec....
you could Enumerate the all Windows looking for windows with class "#32770" and title text beginning "Color Selector:..." far too much dull coding
Crawling back to the forums nearly 4 years later since I initially posted the question to re-ask if this had become available for use in the meantime by any chance? The "cut 'n' stitch" dynamic here is just wonderful and would save a lot of manual work. Fingers crossed!
notable features:
you can use any editor you like (nvim or you're weak)
works on linux
autoloads saved glsl files
supports #includes
reports shader compilation errors properly
poops out your full shader with line numbers to the console so you can debug the aforementioned errors
clicking on a pixel prints the output color as 32f - which is good
saves output to a 32bit exr
It's in python 3.12 and untested on windows - I'll likely open it up on github at some point fairly soon
here's a really exciting picture of a test shader and some windows with text in...
Edit:
didn't think it was worth a new post really but since last time..
rewrote fragment shader construction code
added texture includes
made sure it works on windows
wrote (i.e stole from IQ) some sdf libraries and mucked around with them (picture below)
There's some quality of life stuff to sort out before I open this up but I'm getting there, mainly I want to make use of all uniforms optional so I can get rid of the filthy hack at the top of main()
useful clean drop in mesh... it requires a pre "normals to map mod" with a post "map to normals" to appear seamless
combo of the last two....
plane is using a gradient ramp map (radial to box etc) piped through the conform mod
another variation a straight map channel to vdata mod
this is vert color noise (varying the phase) converted to weighted vertex selection and conformed to the sphere