Author Topic: Question about the Corona Pattern Edit Mode  (Read 1730 times)

2023-12-19, 09:18:48

d4l1

  • Active Users
  • **
  • Posts: 45
    • View Profile
Hi all!

I've a question about the Corona Pattern Edit Mode. If I understand it correctly, selecting 'Only crop box' should only distribute the mesh inside the orange box. Switching to Whole object should distribute the whole pattern mesh, completely ignoring the orange box? Or does the orange box dimensions get distributed but the whole mesh is applied anyway, which would be the outcome I'm hoping for? Because the mesh I'm working has mesh elements that I don't want to cut because of a Multi Shader that is based on the mesh elements. Otherwise the material will switch on the same mesh element. Right now I've to cut the overlapping part to get it tileable, but that comes with the unwanted material switch halfway.

Ok! But to come back at the Edit Mode question: Somehow nothing changes if I switch the mode for my pattern. I've attached a test scene where I somehow believe (or hope), that the blue cylinder should be distributed too if the 'Whole object' mode is enabled?

Thanks in advance for any help or explanation into that direction!

2023-12-19, 10:06:28
Reply #1

Beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 3873
  • Bengamin
    • View Profile
    • Cormats
Hi there,

Can you please try removing your pattern mesh from the Corona pattern object and then putting it back? There might be a bug here.
Bengamin Jerrems l
Portfolio l Click me!

2023-12-19, 10:10:53
Reply #2

d4l1

  • Active Users
  • **
  • Posts: 45
    • View Profile
Hi! Thanks for the fast reply.

I tried to re-add the pattern object but nothing changed. Even a new Corona Pattern Modifier doesn't change the outcome.

2023-12-19, 10:13:59
Reply #3

Beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 3873
  • Bengamin
    • View Profile
    • Cormats
Hmm, for me, this happens.

Bengamin Jerrems l
Portfolio l Click me!

2023-12-19, 10:22:10
Reply #4

d4l1

  • Active Users
  • **
  • Posts: 45
    • View Profile
Yes, the orange box is adjusting to the newly added pattern object. That works too. Sorry I may have explained my question wrong or not that good enough.

I've a quick paint sketch attached. The pattern should look like on the left, with a blue circle that is outside the orange box. For my understanding, switching to the 'Whole object' mode it should apply the pattern that way? And if 'Only crop box' is enabled, really only the mesh part that is inside the box should be distributed. Or is this completely wrong?

But anyway: For me it looks like switching between both modes doesn't cange anything in the outcome?

I hope that is more clear now. Sorry :)

Edit:

I guess it could also be that the 'Whole object' option ignores the orange box / crop box completely and that would result in empty places because of the gap? If that is the case I'd like to propose my third option, if it is possible and reasonable to have at all. :) At least it looks like it can help with the per mesh element shading / making the pattern tileable problem? Not sure about that though.
« Last Edit: 2023-12-19, 10:59:56 by d4l1 »

2023-12-19, 12:06:24
Reply #5

Beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 3873
  • Bengamin
    • View Profile
    • Cormats
Hi, are you trying to do something like this? Sorry to ask...

Bengamin Jerrems l
Portfolio l Click me!

2023-12-19, 13:26:07
Reply #6

d4l1

  • Active Users
  • **
  • Posts: 45
    • View Profile
Yes, but with the 'out of the box' approach that my pattern has.
My test scene / example setup is not the intended setup I want to achieve. It was just a quick setup that doesn't necessarly has a logical use case.

I've attached another screenshot that shows more detailed which problem I'm facing right now:
I have a roof that is covered with those tiles that are horizontally shifted every second row. They are also overlapping. But I believe that doesn't matter at all now. The thing is, that the horizontal shift causes the pattern to cut the tiles every second row, making them 50% visible. Something that isn't the best fit if used with the MultiShader per Mesh element, because the color will switch on a single tile. My test screenshot contains only some boxes I've moved, some color change for presentation only and the yellow box outline. (without a proper Pattern setup)

