Author Topic: Help - Wire objet's z rotation with bitmap offset parameter  (Read 5615 times)

2018-01-10, 08:44:08

Bormax

  • Active Users
  • **
  • Posts: 568
    • View Profile
Hi
Do you know guys, is it possible to wire object's Z rotation with Corona/Max Bitmap offset parameter?
I need result like
Rotation of object by 0' = map offset 0
Rotation of object by 180' = map offset 0.5
Rotation of object by 360' = map offset 1

Thanks in advanced

2018-01-10, 10:45:57
Reply #1

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9281
  • Let's move this topic, shall we?
    • View Profile
    • My Models
For native bitmap it's trivial. Look at the video below, it's the same principal (actual wiring starts at ~2:55). As for CoronaBitmap, it's a little bit more complicated, as you have to convert bezier point3 controller to bezier float. I can't remember how to do that, but i think it was already adressed somwhere in the forum. You may want to use search and find that info.

I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2018-01-10, 10:59:51
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13741
  • Marcin
    • View Profile
I tried to do it, but failed. Maybe it would require using some "middleman" object that would just store one of the values, and then the Corona Bitmap would take it and use it as 1 axis value only.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2018-01-10, 21:08:12
Reply #3

Bormax

  • Active Users
  • **
  • Posts: 568
    • View Profile
Thank you guys!
Actually I need that for the same use as in the video linked by Romulus, and also I found Maru's tutorial about the same kind of wiring.
At the moment I use VrayHDRI map with wired horizontal rotation parameter (thanks to Viscorbel's tutorial) - it has the same 360' as an object rotation (RadToDeg Z_Rotation / 360 makes the trick for Bitmap offset parameter). I was pretty happy with that, because I didn't have any problems with IR or normal rendering until Corona 1.7, when HDRi map stops to update from some point when I change it's horizontal rotation parameter. But nothing to complain - it's Vray's map :), and I get warning message when I start IR. So I decide to switch to Max Bitmap or preferably to CoronaBitmap, because it should be faster/better.
Anyway, now I have one alternative - thanks for your help!

2018-01-10, 21:34:15
Reply #4

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9281
  • Let's move this topic, shall we?
    • View Profile
    • My Models
My video is about wiring old sun, if you want to wire new sun, then you should check Corona's official youtube channel - there is much better video by Rawalanche.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2018-01-11, 01:40:34
Reply #5

Bormax

  • Active Users
  • **
  • Posts: 568
    • View Profile
My video is about wiring old sun, if you want to wire new sun, then you should check Corona's official youtube channel - there is much better video by Rawalanche.

- this is the one which I found, and probably the one you said about above. I just though that this video made by Maru :)
So, thanks to Rawalanche too for this tutorial!

2018-01-11, 09:19:11
Reply #6

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13741
  • Marcin
    • View Profile
The video above is made by Rawalanche (Ludvik) and here are two I made (for Max bitmap and Corona bitmap):
https://forum.corona-renderer.com/index.php?topic=17008.0

I must have accidentally removed them from Dropbox, but manged to restore them, so you can download them again if you would like to check them out.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2018-01-12, 04:50:52
Reply #7

Bormax

  • Active Users
  • **
  • Posts: 568
    • View Profile
Thanks Maru!
Links are working now and I could get your tutorial - great!

2018-02-03, 20:26:06
Reply #8

Bormax

  • Active Users
  • **
  • Posts: 568
    • View Profile
Hello again.
I've tried to wire Corona Bitmap's offset parameter following Maru's instructions, but got this error message when try to Evaluate...
Max  2014

2018-02-05, 13:19:27
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13741
  • Marcin
    • View Profile
What exactly are you wiring to what? I can see some "box" object there. Maybe the name of the property should not be "rotation", but something else?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2018-02-05, 19:59:52
Reply #10

Bormax

  • Active Users
  • **
  • Posts: 568
    • View Profile
What exactly are you wiring to what? I can see some "box" object there. Maybe the name of the property should not be "rotation", but something else?

Actually I've tried to do exactly the same as you did in this tutorial and pasted text [radToDeg(rotation)/360,0,0] from the attached to the tutorial txt file, and got the same message. After that tried to wire offset parameter with different objects, different names, but didn't succeed, and decide to write here about that.
But now, after your question I once again repeated everything you did including typing the text manually and magic has happened - it works. Looks like my Max wanted me to work, not to use lazy copy/past way :)
So thank you very much once again!