www.tombraiderforums.com  

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Software Development

Reply
 
Thread Tools
Old 08-01-13, 20:18   #51
HeinzFritz
Explorer
 
Join Date: Feb 2006
Posts: 526
Default

I tested it all a bit and here are some observations.
1. The only way to try out all kinds of transparencies in room meshes was to create multiple toggle opacity doors in editor in several rows one after the other and to assign in Turbo's texture editor the various transparencies to them. Apart from 1 and 2 which are the usual transparencies, it is possible to use 3, 4, 5, 8, 9, 10 to get all those possible at the moment. (6 gives wire frame effect, 7 is opaque) 3 and 4 look alike, but 4 has a weird effect: Even if it is behind Lara, when she stands in front of it the texture, it "jumps" in front of her.
2. The only way to texture a moveable with triangle meshes was to create the level in editor, assign opacity to wall tiles via Turbo's tool, save the tr4 file, then to open it in PixStr, choose the texture that has the desired type of opacity and to apply it to the moveable mesh polys, then save & play.
3. So far all that works but is actually unusable. The tr4 file created this way can not be used to add the edited object to another wad and, of course, PixStr censors all meshes in the level for those over 1000 vertices.
5. A test to see in Hex editor which offsets get changed when applying classical transparency from 00 to 01 and to change them manually from 01 to 08 etc, then to convert the wad gave no result. The object in the created tr4 had the classical additive transparency in game.
HeinzFritz is offline   Reply With Quote
Old 08-01-13, 21:15   #52
Lwmte
Archaeologist
 
Lwmte's Avatar
 
Join Date: Aug 2010
Posts: 1,129
Default

Dustie, I use old DirectX 6.1 SDK that can be found right here. It contains very useful info about D3D functions and their arguments, it allows to decipher asm calls to D3D library and do significant changes in rendering states.

Heinz, the reason why subtype 4 gives this weird effect is that it bypasses Z-buffer. It is needed primarily for font and skybox rendering. As for your problems with editing software, I guess, there is no chance to apply new blending modes other way than with Meta2TR or TRTexture programs, since both Dxtre3d and TRLE aren't aware of them.


Oh, and by the way, I've modified smoke emitter routine a bit, remember that confusing SMOKE_EMITTER_BLACK object, that produced white smoke? It now really produces black smoke! You can test new exe file or, as always, use TREP custom patch.


Last edited by Lwmte; 08-01-13 at 23:16.
Lwmte is offline   Reply With Quote
Old 09-01-13, 09:59   #53
HeinzFritz
Explorer
 
Join Date: Feb 2006
Posts: 526
Default

Ensi, while waiting for Meta2tr to update his fine tool so we can finally use all those new transparency types also on moveables, I have modified your newest draco patch so that it allows misuse of the respectable smoke emitter black object, allowing the advanced user to enter values from 00 - 0A inside Trep. For example, the value 06 gives a weird emssion of white lines...

Here is the modified draco patch:

/bgn 106
Omnipresence=1
Name=Fix black smoke emitter object
Description=Fixes bug with black smoke object, so it actually produces black smoke.////This patch requires new blending modes.

RequiresRemap=0
RequiresYiff=0
RequiresPart=0
RequiresSave=0
Dependencies=New blending modes

CondBehave=1
Offffset01=861E0
DeflData01=84DB0F95C242
ModNData01=660FBED39090
ModRData01=

bambi=0|1
ronno=0|361FD
gprince=0|03
faline=0|variaous types of transparency 00-0A
mena=0|0

/end 106

P.S. An amateurish question: As all image editing programs have a lot of blend modes (dissolve, screen, overlay, pin light, hard light, multiply, saturation etc etc) shouldn't it be possible to enable them all in the exe?

Last edited by HeinzFritz; 09-01-13 at 10:38.
HeinzFritz is offline   Reply With Quote
Old 09-01-13, 10:51   #54
meta2tr
Historian
 