If the pattern would look like in the second image attached, and work like I've believed it should work, the mesh doesn't need to be cut and would overlap into the empty gaps.
(Until now the whole idea is just some setup I've made up in my mind about the 'Whole object' 'Only crop box' stuff.)

Now the first question that comes to mind (and what was the initial question I've described very poorly in my first post): What exactly does the 'Whole object' and 'Only crop box' mean? Because the renderings always look the same?
And the second: Would it work the way I described it above?

Sorry, I hope the two additional screenshots help to understand what I want to achieve.

Edit:
Unfortunately I didn't save my 'real' setup. If there is time today I'll re-create it and upload that scene again. Then everything should be more clear.

Edit2:
I guess my example wouldn't work either - with the Multi Shader differences at least! I'll try to get a better example later on!

Edit3:
Ok Ok Ok! Maybe it would work! Sorry for Edit2.
« Last Edit: 2023-12-19, 14:58:33 by d4l1 »

2023-12-20, 09:13:07
Reply #7

d4l1

  • Active Users
  • **
  • Posts: 45
    • View Profile
Ok! Now I've attached the same file as before but with a pattern object. To get a tileable mesh I had to cut through half of the tile every second row - and with the multi shader applied it happens that there are half-tile size color patches. With the way to complicated explanation of my question / setup I'm aiming for this wouldn't happen because there are no half-tile parts. At least I believe it would work this way.


2023-12-22, 13:53:38
Reply #8

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
Hi, an exact use case was reported in the 3ds Max forum in the past and discussed with our devs. Unfortunately, this is not possible with Corona Pattern. The exact technical reason behind this is:
"The pattern is computed during rendering - one ray at a time, so it has no idea if there is anything next to it. Such welding is just not possible."
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2024-01-08, 10:52:46
Reply #9

d4l1

  • Active Users
  • **
  • Posts: 45
    • View Profile
Hi!

I've attached a scene where I use the pattern inside a grid cloner the same way I'd think the Corona Pattenr would / should if I choose the mode 'Whole object'.
This way there would be no cutting / welding, because the 100x100cm box is cloned while the pattern itself keeps its overlapping polygons. That is an example I should have posted earlier instead of wildly typing my thoughts down.

Is this something achievable right now with the current state of the plugin or if not, would it be something to ask for? Because the answer in the 3ds max forum is based on the situation that the pattern mesh is cutted at the 100x100cm border.


Wish you a happy new year and thanks for the replies!

2024-01-08, 14:26:13
Reply #10

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Corona pattern cannot overlap its tiling, therefore it's not possible to do what you want, however there is a way how to hack it. It requires some preparation and probably will not work in all situations, but i managed to get pretty good result in 3ds Max. I'm attaching screenshot, hopefully it will be self explanatory enough for you to be able to replicate this in C4D. The first multimap uses randomization by material ID, the second one does it by mesh element.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2024-01-08, 17:36:40
Reply #11

d4l1

  • Active Users
  • **
  • Posts: 45
    • View Profile
Hi romullus!

Yeah, already thought that the overlapping is not possible. But I wish it would! I don't see any aspect that could prevent this from working, from my amateur perspective at least :P Who knows, maybe sometime!

But!
Your suggested hack works for me! I've tried to copy your setup to C4D and after some wild guessing and even wilder node connecting the result is satisfying. Couldn't reproduce your 3-node-setup because if I use the Material ID for the border tiles I've to apply a different material for each separate tile individually because each tile needs a unique Materail ID? Dumb me created a way to big pattern so there are 8 tiles / materials that are connected with Material ID. Next time I'll reduce that! What I tried first was to create my pattern with (in my case) 9 different materials, each with an individual Material ID. But then it wasn't possible to overlay just that one MultiShader material while keeping the Materail ID informations. Maybe I'll solve that in another try and / or with less tiles to care for next time, but for the first renderings that will work. Thank you for that little hack. I've a screenshot attached with my current setup in C4D.

2024-01-11, 14:22:19
Reply #12

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 561
    • View Profile
Hi,

I believe my answer here is the actual feature request here:
https://forum.corona-renderer.com/index.php?topic=41774.msg220726#msg220726

For overlapping part, that is the pure artist(ic) part that should be taken care of.

P.S. I have some ideas on how to automate/improve pattern geometry node creation and pattern bounding box definition. Hopefully I have the time (at some point) to work on it.
Aram Avetisyan | chaos-corona.com
Chaos Corona Support Representative | contact us

2024-01-11, 15:56:07
Reply #13

d4l1

  • Active Users
  • **
  • Posts: 45
    • View Profile
Thanks! While the workaround is ok for now and gives nice results (not to mention the time saved while using the Pattern Modifier) I'm also looking forward to future improvements / updates. :)