Sledge (Hammer Alternative) Alpha Build Created 11 years ago2013-07-27 02:24:39 UTC by Penguinboy Penguinboy

Created 11 years ago2013-07-27 02:24:39 UTC by Penguinboy Penguinboy

Posted 10 years ago2014-01-05 06:58:09 UTC Post #317367
Thanks Alberto for helping to spread the word :)
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-01-05 07:33:34 UTC Post #317368
Thanks Alberto for helping to spread the word :)
It was a great pleasure, PB. :) You deserve it. Your hard work should be rewarded in some way. No? ;)

You should also create a FaceBook page or a Twitter profile to gain more visibility imho. :3 I can help you doing it, if you want.
Alberto309 Alberto309weapon_spaghetti
Posted 10 years ago2014-01-05 09:56:52 UTC Post #317370
i heard that u r going to add multiplayer in sledge? :)
Posted 10 years ago2014-01-05 10:17:06 UTC Post #317371
Multiplayer? Now I don't know how that would help, but distributed computing would definitely be something badass.

Are you going to integrate Twister features? That would rock!

[EDIT] Hah, maybe Penguingboy is going to attract some Valve eyes around here!
Striker StrikerI forgot to check the oil pressure
Posted 10 years ago2014-01-05 10:32:13 UTC Post #317372
i mean mapping in coop
Posted 10 years ago2014-01-05 10:48:09 UTC Post #317373
That's in the "future possibilities" section, and definitely not something that will be added any time soon. It would be pretty cool, though!

@Striker: I plan on adding Twister stuff either as a plugin, or as an expanded implementation in the displacement editing tools.
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-01-05 12:05:05 UTC Post #317374
I've just registered on this site, to report about this bug with Sledge.

It crashes when I start a new map.
I've configured it for my GoldSrc > Counter-Strike 1.6. And as far as I know, the configurations were proper and there were no mistakes.

I've also sent a report. If you want, take a look at the screenshots: (Open it in a new Tab to view its full size)
User posted image
Posted 10 years ago2014-01-05 12:12:17 UTC Post #317375
What model is your graphics card? If it is an older card, go into the settings and change the renderer option the second choice (OpenGL 1.0 Display Lists), this will use an older version of OpenGL that should work for you. If it's a newer card let me know the brand, model and what version driver you are running and I will take a closer look.
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-01-05 13:27:29 UTC Post #317376
This is my Video Card/Graphics Card information:

Memory: 256MB Graphics Memory
Driver: Intel Graphics Media Accelerator Driver (Updated)
Adapter Type: Intel Q965/Q963 Express Chipset Family
I don't think that there's an additional Video card such as NVIDIA.

This is all I know. I'm using Win7 32-Bit Ultimate.

And I don't know from where to change the OpenGL rendering option.
Posted 10 years ago2014-01-05 14:45:54 UTC Post #317377
I finnaly got Sledge working fast. My Nvidia GeForce 5200 with 128mb graphics card now works great. Not sure if I changed something important but now it is running like a treat.
Posted 10 years ago2014-01-05 16:18:05 UTC Post #317378
Hey Penguinboy, how would you feel about maybe adding support for other games somewhere down the road? I'm thinking specifically about the original Quake, there's still a small but thriving enthusiast mapping community for that game (much like with Half-Life), and I think a new, feature-rich level editor would be very welcomed there as well. And seeing as Goldsource was derived from the Quake engine, there might not be much in the way of compatibility issues or workload (not that I would know anything about that though).
Posted 10 years ago2014-01-05 17:22:29 UTC Post #317379
Textures are loaded differently, individual files instead of .wad's.
Other than that and some entity stuff its about the same.
Quake mappers use (Q1,Q2) QuArK which works very well and not so much with gs.
rufee rufeeSledge fanboy
Posted 10 years ago2014-01-05 18:12:18 UTC Post #317380
Someone pointed me to the FPSBanana release of this and I found my way here. The software looks pretty impressive from what I've seen so far (though I need to install HL1 to test it out properly :P).

The main reason I'm posting here is that I'm also in the process of building a custom cross-platform Hammer-style editor with the Qt framework. It's called Crowbar and is something I've been doing bits and pieces on around uni since last summer. From the looks of Sledge I'd guess I'm not quite as proficient a programmer as you are, but I figured it might be useful to let you know that there's another person out there with a similar vision, in case we could co-operate further down the line.

