Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: Erich on 2024-06-30, 01:23:41

Title: nylon braided cord material?
Post by: Erich on 2024-06-30, 01:23:41
I am wondering what the best way is too create a nylon braided cord material as shown in the attached image. I have been trying to find a texture that I could just wrap around a cylinder, but have no luck finding anything I could use. Is their a way to make this procedurally? Any help would be appreciated.
Title: Re: nylon braided cord material?
Post by: Aram Avetisyan on 2024-06-30, 04:13:38
Spline UV mapping and texture, a pattern will be even better.
Title: Re: nylon braided cord material?
Post by: dj_buckley on 2024-06-30, 07:45:41
Are there any textures here you could adapt to the correct colours https://www.poliigon.com/textures/fabric/braided
Title: Re: nylon braided cord material?
Post by: Erich on 2024-06-30, 08:11:32
Are there any textures here you could adapt to the correct colours https://www.poliigon.com/textures/fabric/braided

Thanks. I don't have a subscription to Poliigon, but I may be able to do something with the "Plain Climbing Cord Texture, Black" Not sure if you can share it if you have it. :)
Title: Re: nylon braided cord material?
Post by: romullus on 2024-06-30, 09:56:30
If you have Substance Designer and/or Painter, i'd suggest to look at SBS/SBSAR files, since you can easily modify them to precisely fit your needs. Here's couple sites with such files, both paid though.

https://substance3d.adobe.com/assets/allassets?assetType=substanceMaterial&q=rope&sort=-searchScore
https://www.textures.com/search?q=rope

Another option would be to make 3D model of the cord and bake needed textures from it for later use in your scenes.
Title: Re: nylon braided cord material?
Post by: Erich on 2024-06-30, 18:56:06
If you have Substance Designer and/or Painter, i'd suggest to look at SBS/SBSAR files, since you can easily modify them to precisely fit your needs. Here's couple sites with such files, both paid though.

https://substance3d.adobe.com/assets/allassets?assetType=substanceMaterial&q=rope&sort=-searchScore
https://www.textures.com/search?q=rope

Another option would be to make 3D model of the cord and bake needed textures from it for later use in your scenes.

I don't have Substance and its not something I have ever used, but thanks anyway.
Title: Re: nylon braided cord material?
Post by: dj_buckley on 2024-07-01, 10:49:57
Are there any textures here you could adapt to the correct colours https://www.poliigon.com/textures/fabric/braided

Thanks. I don't have a subscription to Poliigon, but I may be able to do something with the "Plain Climbing Cord Texture, Black" Not sure if you can share it if you have it. :)

£12 for a month would allow you to download that asset and 3 others.  I do have it, but I ain't risking my own subscription publicly for the sake of a £3 texture.
Title: Re: nylon braided cord material?
Post by: Aram Avetisyan on 2024-07-01, 15:59:28
Here is something quick I did (I missed such stuff).

It is done using pattern modifier. Hope it is good enough for you to get the idea.
The same pattern can be made as a texture as well, which I think is better in this case.
Title: Re: nylon braided cord material?
Post by: Erich on 2024-07-01, 17:31:11
Here is something quick I did (I missed such stuff).

It is done using pattern modifier. Hope it is good enough for you to get the idea.
The same pattern can be made as a texture as well, which I think is better in this case.

Hi Aram. Thanks so much for sharing this! It's incredibly impressive how you achieved this in such a seemingly straightforward way. However, your approach goes a bit over my head at the moment (I'm still a newbie at this.). Would you be willing to break down the process for me in more detail, or perhaps point me towards some tutorials that could help me learn how to do this myself?
Title: Re: nylon braided cord material?
Post by: TomG on 2024-07-01, 18:22:40
https://support.chaos.com/hc/en-us/articles/7713194687633-Corona-Pattern-Modifier-3ds-Max and
, should cover the basics of using Pattern in Max. Hope this helps!
Title: Re: nylon braided cord material?
Post by: Erich on 2024-07-01, 19:03:04
https://support.chaos.com/hc/en-us/articles/7713194687633-Corona-Pattern-Modifier-3ds-Max and
, should cover the basics of using Pattern in Max. Hope this helps!

