Hi there ! After the detail albedo shader, I finished a new shader : the 'Sticker & Detail Albedo map Shader'.
This shader for TB3 allows to add a sticker on top of an existing material and includes the previous 'detail albedo' module.
I hope you enjoy ! https://www.youtube.com/watch?v=JjzaSo5vkwI
The nodes responsible for interactivity are Viewport Event and Viewport Event Meta. Viewport Event allows you to run any piece of code on mouse move, press, release or modifier press. Viewport Event Meta is there to give you data about your viewport, like the mouse's screen space position, for example it's pretty much a wrapper around dragAttrCtx but beefed up a little.
The rest of the graph is just querying where your mouse currently is in screen space, running a ray intersection to see which face/position your mouse would hit, which is then used to set the position of the object.
For rotation, I'm using Get Components Data, which takes a face or list of faces and their mesh, and returns the position, normal and rotation of that face. Here I'm setting the rotation of my torus with that nod's output.
Execute basically allows you to chain a sequence of operations: in this case we first set the position, then set the rotation
I'm making substance designer do things it wasn't designed for again. For this experiment I decided to encode arrays into images and use those to drive fx maps.
The example given dumps UV coords from an fbx sequentially into a small texture (64x64 in this case) - this bit is python. The fx map uses nested iterators to sample pixels sequentially and position shapes according to whatever is stored .
The only really irritating limitation is that you can't detect input image size in a graph so you have to tell it how big the incoming image is.
If anyone can think of a use for it outside of making non-perlin based distributions I'd love to hear about it.
In Maya I figured out how to layout and stack UV shells based on user grouping. This was the most requested feature people were always asking me for so I'm pretty happy it worked out. At first I thought it was impossible in Mel, but I figured out a hack way to do it.
couldn't sleep so triangulation happened. I tried ear clipping but it's either unsuited for this sort of shape or I implemented it wrong. I fell back to using the triangle module for python which is a binding to a 2d delauney implementation by Jonathan Richard Shewchuk. I'm not 100% happy with every choice it makes but it's pretty good considering it has no information fed into it beyond a list of points.
next job - spend 2 hours digging though the fbx SDK docs trying to work out how to flip those faces - you'll note everything has mirrored since last time...
and now it works mostly properly - everything points in the right direction etc. at least
It wont open the meshes in paint3d for some reason but I don't care yet - might be because im writing ASCII fbx out or possibly just some meta data I haven't bothered adding. They open in max so i assume they'll work in maya .
You can affect how dense the mesh is and affect how much padding is around the shapes but the difference is limited (57tris on the left to 88 on the far right) since the outline generation is pretty minimalist and you can only pad as far as the texture lets you.
Thanks, just copied some code from here and applied it to max's box obj code, the tricky part/ painful bit is porting the sdk 0 based indexing to mxs 1 based indexing and not running out of the room screaming when everything is a spaghettified mess I'll get round to implementing a c++ version sometime.
auto smooth spline for max, turns corner knots into smooth or bezier knots
based on the in out vector angles, you can have balanced (equal length in out) and uniform (same length for all) options and a scaling factor. It was designed as a precursor for the resample plugin where the starting spline is made from mostly corner knots (it still worked but not if you want to maintain specific knots). So i'll be adding it to the resample upload (once i've fixed a couple of bugs in the resampler)
this is a bit whacky, unintended single click bezier creation.... if you have the mod at the top of the stack then create the spline underneath in single click corner fashion....
dunno if it has much application but a bit of fun none the less ;D
I needed to port some shapes back in time to check some issues/bugs in my code in earlier versions of max, couldn't really find a good reliable method with the built in stuff so wrote a quick and dirty scripted xml shape exporter and importer with quite a neat file format if i do say so myself , So it got me thinking, As we've been using photoshops ai exporter and max's ai import to transfer shapes from photoshop to max for a while and it's never been ideal. So I wrote a really dirty javascript xml shape exporter for photoshop. It was easier than i expected.
I've had this in my head as a thought experiment for a while and decided to poke around at it today.
Sooo.. this is a point cloud where the distritbution of detail is driven by what is effectively a curvature map (obviously the z is based off a standard displacement map) . I have all the information I need to generate a mesh already - just couldn't face the idea of arguing with the fbx SDK this evening.
The point of the exercise is to generate more efficient meshes when using textures to displace geometry. This example has 2732 vertices and I think to get the same fidelity from a regular grid you'd need around 42000 (don't quote me on that yet)
I've used a fairly dumb poisson disc method to place the points so it's a little fragile and it's basically impossible to tell whether it's going to be really fast or really slow based on the parameters you feed it but there's enough there to make me think t's worth pursuing.
Some Saturday night fun with GraphN: this is a material picker + object placer that basically samples whatever material under your cursor, and assigns it to the object you're currently moving.
We're just a week away from the beta now, feel free to DM if you're interested in testing! would love to start getting some feedback from y'all.
I can read most of it, I think. It's very tricky the graph goes right to left, that would be hard to get used to since all other graphs in most 3D apps go left to right.
Yeah the arrows indicate the opposite direction, making the graph actually go left to right ^^' we have it on the todo list to flip them before Wednesday, so thanks for stressing this point even more!
Oh cool, so it's just a display bug, yeah it looks really neat that you have get and set material built into a node among other things, that's a lot of code to write to do it in Mel. Also the drag object along surface looks sweet, I haven't learned how to do that in Mel, I've heard you need to write that in the API to use that feature of Maya.
small tool to merge normal maps (see the max composite blend mode above). There's an example of how to use it with a batch file and drag and drop (just edit the dir you put the exe in and you can drop the files to process on the bat file)
I'm making a script in python Maya(still very work in progress) where you can distribute objects based on patterns that have aurea proportion formulas, like the typical spiral, or others like the distribution of seeds in a sunflower. I have to make an interface where you can tweak these parameters and get different results. Here are some images of what you can get:
Replies
After the detail albedo shader, I finished a new shader : the 'Sticker & Detail Albedo map Shader'. This shader for TB3 allows to add a sticker on top of an existing material and includes the previous 'detail albedo' module. I hope you enjoy !
For this experiment I decided to encode arrays into images and use those to drive fx maps.
The example given dumps UV coords from an fbx sequentially into a small texture (64x64 in this case) - this bit is python.
The fx map uses nested iterators to sample pixels sequentially and position shapes according to whatever is stored .
The only really irritating limitation is that you can't detect input image size in a graph so you have to tell it how big the incoming image is.
If anyone can think of a use for it outside of making non-perlin based distributions I'd love to hear about it.
it's pretty configurable in terms of how complex the geometry can be and how much padding you get.
Triangulation is a job for another day - I'll probably go for an ear clipping algorithm unless anyone has any more cunning suggestions
I'm not 100% happy with every choice it makes but it's pretty good considering it has no information fed into it beyond a list of points.
next job - spend 2 hours digging though the fbx SDK docs trying to work out how to flip those faces - you'll note everything has mirrored since last time...
It wont open the meshes in paint3d for some reason but I don't care yet - might be because im writing ASCII fbx out or possibly just some meta data I haven't bothered adding. They open in max so i assume they'll work in maya .
You can affect how dense the mesh is and affect how much padding is around the shapes but the difference is limited (57tris on the left to 88 on the far right) since the outline generation is pretty minimalist and you can only pad as far as the texture lets you.
It needs a UI so I'll give that a poke next.
it basically an mxs version of max box object "morphed" into a sphere
added the "normalized" as a bias on the original script also has the option of flipping the edge to improve edge flow in the sphere
based on the in out vector angles, you can have balanced (equal length in out) and uniform (same length for all) options and a scaling factor. It was designed as a precursor for the resample plugin where the starting spline is made from mostly corner knots (it still worked but not if you want to maintain specific knots). So i'll be adding it to the resample upload (once i've fixed a couple of bugs in the resampler)
dunno if it has much application but a bit of fun none the less ;D
a ps shape
to a max shape....
Sooo.. this is a point cloud where the distritbution of detail is driven by what is effectively a curvature map (obviously the z is based off a standard displacement map) . I have all the information I need to generate a mesh already - just couldn't face the idea of arguing with the fbx SDK this evening.
The point of the exercise is to generate more efficient meshes when using textures to displace geometry. This example has 2732 vertices and I think to get the same fidelity from a regular grid you'd need around 42000 (don't quote me on that yet)
I've used a fairly dumb poisson disc method to place the points so it's a little fragile and it's basically impossible to tell whether it's going to be really fast or really slow based on the parameters you feed it but there's enough there to make me think t's worth pursuing.
Here are some images of what you can get:
though tends to hilite the need for some auto edge turning