Author Topic: Using Corona to render to texture with Maxscript[Solved]  (Read 2464 times)

2017-04-10, 21:36:21

kenc

  • Users
  • *
  • Posts: 4
    • View Profile
Hi All

I'm new to Corona and our studio is rendering with Corona. I do the studio's max scripting and I am trying to learn to script Corona. I've searching for examples but to no avail.

Using Max's VFB, I do a call to send a mesh to Render To Texture using

bake_map = render rendertype:#bakeSelected outputSize:[1024, 1024]  vfb:on outputfile:("C:\someimage.png")

How do I do this in Corona?

Thanks in advance.



« Last Edit: 2017-04-12, 15:07:18 by kenc »

2017-04-11, 16:29:20
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9269
  • Marcin
    • View Profile
Hi, you should be able to add Corona RTT elements by following this Autodesk guide:
http://docs.autodesk.com/3DSMAX/16/ENU/MAXScript-Help/files/GUID-61344DFE-8DA6-4E19-A184-BFD9ED093EFF.htm

And using the maxscript names of elements:

Corona_Beauty
Corona_Diffuse
Corona_DiffuseColor
Corona_ReflectColor
Corona_RefractColor
Corona_Light
Corona_AO
Corona_NormalMap

Let me know if you have any trouble with that.

2017-04-11, 18:05:01
Reply #2

kenc

  • Users
  • *
  • Posts: 4
    • View Profile
Thanks Maru

I am presently rendering to texture in MAX using Vray using maxscript.

I am using the same max script as for Vray except changing the code for Corona. The corona VFB does come up but it continuous is calculating Geometry.

As a test, I manually setup Max's RTT dialog using Corona Light channel. Set rendering time to 3 minutes, but after an hour still nothing is showing in the VFB and keeps calculating geometry.
« Last Edit: 2017-04-12, 15:07:44 by kenc »

2017-04-11, 18:09:02
Reply #3

kenc

  • Users
  • *
  • Posts: 4
    • View Profile
Sorry forgot to post this

Corona version: 1.5 (hotfix 2)
« Last Edit: 2017-04-12, 15:07:55 by kenc »

2017-04-12, 14:58:16
Reply #4

kenc

  • Users
  • *
  • Posts: 4
    • View Profile
I have figured it out. Thank you.
« Last Edit: 2017-04-12, 15:08:06 by kenc »

2019-08-09, 01:38:02
Reply #5

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile
Corona_Beauty, Corona_Diffuse, Corona_DiffuseColor, Corona_ReflectColor, Corona_RefractColor, Corona_Light, Corona_AO, Corona_NormalMap


Has this list being added to since this? Such as displacement? Thanks.

2019-08-14, 12:17:17
Reply #6

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9269
  • Marcin
    • View Profile
Corona_Beauty, Corona_Diffuse, Corona_DiffuseColor, Corona_ReflectColor, Corona_RefractColor, Corona_Light, Corona_AO, Corona_NormalMap


Has this list being added to since this? Such as displacement? Thanks.

Sorry, I don't understand the question. Can you rephrase it?

2019-08-14, 12:21:38
Reply #7

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile
I was hoping for a Corona_HeightMap or similar to render out a greyscale bitmap as opposed to a normal map output'd with Corona_NormalMap.




2019-08-15, 14:17:18
Reply #8

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9269
  • Marcin
    • View Profile

2019-08-15, 15:17:34
Reply #9

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile
For 3D displaced geometry or for 2D bump/normal maps?
2D bump/normal maps, but both types would be great.

I'm writing a script for a client to export to a program that doesn't have support for normal maps believe it or not.

2019-08-16, 11:48:34
Reply #10

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9269
  • Marcin
    • View Profile
We will see what can be done here, however this is not a common request, and generally 3ds Max texture baking is quite an obscure tool.

2019-08-16, 12:02:44
Reply #11

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile
Okay thanks. It may be the case that that Shapespark program may introduce it in the meantime.