Author Topic: Corona MultiMap Random & Defined Textures  (Read 1154 times)

2023-06-16, 10:24:37

MAY3D

  • Active Users
  • **
  • Posts: 25
    • View Profile
    • MAY3D Portfolio
Hi All

I am working on an interior with tiled walls. I've used MultiMap to randomise 20 tile textures (all variations on the same stone) across a number of different Floorgen objects. However, my client has asked me to swap the texture on 6 specific tiles and I can't figure out how to do it without the other tiles changing as well. I'm randomising by Mesh Element & Instance, so I can't simply change Material IDs. Any suggestions?

TIA
3D Generalist #OpenToWork

2023-06-16, 10:39:46
Reply #1

aaouviz

  • Active Users
  • **
  • Posts: 1005
    • View Profile
    • Another Angle 3D
What I do in this situation is to add an edit poly on top of the floor gen in the modifier stack and detach those specific tiles. Then I apply a more specific material to those extracted objects.
Nicolas Pratt
Another Angle 3D
https://www.instagram.com/anotherangle3d/

2023-06-16, 10:43:10
Reply #2

MAY3D

  • Active Users
  • **
  • Posts: 25
    • View Profile
    • MAY3D Portfolio
Thanks, I tried that, but then the randomisation of the other tiles changed. I think because it's set to Mesh Element & Instance, when you remove a part of the mesh, the randomisation is recalculated :(
3D Generalist #OpenToWork

2023-06-16, 11:41:56
Reply #3

James Vella

  • Active Users
  • **
  • Posts: 669
    • View Profile
Instead of Mesh Element why not use Material ID?

You can put a MaterialByElement modifier with Random Distribution for the floorgen object.
random" border="0

Then when you use a PolySelect modifier you can select the tile and put a MaterialID modifier on that to control the ones you want.
stack" border="0

Edit:
Hmm I suppose thats just 'in hindsight', since you are already down the rabbit hole you could just create 2 scenes (or a duplicate object in the same scene), change those 6 tiles and then render it with a mask.

« Last Edit: 2023-06-16, 11:47:34 by James Vella »

2023-06-16, 11:49:46
Reply #4

MAY3D

  • Active Users
  • **
  • Posts: 25
    • View Profile
    • MAY3D Portfolio
Thanks, that would certainly have helped if I had started that way. Unfortunately, as the current texture assignment doesn't follow the IDs, when I switch to that the tile randomisation changes. I need everything to stay as is other than the 6 tiles the client has asked to swap. In hindsight the Mat ID approach would have been better from the start, but I didn't expect the client to be quite so specific.

Perhaps a future feature of MultiMap could be to "bake" mat IDs onto the geo based on how they've been allocated with mesh element/instance. To get this to do what I need, I've had to compare the textures to the previous render and then manually assign the IDs  so the layout doesn't change. At least now I have more control. A good learning experience, I suppose.
« Last Edit: 2023-06-16, 11:53:11 by MAY3D »
3D Generalist #OpenToWork

2023-06-16, 11:57:46
Reply #5

James Vella

  • Active Users
  • **
  • Posts: 669
    • View Profile
Yeah at this point the only thing I can think of is just duplicate the object, adjust and render with a mask. While a 'bake' would be an interesting idea I think the whole point of Mesh Element is exactly for that purpose, to give instant randomization as you extend/change the tile arrangement.

Edit:
Oh actually here's an idea. Not sure if it overcomplicates your setup but why not:

1. Use a Multisub as your main material
2. Plug in your current MultiMap into Material ID 1
3. Set the whole floorgen to Material ID 1
4. Polyselect the tile you want
5. Assign Material ID 2 (grey in the screenshot below)
6. Rince repeat for the other 5 tiles.

It just means you cannot change the floorgen later but should fix the issue for now and give you control over those 6 tiles to change them as the client needs (if they want more changes, which is probably lol).

meshelem" border="0

meshelem2" border="0
« Last Edit: 2023-06-16, 12:15:49 by James Vella »

2023-06-16, 14:14:40
Reply #6

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9252
  • Let's move this topic, shall we?
    • View Profile
    • My Models
On top of what's already been suggested by others, you could use Corona slicer to "cut" specific tiles and replace them with the tiles that has the texture that you need. I didn't test that, but i think slicer should not reset multi-map's randomization seed.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-06-16, 14:42:24
Reply #7

MAY3D

  • Active Users
  • **
  • Posts: 25
    • View Profile
    • MAY3D Portfolio
Thank you, both interesting ideas. I had to do it all manually to get the render out, but I'll give these a go when I have some down time. Always good to have solutions like these to hand when things crop up in the future.
3D Generalist #OpenToWork