In case you're interested, GitHub page is here and the thread I've been using at TF2Maps.net is here.
Posted 10 years ago2014-01-05 18:33:55 UTC Post #317381
You know what would be exceptionally useful? An online BSP viewer.
Striker StrikerI forgot to check the oil pressure
Posted 10 years ago2014-01-06 01:17:28 UTC Post #317382
@GamerX: Unfortunately your graphics card only supports OpenGL 2.0 (not 2.1), but Sledge will still work for you - in Sledge, before you open a map, go to Tools > Settings, and on the first tab you will see a drop down for "Renderer". Select the middle option and save the settings, then try to open a map again.

@kaffikopp: Currently I'm only looking to support Goldsource and Source, but I'm not opposed to supporting additional formats later if there is demand for them.

@ciba43: I was able to downgrade the required OpenGL version to 2.1 (from 3.0), and Wiki seems to indicate that the FX 5200 supports up to OpenGL 2.1, which probably explains why it is now working for you! :)

@x6herbius: That's really cool, I had a read through your thread and it looks as if you're well on your way with the theory (much ahead of where I was after 7 months working on my editor!), but you haven't done a huge amount of code yet.

You're more than welcome to look at the Sledge code and use that to inspire your implementation, and of course I would love if you were interested in helping out with Sledge itself! No pressure of course :P (but it sure would be nice to have someone working on Source stuff in Sledge parallel to my efforts in getting Goldsource support complete!)

Your thread has lots of good ideas and I hope you don't mind if I borrow some of them in the future. I saw you were focusing on portability (hence using Qt), Sledge is theoretically portable with Mono but I haven't had the chance to get it working properly on Unix-like systems yet.

Whether you are looking at Sledge code or trying to work out some detail for your own implementation, feel free to drop me a line and I will try to offer some advice. Hopefully I can save you some of the time it took me to work out some of the annoying tricky details of implementing an editor! I was especially interested in your discussion about VBO's and shaders - I've just finished such an implementation myself and would be happy to offer some advice if you are interested :)

@Striker: It would be possible with WebGL and some server-side preprocessing (I wouldn't want a browser to be parsing 50mb+ BSP files and JavaScript isn't great for reading binaries), but how useful would it really be? It wouldn't be able to show any textures due to copyright, and it would require the BSP to be uploaded to a server for processing. The most you would get is shaded polygons and a freelook camera, which I admit would be pretty neat, but is that really any more useful than uploading screenshots instead? I guess you could do the same thing with RMF/MAP/VMF as well, but still...
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-01-06 11:41:51 UTC Post #317384
Thanks PB! It worked for me! :)

I'll let you know if any other problems occur.
Posted 10 years ago2014-01-06 14:46:55 UTC Post #317385
Just had a crash trying to use the model/file browser interface in entity properties. This is replicable.
Notewell NotewellGIASFELFEBREHBER
Posted 10 years ago2014-01-06 20:24:58 UTC Post #317388
Just had a crash trying to use the model/file browser interface in entity properties. This is replicable.
Same.

monster_generic, cycler and cycler_sprite makes Sledge crash after double clicking the "models" folder in the file browser, and sometimes also by selecting the model.

Does the older versions already had this problem? I've never tested that.
Alberto309 Alberto309weapon_spaghetti
Posted 10 years ago2014-01-06 21:13:28 UTC Post #317390
Does the older versions already had this problem? I've never tested that.
No.

And yes, browsing for a Model/Sprite, makes the Sledge crash. And it looks like that there's a fault in clr.dll file, as Error Eventlog said.

Other than that, I just noticed a problem, by having more than one FGD files, and if they have the same entity, they all are duplicated on the entity selection list. In Hammer 3, this wasn't like this. But if there are two or more entities of the same, only one of them is listed.

Other problem is that env_glow's Sprite selection's Browse button is not available, but manual path (type box) is available. This should not be like this according to Hammer 3.

This 2 problems I noticed for now.
Posted 10 years ago2014-01-06 23:28:43 UTC Post #317393
Thanks for reporting the issue with the model browser, I will try and replicate it tonight. As for sprite browsing, it hasn't been implemented yet (sprites don't render in the 3D view yet, either).
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-01-07 12:22:20 UTC Post #317407
btw. dimension's label does not update/refresh in real time when u change the cube sizes
Posted 10 years ago2014-01-07 20:59:17 UTC Post #317413
Hey there PB.

