Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
31 user(s) are online (22 user(s) are browsing Forum)

Members: 0
Guests: 31

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +5€

Current balance: -60€
(last updated 10/2020)

Please make a donation if you want to help keeping The-Starport online:

Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 101 users playing Freelancer on 42 servers.
October. 24, 2020

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post

« 1 (2)


Re: The big .thn/.lua research thread
Not too shy to talk
Joined:
2010/8/27 14:02
Group:
Registered Users
Posts: 76
Offline
That's kinda stupid. For a revolute part (which quarters_lod1 is) the values that go there are pairs of timestamp (in seconds) and rotation angle (in radians). The ones you list are going to create partial spin back and forth rather than continious one.

Assuming you want to do full 360 spin in 10 seconds the solution is:
0.0 <- Frame 1 timestamp: 0 seconds
0.0 <- Frame 1 value: 0 degrees
5.0 <- Frame 2 timestamp: 5 seconds
3.14159 <- Frame 2 value: 180 degrees
5.0 <- Frame 3 timestamp: 5 seconds
-3.14159 <- Frame 3 value: -180 degrees
10.0 <- Frame 4 timestamp: 10 seconds
0.0 <- Frame 4 value: 0 degrees


Notice the doubled keyframe at half duration, a flip occurs there to continue rotation into a loop.

Flip signs at values of mid-keyframes if you want to rotate the other direction. Naturally your Rev part must have min/max angles set to -360 and 360 degrees respectively.

Posted on: 3/26 14:09
Top
Re: The big .thn/.lua research thread
Quite a regular
Joined:
2010/6/13 13:38
From Russia, Penza
Group:
Registered Users
Posts: 165
Offline
Quote:
That's kinda stupid.

Because this is my solution. Yes, I did that many times ago and this (by strange reason) really working.

Anyway - your solution isn't best.

This is best solution:

Code:
0
-6,283185
20
6,283185

Don't forget about set Frames = 2

By strange reason my version working only with 6,xx values. With 3,xx values this doen't work.

Posted on: 4/3 11:25
Top
Re: The big .thn/.lua research thread
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 151
Offline
Does anyone have a better guide to the lightprops section handy?

I've been working off the guide but i'm having trouble working out what does what, and in what format. From a lot of my own testing it appears cutoff and range don't seem to do anything (but apparently they do?) and I don't really have much of a handle on how any of the parameters should look/be adjusted aside from diffuse which is fortunately quite obvious.

The end goal is to use the date() function to adjust the relevant parameters based on the time and parse them into the lightprops table so it's fairly easy to create working day/night scripts for planets. I'm just not sure what to adjust!

If anyone could help out I'd really appreciate it.

Posted on: 8/7 8:12
Top
Re: The big .thn/.lua research thread
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 151
Offline
Just jumping back to answer my own question for reference! Callum in the Librelancer Discord server kindly provided a structure that lightprops in thorn scenes seems to follow. It can be found here:

https://docs.microsoft.com/en-us/windows/win32/direct3d9/d3dlight9

Posted on: 9/25 12:58
Top
« 1 (2)