Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Cory McG

Pages: 1 2 [3] 4 5 ... 24
31
Hmm... Maybe value times 16, floor, to get which Division it is. Modulo this by five
Then, divide the Division by 5 and floor to get which Set it is. 0, 1, or 2. Multiply this by 16.
Add Set to Modulo result, should give you one of these values, which then can be divided by 64, maybe? To get a number less than 1.

Then in the shader you might have to remember to multiply the read value by 64, and probably do some rounding there, too.

32
If the needed values are evenly spaced between 1/16 and 16/16, it would be pretty simple with pixel processor. Sample the input image with Sampler Greyscale, multiply the result by 16, and use a rounding function (floor or ceil, for example), then divide by 16 again and set that divide as the output.

33
Substance DesignerSubstance Designer - Discussions - Re: Function problem
 on: July 30, 2017, 11:14:07 pm 
Actually, pos to Sampler should work... So I think you have a Get Float node when you should be using a Get Float 2 node (since pos is a 2 dimensional vector variable, not 1 dimensional)

34
One trick that can also help, possibly, is to change the pixel size setting in Base Parameters of a Distance node. This affects how distance is calculated, which can give a good, tilable cells-like result with long shapes instead of round.

Combining this with a seed image made up of lines instead of dots can give you lots of control over the shape of the bits, as well. Just another option if the other technique previously mentioned doesn't quite get you there.

35
My opinion is that you're probably safe... If I come across a substance and I want to know how it's made, but it's an .SBSAR, I've never even considered trying to hack into it... I just look for a similar .SBS made by someone who's okay with letting other people learn from their experience, and look at that instead.

36
I've been playing with this a bit, and it seems trickier than I expected. My approach has been to feed the gradient into a Levels node, since your problem is that each dot is moving up just a bit more than the last, linearly, which makes it just look squashed. The levels, I thought, should give us enough control to give it the right sort of curve.
Well, the problem that that brings is that the tiles tend to wrap up over the top and get in a big mess at the bottom again. The best I've come up with so far is to have the size Y set to 0.5, displacement set to 0.5 pointing down, with the levels making the gradient just a tiny bit darker. It fills the bottom half of the image only, so I have to stretch the result with Transform.
Not completely elegant, since stretching is involved, but it might be at least a starting point for you.

37
This is an excellent sort of pattern to build in SD. There's a number of steps involved in something like this, from what I can see, but the first is to make a mask for one of the panels. I'd separate it into horizontal wood and vertical, and generate a pattern with either tile generators or with blends with the crop settings set carefully to get the horizontal pieces on the bottom (maybe interpret black as h, white as v)

the height mask could be generated by a shape generator, set to Brick, and made more interesting through a greyscale Gradient Map. Then these both could go through a Tile Generator or Tile Random, with whichever you use cloned to generate a version with just blank squares and random luminosity, and another with the heightmask reproduced the same way.

Then you'll have to make (or download from Substance Share) a nice wood grain substance. Offset it using Directional Warp, controlled by the random luminosity tile generator, make another like it, but rotated 90 degrees first, and blend them together using the black and white "h vs v" mask.

38
I've seen some excellent examples of buildings made in SD (there is at least one example on Substance Share... called Night Life, or something, I think). The general shapes and properties can be easily made and placed on distant cubes to give the impressions needed.

I don't think it's the right tool for terrain... Ground materials can be done, certainly, but the resolution an actual terrain asset would need makes using actual maps for it impractical. Most game engines use splat-maps, where several terrains mix together based on an overall splat image, so the terrain has random variation, but still has close-up details.

Even for just simple, distant mountain assets, I think SD isn't well-suited. I'd be more inclined to use photographic or hand-painted textures on planes or simple geometry. Procedural generation is more suited to times when you want to mimic the world, whereas building set pieces, so to speak, is much more of an illustrative task, and so should be approached with an illustrative technique.

39
One thing that SD is most useful for is creating dynamic (changing) materials. For each project, you can set up in Designer the types of materials you'll need, made in the art style you want, and have them react realistically/believably to the mesh (done through baking maps like Curvature, AO, World Space Normals, and that sort). You can also set up user-specified parameters that will be exposed, such as age, paint color, wear-and-tear, dirtiness... And then pass these over to painter, and combine them all as appropriate on your mesh.

I'll describe an example. You're building a construction site, and you want it all to look like it belongs in the same universe. So you make a material for metal, rebar (rusty colored, with a particular pattern of indents), concrete, gravel, a paint overlay, rubber, and wood. Then you model/sculpt building foundations (half made, with rebar poking out), a wheelbarrel, a shovel, cement blocks, slabs, etc.

