Author Topic: Script - Create Corona Camera from View  (Read 5930 times)

2017-10-09, 03:46:48

oncire

  • Active Users
  • **
  • Posts: 59
    • View Profile
here is a macroscript... must be in perspective view to use it.

-just drag the script to your 3ds max window.. you can find the scripts in cui-category-ebbmaxscript
-to use, just add a shortcut,add to menu,quad, etc.


requirement: corona 1.7 and higher
update: modified the script to work perfectly in newest released
« Last Edit: 2018-07-13, 11:01:18 by oncire »

2017-10-09, 09:30:00
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 8667
  • Marcin
    • View Profile
Awesome, seems to be working nicely.

Native feature like this is already logged in our task tracker.

2017-10-09, 10:04:15
Reply #2

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 5522
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Thank you very much, good sir!
I'm not Corona Team member. Everything i say, is my personal opinion only.
R.I.P. Niki Lauda

2017-10-09, 13:12:23
Reply #3

RolandB

  • Active Users
  • **
  • Posts: 327
  • Corona fan
    • View Profile
    • Béhance portfolio
Does not work for me...

2017-10-09, 13:50:38
Reply #4

oncire

  • Active Users
  • **
  • Posts: 59
    • View Profile
Does not work for me...


make sure you have corona 1.7 installed..:) else it does not work

2017-10-09, 14:05:34
Reply #5

oncire

  • Active Users
  • **
  • Posts: 59
    • View Profile
Awesome, seems to be working nicely.

Native feature like this is already logged in our task tracker.
thanks maru.

Thank you very much, good sir!

no worries... just helping the community.

2017-10-09, 15:11:29
Reply #6

RolandB

  • Active Users
  • **
  • Posts: 327
  • Corona fan
    • View Profile
    • Béhance portfolio
Arf... only 1.6.3... Pffff I have no excuse I have to read (but I was so happy)...
I'll install the new one thanks and sorry ;-)
Roland

2017-10-31, 09:19:59
Reply #7

rambambulli

  • Active Users
  • **
  • Posts: 160
    • View Profile
Assigned ctrt+C directly to your script.
Thanks!

2017-11-07, 13:01:38
Reply #8

vfga10

  • Active Users
  • **
  • Posts: 10
    • View Profile
Awesome! Thank you so much

2018-06-18, 17:55:49
Reply #9

JoachimArt

  • Active Users
  • **
  • Posts: 74
    • View Profile
    • JoachimArt
here is a macroscript... must be in perspective view to use it.

-just drag the script to your 3ds max window.. you can find the scripts in cui-category-ebbmaxscript
-to use, just add a shortcut,add to menu,quad, etc.


requirement: corona 1.7.... (works only on this version...previous version don't have coronacamera)

Hi I'm really enjoying your script, having a keyboard shortcut. with corona 2.0 (still i RC3 though) the position changes when adding a camera through your script. I know corona has a button for it, but if you are planning on updating the script it would be highly appreciated ;)

2018-07-13, 09:56:55
Reply #10

Frood

  • Active Users
  • **
  • Posts: 1228
    • View Profile
    • Rakete GmbH
the position changes when adding a camera


Just add a line "cam.targeted = false" before the transformation:

Code: [Select]
(...)
local cam = CoronaCam isSelected:true fov:(getViewFOV())
cam.targeted = false
cam.transform = inverse(viewport.getTM())
(...)

and it works again correctly. I had to change our script also at some point; something has changed during the dailies with CoronaCam.


Good Luck



Never underestimate the power of a well placed level one spell.

2018-07-13, 10:27:03
Reply #11

sequana

  • Active Users
  • **
  • Posts: 47
    • View Profile
Thanks! Had exact the same problem. Solved!

Cheers
Windows 10 - Max 2019 - Corona 3.0 (Hotfix 2) /// Arch- & Product VIZ

2018-07-13, 10:49:39
Reply #12

oncire

  • Active Users
  • **
  • Posts: 59
    • View Profile

Just add a line "cam.targeted = false" before the transformation:

Code: [Select]
(...)
local cam = CoronaCam isSelected:true fov:(getViewFOV())
cam.targeted = false
cam.transform = inverse(viewport.getTM())
(...)

and it works again correctly. I had to change our script also at some point; something has changed during the dailies with CoronaCam.


Good Luck

updated the first post... seems like they change how corona camera works in the newer releases.

2018-10-10, 18:27:40
Reply #13

alias_marks

  • Active Users
  • **
  • Posts: 16
    • View Profile
Very handy script, thanks for putting together.  One request if you get around to tinkering some more.

Currently when I assign your script to ctrl-c it creates camera as advertised.  Great
Having that said, is it possible to have it behave like the previous ctrl-c behavior, whereby, if you have a camera already selected it simply moves that camera to your current perspective (instead of making entire new camera).

Thanks for any updates!


2018-10-11, 12:58:15
Reply #14

Frood

  • Active Users
  • **
  • Posts: 1228
    • View Profile
    • Rakete GmbH
it simply moves that camera to your current perspective (instead of making entire new camera).

no worries... just helping the community.

Yes this. So I feel free to attach our script which

- moves a selected camera instead of creating a new one
- warns if the camera is locked (and asks for confirmation if so)
- warns if a unlocked camera is selected when executing

We messed up cams regularly before having those confirmation boxes.


Good Luck

Never underestimate the power of a well placed level one spell.