Thanks Tom. Unfortunately that video doesn't actually explain anything! He just shows what is possible. There is no detailed explanation of how to actually do it.
Title: Re: nylon braided cord material?
Post by: TomG on 2024-07-01, 19:22:18
Yep but the help desk doc goes into detail :)  (There are two links in the post, the second being the video as it is not so useful but does at least let you see when to choose between the various options).
Title: Re: nylon braided cord material?
Post by: Erich on 2024-07-01, 19:42:34
Yep but the help desk doc goes into detail :)  (There are two links in the post, the second being the video as it is not so useful but does at least let you see when to choose between the various options).

Oh, sorry, I missed the link to the help doc. Thanks again! :)
Title: Re: nylon braided cord material?
Post by: Erich on 2024-07-01, 19:56:52
Here is something quick I did (I missed such stuff).

It is done using pattern modifier. Hope it is good enough for you to get the idea.
The same pattern can be made as a texture as well, which I think is better in this case.

Hi Aram. I was looking at your setup and I think I understand most of what you did, except for the box that is in the pattern geometry. what is that used for? Also, for the pattern geometry texture, you are plugging in a gradient ramp into the base aniso, but then the amount given for the Anisotropy in the Corona physical material (Material #37 & 25)= 0. In my mind this should mean that there is no anisotropy. However, I did notice the effect of having it - it adds those subtle gradients, but it just doesn't make sense to me why it has any effect at all if the amount is set to zero in the material. Sorry if this a an obvious point, but I am just trying to understand (as I said, I am a newbie).

Also, I am unsure about what you meant when you said "The same pattern can be made as a texture as well.". How would I go about making the pattern into a texture?
Title: Re: nylon braided cord material?
Post by: TomG on 2024-07-01, 21:05:24
Not had a look at the scene, but the box in the pattern geometry should be the crop box - it cuts out what parts of the geometry will be repeated. When modeling some geometry for a pattern, to ensure everything aligns perfectly, it's usually best to make the pattern geometry larger than you need, that is, it already repeats. Then you cut out the smaller part that represents just one repeat.

On the second item, in Corona if something can be mapped, it either takes its value from the number, OR from the map. If there is a map plugged in, the number is ignored (it does not multiply or add with the map, but gets entirely replaced).

Hope this helps!
Title: Re: nylon braided cord material?
Post by: Erich on 2024-07-01, 21:33:53
Not had a look at the scene, but the box in the pattern geometry should be the crop box - it cuts out what parts of the geometry will be repeated. When modeling some geometry for a pattern, to ensure everything aligns perfectly, it's usually best to make the pattern geometry larger than you need, that is, it already repeats. Then you cut out the smaller part that represents just one repeat.

On the second item, in Corona if something can be mapped, it either takes its value from the number, OR from the map. If there is a map plugged in, the number is ignored (it does not multiply or add with the map, but gets entirely replaced).

Hope this helps!
Thanks Tom. However, I am not sure I understand your second comment or if it address the question I had in regards to Amar's comment about "the same pattern can be made as a texture".
Title: Re: nylon braided cord material?
Post by: TomG on 2024-07-01, 21:41:50
My second part refers to "Also, for the pattern geometry texture, you are plugging in a gradient ramp into the base aniso, but then the amount given for the Anisotropy in the Corona physical material (Material #37 & 25)= 0. In my mind this should mean that there is no anisotropy. "

It doesn't matter if aniso is zero, since it has a mapped plugged in, which means the zero in the material parameters is ignored and values come from the map instead.

As to how it could be generated as a texture, I am leaving that to Aram to explain as I am not sure what he had in mind :)
Title: Re: nylon braided cord material?
Post by: Erich on 2024-07-01, 23:20:35
My second part refers to "Also, for the pattern geometry texture, you are plugging in a gradient ramp into the base aniso, but then the amount given for the Anisotropy in the Corona physical material (Material #37 & 25)= 0. In my mind this should mean that there is no anisotropy. "