For the wheelbarrel, you'd put that into Painter, with your custom Materials, and bake some mesh data maps. Set it as your custom metal material, with the Age parameter that you made set pretty high, because you want that rust to show through, set the Wear reasonably high so the parts that curve outwards will be less glossy and show scuff-marks, set the dirt very high (it's been used all day, after all), and all the cracks will fill with dirt.
The next layer will be paint, set to be colored dark red, and flaking off to the point of almost not being there anymore. These are also custom settings that you'd set up earlier.
Paint on wooden handles, and paint the tire rubber. Maybe even plastic hand grips... Same as before, these materials can all be customized and mesh-reactive, so the slots in the tire might fill up with dirt, plastic grips might be less glossy where they can expect to be roughed up (where the AO map detects no occlusion at all, for example), and colors can be customized.

In the end, maps can be baked and put into the engine of your choice like with any other workflow. That's how I do it... although many engines can use substance files directly, and make the maps on-the-fly, for dynamic choices selected by the level designers, in-engine code, or players.

And later on, if someone contacts you with a job, and they want you to texture a series of freight ships with different colors of paint, levels of wear, etc... well, you already have some materials owned by you, lined up and ready for your next job!

40
Does using variable/float2 and setting it to size and then feeding it into a Cast/Int2 node work?

41
I was puzzled by Vincent's description for a while until I looked at the transform for myself. There's a bit of a typo. He means change the "MIPmap mode" property of Transform2d to Manual, not "Bitmap mode". And then set the "Mipmap Level" to the size of your graph. (so, a 1024x1024 [2^10] graph would use a level of 10)

42
I would use Directional Warp with the strength of the warp controlled by a Tile Generator generated map made with full random luminosity setting.

43
If I understand what you mean by depth buffer, yes. With the Max blending mode, the height map behaves just like a depth buffer in a 3d rendering environment, culling the parts of the shapes that are 'behind' (of a lower screen value).

This sort of blending, and using the height map as a mask for blending colors, are both useful techniques.

And you're probably right that he wouldn't mind, but I am more comfortable talking about it generally just out of respect to him and his art. I hope you don't mind. I don't think much would be gained by further analysis anyway, since the next step would be trying to imitate his results myself and reporting back.

I agree that the tile sampler is being put to excellent use here, and I ought to pay more attention to it than I have so far.

44
That is indeed a beautiful material. Better than what I'm usually able to come up with (or patient enough to come up with). I wouldn't want to get too specific about the process without the artist's permission, but the technique looks fine to share. It seems to me like a masterfully handled version of a pretty common workflow. 

My guess is that the majority of the work is handled by a Tile Sampler, near the bottom of his graph, which brilliantly allows the blades size and orientation to be laid out in groups, rather than completely randomly. All the splatters seem to be fed with something like perlin noise or clouds, and this results in the height map.
This brings me to your photoshop question, actually. I've used photoshop in conjunction with SD before. It's a good way to get custom heightmap shapes. Building a substance from a heightmap is a very convenient method if the object is complex or organic. If you like to use SBSAR files in games directly in-engine, though, this will lead to much larger file sizes. I output my graphs as pngs, so this isn't a concern for me in my workflow.

So once I have the height map, I would usually send this to a Gradient Map node. This material does this separately with each type of material, and blends the results at various stages using the sparser heightmap, to get different base colors in there. Then other colors can be added in on top.

An important aspect of many stylized materials is highlighted edges. Edges can be found by generating a normal map, using Curvature or Curvature Smooth (I never remember which is best for what) and adjusting levels. Use this as a mask for blending in a lighter color or a level'ed version of your color map so far.

AO is usually important, too, visually. Again, this can be done with an AO node and blending with a flat color or a leveled copy. It can help to overlay some colorful perlin-noise-like-noise to break up the monotony, sometimes, if it's subtle.

As an extra bit of style, this graph looks like it screens in some light blurring. This is good for making images softer, and in this case, dreamier. It's possibly done with non-linear blur, using it's own brightness as the control, and then blended with the unblurred version with screen or lighten.

45
I get it now. So my original thought was that you could use black, silver, grey, and white as your input colors for Multi Material Blend, but I know it can be a bit fussy with values that don't quite match. I wouldn't go as far as using Pixel Processor though... A series of Material Blends (not multi) run with a series of Histogram Scans should do everything you need.

Pages: 1 2 [3] 4 5 ... 24