Author Topic: REQUEST: Border and spacing  (Read 1144 times)

pkorzeniewski

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
REQUEST: Border and spacing
« on: October 22, 2016, 10:10:26 PM »
Some tilesets have border and spacing between tiles to avoid rendering issues, it would be useful to have an option to set border and spacing size so the UV tilesize would snap according to them.

Example tileset with a border (blue) and spacing (red):

Alex

  • Administrator
  • Sr. Member
  • *****
  • Posts: 305
    • View Profile
Re: REQUEST: Border and spacing
« Reply #1 on: October 23, 2016, 05:47:41 PM »
would the borders/spacing be transparent or would they stretch the edges(just the outer pixels of a tile) into those areas?

edit: Implementing it into c3d might be difficult, since it may require some changes to how things currently are designed. It might be more reasonable to create a separate tool that can modify the exported files. I'll see if I can work on such a thing- it might also be useful for others who don't use c3d, but that makes me wonder if there are already tools that do this?
« Last Edit: October 23, 2016, 06:41:15 PM by Alex »

pkorzeniewski

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: REQUEST: Border and spacing
« Reply #2 on: October 26, 2016, 08:34:57 PM »
I think I've found a solution that should be easy to implement - in the Tileset window there would be an additional input for "UV Border" which would reduce the selected UV by the specified amount, similar to moving the UV with arrow keys. In other words selecting tiles would snap to "UV Tilesize", but the UV applied to face would be reduced by "UV Border". For example: we've 16x16 tiles with additional 1px so we set "UV Tilesize" to 17x17 and "UV Border" to 1 :)

Alex

  • Administrator
  • Sr. Member
  • *****
  • Posts: 305
    • View Profile
Re: REQUEST: Border and spacing
« Reply #3 on: October 26, 2016, 09:22:40 PM »
ah I see. Yeah, that sounds like a decent idea. That should be relatively simple to add..
I also did some thinking on how to add spacing during the export to obj- I think I've thought of a fairly straightforward process, although it would need to assume that all tiles uvs are square (no rectangles or other odd shapes).
I will try to get back into the code soon and look at implementing these things.

pkorzeniewski

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: REQUEST: Border and spacing
« Reply #4 on: October 26, 2016, 09:47:50 PM »
Yes the fact that all tiles must be squares is a bit limiting, that's why I thought about the solution with "UV Border" which is more flexible, but of course it would be great to have both options :)

Alex

  • Administrator
  • Sr. Member
  • *****
  • Posts: 305
    • View Profile
Re: REQUEST: Border and spacing
« Reply #5 on: October 27, 2016, 11:30:48 PM »
I've been working on adding the uv spacing option to the scene exporting process. So I may be able to have an update for that in a few days if things go smoothly.

Alex

  • Administrator
  • Sr. Member
  • *****
  • Posts: 305
    • View Profile
Re: REQUEST: Border and spacing
« Reply #6 on: October 31, 2016, 01:33:02 AM »
I have a basic tile spacing feature implemented into the export options now, but I'm also working on adding some other things, so it may be a bit longer until an update is available.

pkorzeniewski

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: REQUEST: Border and spacing
« Reply #7 on: November 16, 2016, 02:03:56 PM »
How about the UV border option? :) The tile spacing in export options is great, but it works only for rectangle tiles :(

Alex

  • Administrator
  • Sr. Member
  • *****
  • Posts: 305
    • View Profile
Re: REQUEST: Border and spacing
« Reply #8 on: November 16, 2016, 04:35:12 PM »
Thanks for reminding me. I'll work on implementing that one next once I get a different feature I am working on finished!

pkorzeniewski

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: REQUEST: Border and spacing
« Reply #9 on: November 16, 2016, 08:12:06 PM »
Great, can't wait! :)