It doesn't matter if aniso is zero, since it has a mapped plugged in, which means the zero in the material parameters is ignored and values come from the map instead.

As to how it could be generated as a texture, I am leaving that to Aram to explain as I am not sure what he had in mind :)

Ok, sorry for the misunderstanding. I appreciate the clarification. Thank you. :)
Title: Re: nylon braided cord material?
Post by: Aram Avetisyan on 2024-07-02, 08:21:27
Here is something quick I did (I missed such stuff).

It is done using pattern modifier. Hope it is good enough for you to get the idea.
The same pattern can be made as a texture as well, which I think is better in this case.

Hi Aram. I was looking at your setup and I think I understand most of what you did, except for the box that is in the pattern geometry. what is that used for? Also, for the pattern geometry texture, you are plugging in a gradient ramp into the base aniso, but then the amount given for the Anisotropy in the Corona physical material (Material #37 & 25)= 0. In my mind this should mean that there is no anisotropy. However, I did notice the effect of having it - it adds those subtle gradients, but it just doesn't make sense to me why it has any effect at all if the amount is set to zero in the material. Sorry if this a an obvious point, but I am just trying to understand (as I said, I am a newbie).

Also, I am unsure about what you meant when you said "The same pattern can be made as a texture as well.". How would I go about making the pattern into a texture?

The box in the scene is to fit the pattern node into custom object space. It is a bit more advanced method for defining the crop-box for the pattern.

I don't remember in detail now, but the he anisotrophy amount should be controlled by the texture, that is why the 0 value has no control over it (the effect is present).
If you are aware of the texture baking process, it should be with a projection modifier or even with a simple top view render with more or less detailed textures.
Title: Re: nylon braided cord material?
Post by: Erich on 2024-07-02, 09:22:10
Here is something quick I did (I missed such stuff).

It is done using pattern modifier. Hope it is good enough for you to get the idea.
The same pattern can be made as a texture as well, which I think is better in this case.

Hi Aram. I was looking at your setup and I think I understand most of what you did, except for the box that is in the pattern geometry. what is that used for? Also, for the pattern geometry texture, you are plugging in a gradient ramp into the base aniso, but then the amount given for the Anisotropy in the Corona physical material (Material #37 & 25)= 0. In my mind this should mean that there is no anisotropy. However, I did notice the effect of having it - it adds those subtle gradients, but it just doesn't make sense to me why it has any effect at all if the amount is set to zero in the material. Sorry if this a an obvious point, but I am just trying to understand (as I said, I am a newbie).

Also, I am unsure about what you meant when you said "The same pattern can be made as a texture as well.". How would I go about making the pattern into a texture?

The box in the scene is to fit the pattern node into custom object space. It is a bit more advanced method for defining the crop-box for the pattern.

I don't remember in detail now, but the he anisotrophy amount should be controlled by the texture, that is why the 0 value has no control over it (the effect is present).
If you are aware of the texture baking process, it should be with a projection modifier or even with a simple top view render with more or less detailed textures.

Thanks Aram. Yes, I now understand that the texture map is controlling the aniso. I am not familiar with baking textures, but will look into it. Thanks again. :)
Title: Re: nylon braided cord material?
Post by: romullus on 2024-07-04, 15:03:54
Also, I am unsure about what you meant when you said "The same pattern can be made as a texture as well.". How would I go about making the pattern into a texture?

I made a scene for you to study and familiarize with fake texture baking in Corona. Actually it's 2 scenes, one for baking and another where you can test your baked textures (baking needs special setup, so it's better to keep it separate to avoid unnecessary confusion). Real texture baking is useless in Corona (IMO), since it was only half implemented and practically abandoned.

