Author Topic: Corona light settings  (Read 17283 times)

2020-01-28, 19:30:32

LUXi

  • Active Users
  • **
  • Posts: 29
    • View Profile
Hi all,

I need your help. I am struggling with settings of rectangle light to set the vertical position. How to do that?
Any help I could appreciate.

Thanks,
krsz

2020-01-28, 21:24:52
Reply #1

tma

  • Active Users
  • **
  • Posts: 70
    • View Profile
Yes, it can't be exactly on a vertical position, at least from my tests.
We can approche the vertical position ( using the arrow hotspot), but once on 90°, it switches the light emission direction.

ARCHICAD 21-22
Corona ArchiCAD Alpha 5

2020-01-29, 10:06:30
Reply #2

alexhajdu

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 233
  • SW engineer - ArchiCAD
    • View Profile
Hi. I'd like to help, but I'm afraid I don't understand your issue. Is this correctly working with lights from AC library? It's not more AC issue than Corona Light issue?
Thanks for bringing more light into this.

2020-01-29, 15:54:32
Reply #3

tma

  • Active Users
  • **
  • Posts: 70
    • View Profile
I think , that's what the OP was asking for :
ARCHICAD 21-22
Corona ArchiCAD Alpha 5

2020-01-29, 17:42:49
Reply #4

LUXi

  • Active Users
  • **
  • Posts: 29
    • View Profile
tma that is correct but how?

2020-01-29, 17:46:31
Reply #5

LUXi

  • Active Users
  • **
  • Posts: 29
    • View Profile
Alex, imagine a rectangle light on a vertical wall as tma presented.

2020-01-29, 17:53:37
Reply #6

LUXi

  • Active Users
  • **
  • Posts: 29
    • View Profile
...like this

2020-01-30, 09:17:40
Reply #7

alexhajdu

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 233
  • SW engineer - ArchiCAD
    • View Profile
Ugh, after 5 minutes of furious clicking I was even not able to rotate a chair :) It's different like generic 3D programs, probably for a good reason. I need to find some tutorials how to rotate an object and then will explore why it's not working for Corona Light.

2020-01-30, 09:20:32
Reply #8

alexhajdu

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 233
  • SW engineer - ArchiCAD
    • View Profile
Maybe I'm wrong, but it seems like @tma knows the trick?

2020-01-30, 13:15:27
Reply #9

rozky

  • Active Users
  • **
  • Posts: 29
    • View Profile
I think the problem is in 3d script

"compute transform":
   EPS = 0.001
   dirX = coro_targetX - coro_posX
   dirY = coro_targetY - coro_posY
   dirZ = coro_targetZ - coro_posZ
   dirLen = SQR(dirX**2 + dirY**2 + dirZ**2)

   if ABS(dirZ) > EPS then
      rotationY = ATN(SQR(dirX**2 + dirY**2)/dirZ)
      if dirZ < 0 then rotationY = 180 + rotationY
   else
      rotationY = 90
   endif

   if ABS(dirX) > EPS then
      rotationZ = ATN(dirY / dirX)
      if dirX < 0 then rotationZ = 180 + rotationZ
   else
      if dirY > 0 then
         rotationZ = 90
      else
         rotationZ = -90
      endif
   endif

2d script can be usefull:

   HOTSPOT2 0,  coro_targetY,  unID, coro_targetX, 1+128 : unID = unID+1
   HOTSPOT2 -1, coro_targetY,  unID, coro_targetX, 3 : unID = unID+1
   HOTSPOT2 coro_targetX, coro_targetY,  unID, coro_targetX, 2 : unID = unID+1

   HOTSPOT2 coro_targetX, 0,  unID, coro_targetY, 1+128 : unID = unID+1
   HOTSPOT2 coro_targetX, -1,  unID, coro_targetY, 3 : unID = unID+1
   HOTSPOT2 coro_targetX, coro_targetY,  unID, coro_targetY, 2 : unID = unID+1

Peter


« Last Edit: 2020-01-30, 14:28:27 by rozky »
Archicad 8-23CZE, Corona Renderer for Archicad Alpha 5

2020-01-30, 14:51:14
Reply #10

alexhajdu

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 233
  • SW engineer - ArchiCAD
    • View Profile
Thanks @rozky for your help! I will test it and updated Corona Light will be delivered in the next build.
And maybe I will attach it to this thread if you guys need this urgently... cc: @LUXi

2020-01-30, 15:11:40
Reply #11

alexhajdu

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 233
  • SW engineer - ArchiCAD
    • View Profile
I really don't get it. How can I rotate for example column on y-z axis? I tried to change planes, but all I can do is to rotate on x-y axis. Thanks for help :)

2020-01-30, 15:20:43
Reply #12

LUXi

  • Active Users
  • **
  • Posts: 29
    • View Profile
@alexhajdu if you are ready I will be happy to test it.

2020-01-30, 15:50:36
Reply #13

rozky

  • Active Users
  • **
  • Posts: 29
    • View Profile
I really don't get it. How can I rotate for example column on y-z axis? I tried to change planes, but all I can do is to rotate on x-y axis. Thanks for help :)
it's not possible. Morph and shell objects are an exception.
For gdl objects, you can use the hotspots.
Archicad 8-23CZE, Corona Renderer for Archicad Alpha 5

2020-01-30, 18:22:16
Reply #14

tma

  • Active Users
  • **
  • Posts: 70
    • View Profile
hi ,

In the 3d view, I grabbed the hotspot on the arrow head of the corona light object , and then rotated the light from there* ( however , it is not possible to get it to be perfecly horizontal ) .

hope it is clear.

ARCHICAD 21-22
Corona ArchiCAD Alpha 5