blaydes99 on 4/10/2006 at 20:08
Quote Posted by Zygoptera
I had already done the hex hunting, by texturing the start box and playing around with the x,y and scaling values. It did not look like a trivial undertaking and would, I suspect, require a decent programmer to do. Unfortunately what I had worked out is stuck on my orphan HD until I get my new computer, otheriwse I'd be happy to share.
So, from what you remember, are the texture references simply raw hex values? Or are textures that are added in the from texture families given a special reference that is used from that point on? DO you recall if the scale and offest values were represented in each face - and was that simply a hex value?
ZylonBane on 4/10/2006 at 20:18
Remember that texture scale directly sets lightmap scale. The Dark Engine might die horribly if they don't match.
On the incredibly remote chance that this actually works, consideration should also be given to adjusting the frame rate for the animated textures. A little-used feature of Dark is that the texture animation rate can be set on a per-texture basis. This would allow for the creation of tech screen textures with much more fluid animation.
blaydes99 on 4/10/2006 at 20:32
Quote Posted by ZylonBane
Remember that texture scale directly sets lightmap scale. The Dark Engine might die horribly if they don't match.
On the incredibly remote chance that this actually works, consideration should also be given to adjusting the frame rate for the animated textures. A little-used feature of Dark is that the texture animation rate can be set on a per-texture basis. This would allow for the creation of tech screen textures with much more fluid animation.
Isn't the lightmap scale calculated when you build the mission? The lightmaps shouldn't cause any problems since they are pre-calculated. Even in the event that the lightmaps do change (which only would happen if something is calculated dynamically), our newer graphics card should be able to take the hit.
Animated textures sound very cool. Most likely, only textures that already are specified to animate will be able to do so. ZB, what is the max fps animation rate?
ZylonBane on 4/10/2006 at 21:02
Quote Posted by blaydes99
Isn't the lightmap scale calculated when you build the mission?
Yes. Lightmap scale is derived directly from (
http://www.ttlg.com/forums/showthread.php?t=108183) the scale of the texture under it. Why? I don't know. But whoever wrote the renderer would have been perfectly justified in hard-coding this correlation. The only way to find out is for someone to test it.
As for animated textures, yes I'm referring to the ones that are already animated-- which when it comes to the tech screen textures, is all of them. Animation rate is specified in milliseconds per frame, so the max rate is way faster than we'd ever need.
blaydes99 on 4/10/2006 at 21:44
I believe you now :) Although, a very important question remains: if we alter the scale of the texture with a hex editor, does SS2 check to make sure that the precalculated lightmaps match the texture scale? (If so, we could simply fool SS2 into thinking that the lightmap was at a smaller scale). So, I don't see why this will be an issue. Since lightmaps are calculated based on texture scaling, changing the texture scale after the fact can't force SS2 to recalculate the lightmaps (especially if it is not done with the editor).
What I'm trying to get at is that the lightmaps will stay the same UNLESS we have unstripped missions to reportalize/lightmap with. Since lightmaps are not calculated dynamically, we will just have to make sure that SS2 likes the fact that the texture scale does not correspond to the lightmap scale.
I will try to test this ASAP and let everyone know if SS2 can handle it if we post-modify an already portalized .mis file.
ZylonBane on 4/10/2006 at 21:52
Best-case, it won't crash. Incorrect rendering of the lightmaps should be a non-issue, since all (well, almost all) tech screens are set to render fullbright ("unlit" in DromEd parlance, IIRC).
blaydes99 on 4/10/2006 at 22:01
Yes, I think that it will work. What I would like to do (unless someone has some free time and ShockEd available) is to simply open a small sample mission (or create a 1 room mission) and change the texture scale of single terrain brush. Then, save a copy and compare it to the original to see which value(s) has changed (done with a hex editor, or perhaps oxygen, etc.). It will probably simply be a hex value that decrements by 1. The key is to simply understand in what format terrain brushes are represented, as well as which values that follow this reference represent offsets, texture family/ref, etc.
Zygoptera on 5/10/2006 at 05:09
Quote Posted by blaydes99
So, from what you remember, are the texture references simply raw hex values? Or are textures that are added in the from texture families given a special reference that is used from that point on? DO you recall if the scale and offest values were represented in each face - and was that simply a hex value?
I don't know about the textures- I'm pretty certain that their references had already been worked out for cowgen. In fact quite a lot of useful stuff might have been worked out for cowgen. All IIRC, the scaling/ UV did not appear to be a simple hex value equivalent, but were at least fairly discrete- changing a scale only made one change in one small area. It seemed to be buried amongst something I believed to be the lightmaps, which were pretty large and featureless. I couldn't work out a pattern. I also don't think I found any obvious 'identifier', ie it wasn't obvious which brush number the change referred to.
I'd suspect the texture animation rate to be an engine, rather than a mission, component.
Nameless_Voice on 5/10/2006 at 12:31
Didn't telliamed write a tool to parse a mission file and automatically change the scale/alignment of textures?
I think it only worked on unstripped missions, though.
I'll see if I can find the thread...
Ah, here it is:
(
http://www.ttlg.com/forums/showthread.php?t=99863)
Quote Posted by Kolya
Nameless_Voice also noted on IRC that a terrain texture update would be incompatible with any FM and any mod that replaces the mis files. :erg:
I'm sure it was Ravenlord who pointed that out, not me...
ZylonBane on 5/10/2006 at 15:25
Quote Posted by Zygoptera
I'd suspect the texture animation rate to be an engine, rather than a mission, component.
Animation rate is a texture property (like its material type, and so forth), so where are those stored? The MIS or the GAM?