I try to give logical names to everything, so hopefully you'll be able to understand how everything works. Most of the setup is procedural, so feel free to explore things and see if you can learn something new.

P.S. when saving render elements in "bake" scene, remember to save albedo and diffuse with automatic gamma and everything else with gamma 1.0. Same goes for loading these textures in your working scenes - colour maps loads with automatic gamma, data maps with gamma 1.0
Title: Re: nylon braided cord material?
Post by: Erich on 2024-07-04, 19:26:23
Also, I am unsure about what you meant when you said "The same pattern can be made as a texture as well.". How would I go about making the pattern into a texture?

I made a scene for you to study and familiarize with fake texture baking in Corona. Actually it's 2 scenes, one for baking and another where you can test your baked textures (baking needs special setup, so it's better to keep it separate to avoid unnecessary confusion). Real texture baking is useless in Corona (IMO), since it was only half implemented and practically abandoned.

I try to give logical names to everything, so hopefully you'll be able to understand how everything works. Most of the setup is procedural, so feel free to explore things and see if you can learn something new.

P.S. when saving render elements in "bake" scene, remember to save albedo and diffuse with automatic gamma and everything else with gamma 1.0. Same goes for loading these textures in your working scenes - colour maps loads with automatic gamma, data maps with gamma 1.0

Thank you Romullus. That is very much appreciated! I'll take a look. :)
Title: Re: nylon braided cord material?
Post by: Erich on 2024-07-08, 21:48:13
Here is something quick I did (I missed such stuff).

It is done using pattern modifier. Hope it is good enough for you to get the idea.
The same pattern can be made as a texture as well, which I think is better in this case.

Hi Aram. I am trying to duplicate what you did on my own model, but can't seem to get it to work. I was wondering did you apply a UVW map to the cord/wire object? If so, what projection did you use (box, cylinder, etc.)?
Title: Re: nylon braided cord material?
Post by: Aram Avetisyan on 2024-07-09, 08:08:07
Here is something quick I did (I missed such stuff).

It is done using pattern modifier. Hope it is good enough for you to get the idea.
The same pattern can be made as a texture as well, which I think is better in this case.

Hi Aram. I am trying to duplicate what you did on my own model, but can't seem to get it to work. I was wondering did you apply a UVW map to the cord/wire object? If so, what projection did you use (box, cylinder, etc.)?

You are probably referring to the UVW mapping of the base object - in this case it is a spline with Generate mapping coordinates enabled, and optionally also real world size enabled. You can check the model I submitted, rendering rollout of the spline. Hope this helps.
Title: Re: nylon braided cord material?
Post by: Erich on 2024-07-11, 02:43:06
Here is something quick I did (I missed such stuff).

It is done using pattern modifier. Hope it is good enough for you to get the idea.
The same pattern can be made as a texture as well, which I think is better in this case.

Hi Aram. I am trying to duplicate what you did on my own model, but can't seem to get it to work. I was wondering did you apply a UVW map to the cord/wire object? If so, what projection did you use (box, cylinder, etc.)?

You are probably referring to the UVW mapping of the base object - in this case it is a spline with Generate mapping coordinates enabled, and optionally also real world size enabled. You can check the model I submitted, rendering rollout of the spline. Hope this helps.

Hi Aram. The spline object was converted to an editable poly, so I don't think there is any way for me to check the rendering rollout of the spline. However, I was able to create a new model and thanks to your insight about using the "generate mapping coordinates", I was able to get pretty close to what you had.
Title: Re: nylon braided cord material?
Post by: Aram Avetisyan on 2024-07-11, 09:30:13
Yes, UV coordinates are crucial for pattern to work properly.

Even if you converted the spline into editable poly, there is a way to get the spline mapping on it, but it is a different topic.

I am glad to see you are making progress with Corona and pattern :)