Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor > Software Development

Reply
 
Thread Tools
Old 21-06-15, 09:04   #21
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,810
Default

I think there's no way, info gets lost on level building...

I can only guess that since in project file cameras and sinks are separated, array lists cameras at first, and then it lists sinks. But it may be wrong.

What I can offer you is to parse through all level triggers (which can be a pain ) and create helper type listing based on camera/sink reference either by camera or sink trigger, which you can then refer on run-time.
Lwmte is offline   Reply With Quote
Old 21-06-15, 09:25   #22
b122251
Member
 
b122251's Avatar
 
Joined: Aug 2013
Posts: 686
Default

Quote:
Originally Posted by sapper View Post
How to know a sink from a camera using only room or flag fields?
That's pretty much impossible. There's virtually no difference between the two. The only thing that could ever tell you which is which is the FloorData.
b122251 is offline   Reply With Quote
Old 21-06-15, 10:16   #23
Boobandie
Member
 
Joined: Jul 2012
Posts: 4,286
Default

Any ideas on getting the ambient room lighting values and lightbulb placement/values into FexInspect?
Boobandie is offline   Reply With Quote
Old 21-06-15, 10:35   #24
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

Yes.

Should be straightforward if opentomb parsing is correct.

But position of lightbulbs is global and would need to be adjusted to relative to room and half clicks.

RView by TurboPascal shows some lights info. Have you used that program?

Last edited by sapper; 21-06-15 at 10:37.
sapper is offline   Reply With Quote
Old 22-06-15, 05:58   #25
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

Quote:
Originally Posted by Lwmte View Post
I think there's no way, info gets lost on level building...

I can only guess that since in project file cameras and sinks are separated, array lists cameras at first, and then it lists sinks. But it may be wrong.
Here's data for karnak.tr4 TRLE level. Note that Rm here is room field and not the actual room necessarily.



Cameras 0,1,10,11,12 are cameras and rest are sinks so they aren't separated in the array.

Maybe can use the flags field since for camera seems to be only 0x0001 or 0x0000?

Last edited by sapper; 05-05-18 at 01:53.
sapper is offline   Reply With Quote
Old 24-06-15, 04:57   #26
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

I need help getting X and Y lighting direction values from the direction floats for TR4 lighting.

I cannot get the correct angle and sign.

Using the TR4 notes.
Code:
//        The final 3 floats are used only by the 'sun' and 'spot' type lights.
//        They describe the directional vector of the light.
//        This can be obtained by :
//                        if both x and y        x = cosX * sinY
//                                                y = sinX
//                                                z = cosX * cosY
//
//                        if only x                x = 0
//                                                y = sinX
//                                                z = cosX
//
//                        if only y                x = sinY
//                                                y = 0
//                                                z = cosY

float LightDirectionVectorX
float LightDirectionVectorY
float LightDirectionVectorZ
sapper is offline   Reply With Quote
Old 27-06-15, 01:42   #27
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

http://www.mediafire.com/view/0cj9vptii2opcg3/

Quote:
FexInspect 1.2 Revision 5 - sapper June 2015

Copy the exe to an existing fexinspect folder.

Added rendering of cameras/sinks. At this stage mesh0 is used for camera/sink rendering.

Added lights info for TR4 levels only

Added tab for static mesh info.

Note there was only minimal testing!
Note that it is not possible to get the original X,Y values for the Sun and Spot lights so I don't bother.

Last edited by sapper; 28-06-15 at 00:57.
sapper is offline   Reply With Quote
Old 28-06-15, 00:56   #28
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

http://www.mediafire.com/view/0cj9vptii2opcg3/

New link for Revision 5. A bug in previous version if no cameras/sinks crashed fexinspect.
sapper is offline   Reply With Quote
Old 02-07-15, 13:37   #29
Kevin
Member
 
Kevin's Avatar
 
Joined: Mar 2008
Posts: 801
Default

Thank you for the update.

Maybe I haven't seen it yet but is it possible to see the room ambience lighting value?
Kevin is offline   Reply With Quote
Old 02-07-15, 21:59   #30
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,810
Default

I also wanted to mention that OCB/Flag text fields are swapped, when compared to their label counterparts. By the way, what's the whole purpose of textboxes there? They doesn't seem to save new OCBs/masks for given object.
Lwmte is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 09:52.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.