Join Date: Apr 2008
Posts: 368
Default

^ Great updates, thanks guys. Sorry for keeping you waiting. I am building a couple of objects to demonstrate the use of the new modes.
meta2tr is offline   Reply With Quote
Old 09-01-13, 11:02   #55
HeinzFritz
Explorer
 
Join Date: Feb 2006
Posts: 526
Default

@meta2tr Can't wait actually! All this looks to me like a quantum leap to dramatically enhanced aesthetics of the rendered scene in game.
HeinzFritz is offline   Reply With Quote
Old 09-01-13, 14:07   #56
Lwmte
Archaeologist
 
Lwmte's Avatar
 
Join Date: Aug 2010
Posts: 1,129
Default

Heinz, you can also modify standard smoke emitter blend type to 8 or 9 - for example, in screenshot above I've placed 10 SMOKE_EMITTER objects on one square, by default they produce over-exposed white glow effect, but when its blend type is set to 9, they actually look like dense smoke. The reason why I don't want to use this parameter for patch is TR4 has a bug with rendering translucent particles in combination with fog (either bulb or colored distance fog) - their transparent zone gets "infiltrated" with fog colour. I will try to fix this bug as soon as possible. Actually, I think it's the same bug Paolone once fixed in his TRNG, so maybe same patch for TRNG will work normally.

As for extra render subtypes - yes, you can produce absolutely insane effects by combining DirectX blending modes. It could come in handy for some full-screen effects like inverse flashes, vignette, sepia, etc. I only made 3 extra types for two reasons. First, it's only these three modes that are applicable with classic TR "blackness=alpha" scheme, others are only useable for faces without full transparency intended. Second, adding more types will result in complicating code even more (I will need to relocate jump tables for blending mode case switches, to be precise). Right now I don't want to do such complex stuff, until I'll finish TREP version for TRNG, so we can patch both tomb4.exe versions.

Last edited by Lwmte; 09-01-13 at 14:08.
Lwmte is offline   Reply With Quote
Old 09-01-13, 14:45   #57
HeinzFritz
Explorer
 
Join Date: Feb 2006
Posts: 526
Default

Ensi, I am busy experimenting with all those effects. Not all effects do have an obligation to work in all situations. Those that clash with fog may be used in fog free areas exclusively as it is all a matter of level designer's choice. All you have to do is place a warning in TREP like "Can not be used in fog lit areas" or similar. The other DirectX blend modes you mention would be very welcome as they could transform the sober, down to earth atmosphere, associated with the original engine into something more magic and poetic. Does not have to be like in real life at all.
By the way, did you have any luck with the fade-out FE?
HeinzFritz is offline   Reply With Quote
Old 09-01-13, 15:08   #58
TR-Freak
Professor
 
TR-Freak's Avatar
 
Join Date: Jan 2008
Location: Deutschland
Posts: 4,886
Default

I hope it will be compatible with TRNG someday...
__________________
"Your perception of good timing is...bad!"
TR-Freak is online now   Reply With Quote
Old 09-01-13, 16:08   #59
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 32,557
Default

Quote:
Originally Posted by Lwmte View Post
Actually, I think it's the same bug Paolone once fixed in his TRNG, so maybe same patch for TRNG will work normally.
Sounds like the bug that can be fixed with this script:
Customize= CUST_FIX_WATER_FOG_BUG, ENABLED

Right?
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak is online now   Reply With Quote
Old 09-01-13, 22:34   #60
Dustie
Relic Hunter
 
Dustie's Avatar
 
Join Date: Apr 2005
Location: Poland
Posts: 9,209
Default

Gosh, seeing how there's a couple of really skilled programmers who are into Tomb Raider AND are willing to voluntarily spend their time and brain power on hacking the engine, I wish Eidos had released the source code for Tomb Raider... it would have made things comparably easier.
Dustie 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 10:14.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.