I was having a friendly discussion with a GameBanana member. As he replied to someone that was wondering if real time lighting rendering could be possible in Sledge:
With the way that source engine does lighting I can almost guarantee you that real time rendering of lights will never happen.
And then I replied:
Well, this could be debatable. As some of you knows, the Unreal Engine renders in real-time every change you do in the editor (CSG process for brushes, and meshes, included). The only thing a Source or GoldSource Engine mapper might be interested in, is the real-time rendering of every light entity (light, light_spot, light_environment, etc.), and of course, shadows.
Now, if we create the basic "hollowed room" with one light entity inside it, this will took 3/4 seconds to compile on Hammer 4 even on a Pentium 4 CPU. As the Unreal Engine does, it renders lights and shadows only if we select the "Build only lights" option (and some of the other ones of course, like "Build all"). And it renders the current light entities (in this case) in the map, so it doesn't takes much time to do it (few seconds) if we select that option everytime for each light we add.
Long story short: a preview of rendered lights and shadows, maybe at a lightmap value of 32 to decrease some rendering time, it should be possible imho (at least on Source). Despite that the Unreal Engine creates the playable map file immediately as the same file is the one we edit in the editor, a different file could be created for the only purpose of saving the lighting preview in the editor (Sledge, in this case), leaving the BSP intact. This could (and should) save a lot of precious time to the mapper. And, I repeat, it should be possible IMHO.

Sorry for my embarassing english btw. I hope you've understood what I wanted to say.
Now, since you are the Sledge's Boss here. Is this possible? Keep in mind that I don't want to be right, I'm just curious. So I thought that asking this to you should be the best thing to do.

