Page 1 of 1
Glass window texture for walls like on TEW
Posted: Thu Mar 10, 2016 9:43 pm
by mike8887123
Question:
I want to use the walls that are glass windows like on Enemy Within level 26.
First inquire - Am I allowed or is it the author's special work or something?
Next, how would I add it to a level? I'm guessing it would be like adding a robot mod using an .hxm file. Namely, it replaces that slot. So I could imagine I would have to replace a texture by adding some other kind of file into the hog in the same manner.
Lastly, where could I get the file? Is there any way I could download it?
Its just a thought. I think it would be really cool because one level theme I frequent is a highly technotronic, man made, artificial, space station look with very little natural textures (rock, sand, etc). Its like a space factory. My idea is to have windows where you can look out into space.
Can anyone chime in?
Re: Glass window texture for walls like on TEW
Posted: Fri Mar 11, 2016 7:44 am
by Naphtha
From what I know, the Descent 2 engine allows for glass walls by putting in a "cloaked" wall with a transparency setting. If you're using DLE, you just have to open the "type" menu on the Walls tab, and select "cloaked" from there to get the glass effect. It will look the same no matter what texture is chosen, but you can use the slider to adjust how opaque you want the glass to be. So actually, no custom files allowed for that effect.
Now if you want a specific texture as transparent, then I think you have to make the level for D2X-XL. I think it's the only source port that allows for that. But for standard D2, choosing that wall type and adjusting transparency will be enough.
Re: Glass window texture for walls like on TEW
Posted: Fri Mar 11, 2016 9:48 am
by Sirius
Yeah, the glass in level 26 is just a cloaked wall. The original Counterstrike and Vertigo campaigns didn't use them as far as I remember, but it's a standard D2 feature nonetheless.
Re: Glass window texture for walls like on TEW
Posted: Fri Mar 25, 2016 7:08 pm
by mike8887123
Thanks very much guys!
I tested it out, and it worked. Sweet! Ha I thought it was some complicated mod or something.
And can I ask a question about the texture thing I mentioned too? I've always wanted to find out how to get new textures into the game (for the cubes/walls, not robots). Like I was speculating above, I guess you would just import some texture file into the hog?
I just think it would be cool to have some new textures to build with - or even just change the color of an already-existing one.
Has anybody done this?
Thanks again!
Re: Glass window texture for walls like on TEW
Posted: Fri Apr 01, 2016 9:24 am
by Sirius
Yeah, .pog files are used for that. You need one of them per level that has custom textures, and they generally have to be placed in the mission HOG like you said.
If you're using DLE 1.12.x, there is an "Edit textures (POG)" option in the File menu that lets you replace textures for the current level.
Re: Glass window texture for walls like on TEW
Posted: Sat Apr 02, 2016 5:45 pm
by mike8887123
Cool thanks,
Is there anywhere to download pog mods? I think D2MB is on my computer for possibly making one. I'll check into it, but do you suggest anything? I'd like to start messing with textures soon.
Thanks Sirius - you're very helpful here
Re: Glass window texture for walls like on TEW
Posted: Sat Apr 02, 2016 11:20 pm
by mike8887123
Ok, so I just tried an experiment just to see a texture mod in action
I pulled a pog file out of TEW and imported it into a test hog file. Then I built a small area and used the new textures (I know there might be permission issues with doing this with TEW, but the level is just a test).
Anyway, when I ran the board in rebirth, it was all black. Nothing rendered! What is wrong? I'm going to experiment some more, but can you give your input? I did rename it the same as the others.
Version info coming... and note that TEW works fine so its a problem with me using the pog file in the NEW level.
Thanks
Re: Glass window texture for walls like on TEW
Posted: Sun Apr 03, 2016 9:33 pm
by Sirius
Well, people don't usually plug-and-play with POGs. Typically you replace individual textures - there are a few reasons for this:
1) The POG might have a lot of extra textures you don't need (i.e. you might not be using them)
2) The POG might replace textures you didn't want to replace. If you build your own, you have the flexibility in deciding which textures you want, and also what you replace with them.
3) POGs do not contain palette information. If the POG was created for a texture using the "alien1" palette, and your level uses "groupa", the textures are mostly going to be an unrecognizable mess. You can switch your level's palette to the one used by the POG file using the Settings -> Files panel in DLE.
None of that necessarily explains why you're seeing the problem you're seeing, though. The textures would still render in the game - they just might not be what you wanted. I'm not really sure off the top of my head what the problem could be.
Regarding replacing individual textures: you can open the POG file used by the TEW levels using the same tool I mentioned above - it should have an option to show only the replaced textures (which might be selected by default) - you can then select these and export them as .bmp files, which you can re-import into your own level to replace the textures in there.
Re: Glass window texture for walls like on TEW
Posted: Mon Apr 04, 2016 12:14 am
by mike8887123
I just wanted to note that its not that the texture/face is black. The entire rendering of the game is messed up. The controls inside the ship dashboard are messed up too. The only thing that works is when I fire a guided missile, I can see the level in the small missile screen. The new texture shows there.
Another thing - every time I open the hog file with DLE to edit, the pog is not in the list. So I have to import it again. It just disappears.
I'll try changing the palette in settings. I figured its possible that it could be the problem but didn't try.
Thanks Sirius!
Re: Glass window texture for walls like on TEW
Posted: Mon Apr 04, 2016 7:42 am
by Alter-Fox
I've seen this in a couple of Scorch's levels, but I've yet to figure out how to fix it... sry
Usually it happened if I modified his hxm for testing.
Re: Glass window texture for walls like on TEW
Posted: Mon Apr 04, 2016 5:58 pm
by mike8887123
I think I've figured part of it out.
First I must say that I've got it working! Yaay! But here's what happens: every time I open the hog (rl2) file in DLE (open the level, that is), DLE automatically removes the pog file and an hxm file appears that I did not put there. In fact, I don't even have a single robot in the mine yet. And the hxm file doesn't always appear. The pog always disappears.
To get the pog to stay, I import the pog file, then DON'T open the rl2. Instead, close the program right there. If you need to still edit, then wait until editing is done before importing the pog (or import it again afterward). It seems as if the opening of the rl2 to render the level is what removes the pog.
The black screen had to be a bad copy of the files into the game directory (my fault) - I wasn't keeping track of putting all of them in there before running the level. Not 100% sure, but maybe this was it. Whatever it was, its not happening now.
Lastly, a BIG thanks to all of you who answer my posts. I feel obligated to show my work eventually, but its slow. I work on it as a hobby
Re: Glass window texture for walls like on TEW
Posted: Thu Apr 07, 2016 8:38 am
by Sirius
Hmm... that might happen in older versions of DLE, I wouldn't expect it in 1.12 though.
Re: Glass window texture for walls like on TEW
Posted: Sun Apr 10, 2016 3:18 pm
by mike8887123
In terms of DLE, I have 1.11.69, 1.11.81, and 1.11.90. I pick one based on the zooming for that specific situation. I don't know if I've checked to see if this happens in 1.11.90, but I will. But what is the newest version?
Thanks everyone!
Re: Glass window texture for walls like on TEW
Posted: Thu Apr 14, 2016 10:16 am
by Sirius
The current version is 1.12.27. 1.12 is where the custom texture manager was introduced - while I was making that I also modified DLE's behavior to be much more careful about saving custom textures. It used to throw away anything it didn't see used in the level (dating back to DMB2). When you're using custom textures on robots, weapon effects, and so on, that's just a nuisance.
Re: Glass window texture for walls like on TEW
Posted: Sun Apr 17, 2016 5:50 pm
by mike8887123
Thanks guys,
Sirius, do you know how to edit the source code? I would love to change some small things to help me copy numbers faster out of the boxes, but I'm not sure how viable it is or if I'm even allowed. Is it even something the level creators can do? It could be the case that its free to edit, but then again it might not be. Then I would have to deal with the code after that. And I know its a new topic, but can you perhaps fill me in on this idea?
I should probably start a new thread
Anyway, thanks much for all your help Sirius as well as everyone else.
Re: Glass window texture for walls like on TEW
Posted: Mon Apr 18, 2016 9:11 pm
by Sirius
Yeah, DLE is open-source. I forget exactly where to find the SVN info (used to be on SourceForge but it moved due to some problems with their system I think), but the DLE "product page" has a link to a .7z of the source code. Currently that is
http://descent2.de/files/dle-src-1.12.27.7z
It's written in C++ using MFC, and currently compiles with Visual Studio 2010 (there is a 2008 project file as well but it might not be entirely up-to-date).
I can and do edit the source code for DLE - been struggling to keep up with it lately though. My current project involves making the camera controls more configurable - some people wanted things flipped, others wanted to use different keys, more than a few would prefer just to be able to fly around in the editor using their Descent config. A system to do all the above has proven a little complicated.
Re: Glass window texture for walls like on TEW
Posted: Fri Apr 22, 2016 7:53 pm
by mike8887123
How hard would it be for me to slightly alter my own DLE - such as add a button, even a tiny little thing that would copy each of the x, y, and z values to the clipboard (with spaces between) so I can then paste them into another application? One thing I do is find the normal vector to a plane (the equation) by passing the 9 values (x,y,z for each of the 3 points) to a function I wrote. It also automatically defines the 3 functions x(y,z), y(x, z)...etc. The hardest part is copying the numbers over to the computation program I use (DrScheme).
In terms of C++, I picture the MFC IDE you mentioned to be somewhat similar to VB Visual Studio. I Imagine there are functions for each window control's event like in Visual Basic. So all I would have to do is reference the values in the textboxes, append them with spaces, and then set the clipboard string to them. So I would add a control (like a button) and then define its event function (button.click) to do this.
That's what I picture. But C++ is more confusing to me.
What do you think? And what kind of mathematical stuff do you do in your levels? Just wondering. Its interesting to me. In fact, mathematics is one BIG reason I like making levels.
Thanks!
Re: Glass window texture for walls like on TEW
Posted: Sat Apr 23, 2016 8:59 am
by Alter-Fox
Really? I do it for the art. Never thought of that...
I don't even really use graph paper anymore, if I have an idea in my head I throw it straight into the game.
I should tell my brother though, he's been looking for an excuse to get back into it and he loves math.
Re: Glass window texture for walls like on TEW
Posted: Sat Apr 23, 2016 11:00 am
by Jeff250
mike8887123 wrote:I use (DrScheme).
Nice. (Sorry, I have nothing else to contribute.
)
Re: Glass window texture for walls like on TEW
Posted: Sun Apr 24, 2016 11:25 am
by Sirius
mike8887123 wrote:In terms of C++, I picture the MFC IDE you mentioned to be somewhat similar to VB Visual Studio. I Imagine there are functions for each window control's event like in Visual Basic. So all I would have to do is reference the values in the textboxes, append them with spaces, and then set the clipboard string to them. So I would add a control (like a button) and then define its event function (button.click) to do this.
It's kind of like that, except that I can't promise double-clicking the control on the form designer will add the code in the right place and all of that... you might have to try to follow the example of neighboring code. But for what you're trying to do, it shouldn't be brain surgery at least - you can probably just stick to the UI layer if you want to.
You probably will need to reference MSDN's MFC documentation regularly, though, and you also have to get DLE to build. Which might not be ridiculously complicated, but if you're using a more recent version of VS there might be some tweaks to do - I recall 2013 gave me a few complaints about the use of deprecated ASCII functions, but there was some way to suppress that.
I've occasionally done mathematical calculations for building levels, though some of them I've tried to replace the need to. I recall in FV-24B I was using trig to attempt to make the central platform with the reactor a perfect hexadecagon; in Anthology I did some manual UV projection/scaling to mimic D3's terrain texture alignment (which I repeated in one of the Descent Vignettes levels, although I used a programmatic projector to do it there, which is now built into DLE's texture projection tab); and in TEW for Pinhead, I wrote a little utility in .NET to more quickly calculate the co-ordinates I needed to move a point to to get it onto a sphere, which sounds awfully similar to what you're doing. That was one-way, though - I copied the numbers and pasted into DLE - not vice-versa.
Re: Glass window texture for walls like on TEW
Posted: Wed Apr 27, 2016 9:24 pm
by mike8887123
I have this thing where I bend the surfaces in a way I kind of want by moving a point, and then I calculate where the 4th point should be to make it a planar surface. And I'll sometimes fiddle around with it to get it more where I want it. For me, this is one way to make it not look so blockey and straight. It helps me make better looking caves too. Its a good tactic
Re: Glass window texture for walls like on TEW
Posted: Thu Apr 28, 2016 8:59 am
by Sirius
Ah, yes.
DH used to drag points around in point mode to create more organic-looking caves as well - it worked fairly well.
Re: Glass window texture for walls like on TEW
Posted: Fri Apr 29, 2016 7:35 pm
by mike8887123
At times, I've noticed that my older approach, where I was not so 'well-calculated,' accounted for some things I think are funner or better than my newer and more calculated levels - even though the newer ones are much more structured and advanced. For some reason, I pay lots of attention to the look of the place
Secondly, does anybody know the best place to download the newest DLE? Version 1.12.27, that is. I can search for it, but I'm wondering if there is a site known to be trustworthy for downloading DLE stuff? I forget where I downloaded the other versions I have now.
Re: Glass window texture for walls like on TEW
Posted: Fri Apr 29, 2016 8:23 pm
by Alter-Fox
Right here.
http://www.descent2.de/
Homepage for both DLE and D2X-XL.