Author Topic: Texture baking prototype  (Read 5529 times)

2016-04-26, 21:30:31
Reply #45

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 7252
  • Let's move this topic, shall we?
    • View Profile
    • My Models
So it should be bug then. I will check it out and make report. Thanks.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2016-04-26, 21:34:15
Reply #46

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 3979
    • View Profile
So it should be bug then. I will check it out and make report. Thanks.

Doing some more testing, sorry I may have posted in haste. Getting mixed results at the moment, going through steps to pin down what I am seeing.

2016-04-26, 21:56:20
Reply #47

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 3979
    • View Profile
Some confusion arose there - looks like the render to texture when using Corona was not saving the file (even though pointing to an already existing file; I knew it didn't create files, but thought it was ok writing to an existing one), so a bug there I suspect.

I rechecked results by manually saving the result of the RTT from Corona. Looks like padding makes no difference there, 0, 2 and 10 all gave an identical result. I do see the difference with MR, if I set to 0 then the seams show up (not as entirely black, but they are visible). So another bug there perhaps, that padding is not being used?

Thanks!
   Tom


2016-04-26, 22:02:44
Reply #48

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 7252
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Well, i just checked and it looks like Mental Ray is writing padding somehow strange, but Corona does not write it at all. Should be bug.

I can't replicate a bug with no saving to file, though. Can you write step by step what you do?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2016-04-26, 22:26:07
Reply #49

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 3979
    • View Profile
Sure! I've kept it barebones, with everything as default as possible

- Create sphere
- Apply Standard shader with checker pattern in diffuse (Standard so I can use the same shader in Corona and MR)
- Open RTT
- Add Corona Beauty to the output elements
- I leave this at default path and name Sphere001Corona_Beauty.tga being written to the Documents\3dsMax\sceneassets\images folder
- Render from the RTT dialogue (leaving to do the autounwrap since just a simple object and test! Sometimes lazy is good!)
- Screengrab attached of the resulting baked material, with the bitmap open - path etc is correct in that, but the preview is black
- The file does not exist at that location when I open it up

- For checking the save to an existing file, I change the "leave the default filename" for the RTT step to point to an existing file
- I change the checker colour just to be sure I know if something has changed
- Render from RTT, the file correctly appears in the baked texture and is loaded, but has not changed - second screengrab attached showing the yellow checkers that are the source material, and you can see the baked bitmap still has the old colours in it, the file was not overwritten

Performing the same steps with MR does create a file if none existed, and does overwrite the file with the render if one did exist.

Let me know if any more info would be of help!

EDIT - PS ignore the checker going into the diffuse on the baked texture :) I would normally delete that, set diffuse to 0, turn on Self Illumination, to check how that compares to the originally lit object, in this case, but didn't do that here since just testing.
« Last Edit: 2016-04-26, 22:30:17 by TomG »

2016-04-26, 23:22:34
Reply #50

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 7252
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Ok, got it. I always choose render to textures only option, so that bug just slipped unnoticed :] Will report it on mantis.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2016-04-26, 23:50:30
Reply #51

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 3979
    • View Profile
TY! Sometimes it helps to be new at something, then you make all these strange choices and so test new things :)

2016-04-27, 08:22:22
Reply #52

88qba88

  • Active Users
  • **
  • Posts: 64
    • View Profile
Hey,

I thought I'll share with you a project we did to recreate a small part of Elblag's (Poland) old town from 40s. All textures were baked in Corona, then we made an app for Android and Apple phones. It's free, so you can check it out:)

https://itunes.apple.com/us/app/themuseum./id1097602764?mt=8

https://play.google.com/store/apps/details?id=co.theconstruct.themuseum&hl=en&utm_source=applify.me&utm_medium=web

I've attached 2 WIPs with Corona's "clay mode" on :)

2016-04-27, 13:41:12
Reply #53

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 10942
  • Marcin
    • View Profile
Qba, mind sharing an APK? I installed it, Google Play says it's installed, but I cannot see it on my phone, even after rebooting. Strange...
« Last Edit: 2016-04-27, 15:20:29 by maru »

2016-04-27, 15:21:30
Reply #54

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 10942
  • Marcin
    • View Profile
Got it working. Cool, but you should definitely make it possible to move under the arch, and to scare the pigeons away. :)
Just some more polishing and I am sure it will be awesome.

Also, time to get a new phone as 1280x720 / 2 lenses is a nightmare.

2016-04-27, 18:24:46
Reply #55

twcg

  • Active Users
  • **
  • Posts: 62
    • View Profile
Rendering itself works fine, but i also have the file saving problem, even if "Render to file only" is ticked. (Max 2014 and 2016)
Tested Corona VFB and native Max VFB. Any ideas?

2016-04-27, 18:52:00
Reply #56

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 7252
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Tested Corona VFB and native Max VFB. Any ideas?

How did you test native max VFB? Maybe you're doing it wrong? Render To Textures has its own render button.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2016-04-27, 19:33:04
Reply #57

twcg

  • Active Users
  • **
  • Posts: 62
    • View Profile
Tested Corona VFB and native Max VFB. Any ideas?

How did you test native max VFB? Maybe you're doing it wrong? Render To Textures has its own render button.

HM? I just changed it in the Render Settings (System->VFB Settings), then pressed the Render-button in the RTT Dialog. Just thought it could be a framebuffer problem. :)
Mental Ray works fine.

2016-04-28, 17:57:25
Reply #58

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 7252
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Just did some quick test and Corona saved to file even though render to files only was unchecked. That is correct behaviour.

Curious, why everyone gets different results?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2016-04-28, 22:11:49
Reply #59

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 3979
    • View Profile
Some more info -

I followed the same process, but this time I set the path to be on my E:\ drive, left the same default filename. This time, the file *was* created.

So first thought is maybe some sort of Windows permissions thing?

But one extra puzzle.

- Reload the scene to the default state before baking with no restart of Max
- Open the RTT dialog, add the Corona beauty but leave path set to the default
- Render from RTT
- Inspect the resulting material: the bitmap node in the baked material shows the expected path in the Bitmap field (the C:\....sceneassets\images\), and this is the path that opens if I click on the field to browse for an image (and the image is indeed not there)
- But the Bitmap node is in fact loading the image from the E:\ drive, and will render and show that image, even though it is not what is in the Bitmap's path field.

Image attached, you can see from the Bitmap preview that it is showing the image, and that the path is pointing to the C:\ drive location (where there is no such file). Clicking Reload doesn't change anything, the image from the E:\ drive location continues to be displayed. If I delete the image at the E:\location, it does vanish from the Bitmap node.

Don't know if that is just a Max thing when a bitmap is not found, or some extra piece of this puzzle.

Thanks!
   Tom