Thank you in advance.
Alberto309 Alberto309weapon_spaghetti
Posted 10 years ago2014-01-07 22:51:21 UTC Post #317414
For a few lights yes its possible with todays hardware, but more complex maps and more lights will end you up in the same place where you are now waiting 10mins for rad to finish. There is a reason we compile.
rufee rufeeSledge fanboy
Posted 10 years ago2014-01-07 23:04:05 UTC Post #317415
Ok for this, but what if the map editor renders every light as soon as the mapper adds one to the map? This will make the render time everytimes faster, am I right? Or will it be different because RAD needs to rebuild each light to "renew" the whole map lighting?
If so, how the Unreal Engine can do this? Maybe it's possible to change the editor's rendering mode to a different one, like on a 3D model editor, without using RAD.exe. Just speculating, of course.
Alberto309 Alberto309weapon_spaghetti
Posted 10 years ago2014-01-07 23:26:27 UTC Post #317417
Even if the time to compile lights was acceptable (it isn't, as rufee pointed out), it wouldn't be all that useful for Sledge because it doesn't have any concept of what to do with a BSP. To get something like that going, you would need to re-implement the entire Goldsource renderer in Sledge to replicate the results, but as you can imagine that's not a very realistic task. That gets even worse when you consider Source compatibility, dynamic and projected lights, and so on.

The alternative is to fake a lighting system to approximate the results - instead of using the RAD process to generate lights, they are rendered in real time using a custom Sledge implementation. It wouldn't look exactly the same as the compiled result, but it should be close enough so it would still help when placing lights to get a general feel of what the lighting looks like. This is similar to how Hammer 4's "raytraced lighting preview" behaves, if I recall.

However, lighting, shadows, and all that kind of stuff is much too complex for me at the moment as I have no experience in those areas, and I know that they are reasonably difficult concepts in 3D rendering. It's possible to add something like that, but I doubt it will be added any time soon simply because I have more important things to work on.

Unreal Engine, Unity, Crytek and other modern editors get proper lighting support out of the box simply because they don't use precompiled lighting anymore, and their editors have the actual engine embedded into the application. Sledge doesn't have that kind of advantage.
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-01-08 00:06:21 UTC Post #317418
So i tried this out today. I love it overall, and its more cusomizable and smoother than Hammer.

However, I missed the Apply Texture button in the tool palette. I didn't realize how much I used it until it was gone.

Also, remember that trick where you alter the raw text data in an .map file to angle the geometry and texture in a fitting way? Is there a way to make this a legit editor thing?
Rimrook RimrookSince 2003
Posted 10 years ago2014-01-08 01:24:18 UTC Post #317419
You can still apply the texture using the Shift+T shortcut, it's not really an interactive tool so I didn't want to put it on the main toolbar. I could add it to the top shortcut bar though, or perhaps put the a button next to "Browse" and "Replace" on the texture box on the right side, would either of those be good enough?

Could you go into more detail about the texture trick, I think I sort of know what you mean (manually editing texture axes), but I've never heard of this specific trick. I'm curious to know more!
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-01-08 14:55:30 UTC Post #317426
The alternative is to fake a lighting system to approximate the results - instead of using the RAD process to generate lights, they are rendered in real time using a custom Sledge implementation. It wouldn't look exactly the same as the compiled result, but it should be close enough so it would still help when placing lights to get a general feel of what the lighting looks like. This is similar to how Hammer 4's "raytraced lighting preview" behaves, if I recall.
This. It would be awesome!

Maybe in the future you'll be able to find someone that can help you achieve specific things like this (maybe via custom plugins?) if you want to allow it, of course. :)

By the way, thanks a lot PB for your reply.
Alberto309 Alberto309weapon_spaghetti
Posted 10 years ago2014-01-08 16:45:24 UTC Post #317427
Wow, that light system would be great, even as plugin. But right now, Sledge should evolve to enough level to do that. (Sounds like Pokemon. I meant the evolving:D)

Also I will do my best to try each new version.
Posted 10 years ago2014-01-08 21:18:11 UTC Post #317437
Also, remember that trick where you alter the raw text data in an .map file to angle the geometry and texture in a fitting way? Is there a way to make this a legit editor thing?
I think I sort of know what you mean (manually editing texture axes)
I never knew this was possible either, I'd like to read more on that too. It also gave me an idea.

Would it be possible to specify a rotation/skew angle for a texture by picking two points in the selected face? In the way the ALIGN command works in Autocad, if you use it. I can provide a mockup screenshot if this description is not too clear.
Posted 10 years ago2014-01-09 00:50:57 UTC Post #317438
I think it was Bruce maybe that shown it. I remember there was a screenshot of a really smooth curved water canal in goldsource.

I think it'd be a modification of the texture lock, since with that on, you can achieve the effect when you scale the brush, but when you release the mouse it goes away. (not available atm to make screens of this)
Rimrook RimrookSince 2003
Posted 10 years ago2014-01-09 01:46:30 UTC Post #317439
Sledge has the "texture scaling lock" feature from Hammer 4, it's not 100% accurate but it makes a best guess to retain texture coordinates when scaling solids.
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-01-09 02:14:07 UTC Post #317440
Wow, that light system would be great, even as plugin. But right now, Sledge should evolve to enough level to do that.
Of course! I just keep throwing ideas at the screen in hope that PB picks up at least one. :D xD

And yeah, it should be really cool even as an external plugin. :3
Alberto309 Alberto309weapon_spaghetti
Posted 10 years ago2014-01-11 02:45:01 UTC Post #317462
Ok I tried it for the first time. The performance while exploring in 3D is exceptional, I hope it's like this on the desktop too( testing under Intel HD4000 right now).

But what's keeping me from using it is the weird behavior of textured surfaces. The textures on different objects cut through one another and while moving around the map they move like a scanning effect.
Striker StrikerI forgot to check the oil pressure
Posted 10 years ago2014-01-11 03:14:54 UTC Post #317463
Can you post a screenshot?
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-01-11 12:27:48 UTC Post #317465
User posted image
Also, at last I know your name.
Striker StrikerI forgot to check the oil pressure
Posted 10 years ago2014-01-11 12:36:28 UTC Post #317466
Is it like that on every map? Can you try switching the renderer in the first tab of the settings and restarting?

It kinda looks like the z-fighting effect you get when two faces overlap. All those faces wouldn't happen to be overlapping, would they? :P
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-01-11 12:39:59 UTC Post #317467
It does happen on every map. It's like those zig-zaggy lines that can be seen when walls meet exacerbate when seen from a distance.

Yes it seems like the faces overlap but no, the texture that is protruding from the back is actually from the opposing face of the solid.

I can switch the renderer, but I only have the option to switch to solid texturing and wireframe. Who maps in that mode? :P
Striker StrikerI forgot to check the oil pressure
Posted 10 years ago2014-01-11 14:32:25 UTC Post #317468
I mean the renderer in the first tab of the settings window, you can switch between OpenGL 2 and OpenGL 1.

Anyway, I've actually noticed that effect before on my laptop that has an Intel graphics card, so it's probably caused by Intel's implementation of OpenGL. Google isn't telling me about any immediate solutions so I will need to look around to see if there is a fix.
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-01-11 16:02:38 UTC Post #317469
Ok, I forced Sledge to use the Nvidia GPU, and the problem is gone.
Striker StrikerI forgot to check the oil pressure
Posted 10 years ago2014-01-11 16:26:19 UTC Post #317470
I'd be interested in learning how you structured the brush objects in order to make it easy to apply geometric operations. The implementation I'd considered was having brushes contain "faces", which contain coplanar triangles, which in turn contain three vertices each. This would make it easy to group triangles by face, aiding in face picking, texture manipulation, etc., but would make things like vertex manipulation very difficult as the neighbours of the triangles being changed by the vertex manipulation would constantly need to have their normals checked to see whether the changing triangle was still coplanar, and if not new faces would need to be added, or the triangle merged with a different face if it became coplanar, and so on.
Posted 10 years ago2014-01-12 04:55:14 UTC Post #317472
Sledge stores the faces as a series of sorted vertices on a plane, and only creates triangles when it's time to render. You'll probably need to do the same thing, especially when implementing displacements, where the brush vertices are completely unrelated to the vertices of the displacement that you are actually rendering. You can take a look at the implementation here.

Edit: Good news for Intel graphics users, I was able to resolve the weird artifacts that Striker was experiencing (well, it's fixed on my laptop running an Intel HD 3000 GPU). It'll be fixed in the next version. Turns out that Intel graphics works much better with a 24-bit depth buffer instead of the default value of 16 that I was using. As a bonus side effect, it should slightly improve the rendering accuracy on all other platforms as well :)
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-01-12 11:23:16 UTC Post #317473
Not to mention power consumption on laptops :D
Oh yeah and what will the plugin API look like, will i have to code everything in C# ?
rufee rufeeSledge fanboy
Posted 10 years ago2014-01-12 11:40:28 UTC Post #317474
I'm considering allowing plugins in the form of Python scripts but I'm not sure yet. Most likely the plugins will be in the form of .NET DLL's written in C# or VB.
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-01-12 13:37:10 UTC Post #317475
Neither of which i know :(
rufee rufeeSledge fanboy
Posted 10 years ago2014-01-12 14:15:56 UTC Post #317476
User posted image
Striker StrikerI forgot to check the oil pressure
Posted 10 years ago2014-01-12 16:44:29 UTC Post #317477
Its probably oversimple for me :D
EDIT: Ok first test for sledge, took me a while to find the camera tool :D Icon is confusing

moar EDIT: pushing enter while in vertex manipulation mode throws an exception
rufee rufeeSledge fanboy
Posted 10 years ago2014-01-12 19:46:20 UTC Post #317481
Relevant XKCD'ing is one of the greatest joys you can have on the internet. Facebook comments, reddit threads and now mapping forums - Relevant XKCD'ing is always an option.

Pengy, consider putting a paypal donate button on your Sledge website!
Archie ArchieGoodbye Moonmen
Posted 10 years ago2014-01-12 20:38:25 UTC Post #317482
@Archie: Sledge is a hobby project that costs me nothing to host or maintain. The best donation anybody can give is to use the program, report bugs and missing features, and help spread the word :)
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-01-12 21:44:21 UTC Post #317483
hey PB, we spoke via email the other day. i had the issue with 'illegal characters' in sledge. i finally got all my wads working EXCEPT for one, im not sure why.

anyway i did a little mapping and found a few buggy things as well as thought of some ideas. im not sure if these issues were addressed, i went through most of the pages briefly and didnt see anything i dont think.

ISSUES I HAD:
  • When opening the Object Properties box WHILE IN FREE FLY MODE (i.e. pressing Z in the 3D window) the cursor disappears and my WASD movement gets 'translated' over to the Object Properties box. what i mean is if im flying around my map with the box open, i start to see all the inputs start to be typed into the OP box. and like i said the cursor is invisible so i cannot close the box unless i TAB through the options. Doesnt sound like thats how it should be :o
  • Another problem i had was when trying to use the vertex tool. even with "merge overlapping vertices" set to auto (and even when i press the lil button), they will not merge and im left with invalid solids. again im not sure if these have been brought to ur attention already.
  • A third thing ive noticed is even when i set the default grid size to 16 (from 64) in options and save/apply it, every time i load up Sledge after closing it the grid is back to 64 units. Not sure why it wont just stay at 16 after setting it :z
  • This may just be my own ignorance but i cannot seem to get my models to show up in 3D view. perhaps i didnt set something up correctly. if you can give a brief rundown on how to do that thatd be swell!
  • Another thing im not sure how to do is get sprites to work with Sledge, for entities like light_env (its not a sun for some reason) and things like that.
i think that's everything ive been having issues with (besides the 1 wad file that still gives me the illegal characters error when i try to use it).

MY SUGGESTIONS:
  • Like in Hammer 4, double clicking a brush or entity should bring up its properties menu.
  • Perhaps you should include a texture filter that filtered by a specific size. like if i wanted to ONLY include textures with a width/length of, say 16 (for trims or stairs), etc. i know there is a SORT by size but sometimes i just wanna look at certain sizes. just a thought!
  • Make it so that when you click the texture application icon a second time the texture box closes (like in hammer 3.5).
hmm thats all i got for now! i LOVE this program and hope itll be nice and bug free soon ^^
You must be logged in to post a response.