Noteme,
actually i mentioned that it has to refresh on the map preview ;)
and yes, i do use the 1,2,3,4 that's where the previews i posted came from, they work fine for me
Printable View
Noteme,
actually i mentioned that it has to refresh on the map preview ;)
and yes, i do use the 1,2,3,4 that's where the previews i posted came from, they work fine for me
ok, I will turn off the distance darkening, and post the previewer the minute I arrive at work.
- ØØ -
oh, also
agree with wossname
i am having no problem with using the current map-ed and previewer
But I want you to have the new camera math class...so you can see if you find more bugs...:)...so I will post it in a couple of hours....jumping in the shower now..:)
- ØØ -
Beta of the Texture Editor :D
So far it just does single Smooth, Sharpen, Solarize, Emboss, Ripple, GrayScale and Invert. The ripple effect has an intensity InputBox, for different ripple lengths. Might be interesting to allow for random ripples.
It uses Get/SetPixel, because I doubt you will need speed for this, as the textures won't be big enough to annoy a user by waiting for it to work. It updates the picture while it proccesses it, so you can see it progress.
As I said, this is just a beta. I'm thinking of including a form for each effect with a preview window (a smaller version of the texture) so you can customize the effect to your likeing.
Also, the ripple effect is only horizontal for now. When I get around to having a form for each effect I'll give the option for horizontal, vertical or both.
Let me know if these are the sort of things you are after :D
PS: Its written in VB6, as thats the best I can do without a new PC (SATURDAY Hopefully! :D)
EDIT: The smooth method is extremely slow. To see how slow it is, give it a try on a small picture. I'll speed this up when I get a chance next
chem
Hmm. Could you move that to the V6 codebank?
I will. I kinda wanted it to be proper first. I put it here for the people making maps for DoomSharp to test and see if they liked it. Then maybe NoteMe would host it in the end.
Or maybe you would implement the filters into the map editor (later on of course) if you wanted.
I'll fix it up a bit then put it in the codebank I suppose.
chem
We appreciate the effort you've obviously put in but we want to concentrate on the game as #1 priority. The map editor is nothing but a tool to assist the game it is #2 priority. I have no plans to add image editing facilities to the map editor. We already have image editors such as MS Photo editor which will do these effects for us.
Generating the artwork for our maps is outside the scope of the project.
Has anyone managed to crash the editor yet? If so then give me details please. I already know of 1 sure-fire way to crash it but I wonder if anyone else has spotted it :D
I am having severe headackes now. I have fixed the distance lighting, and for me it looks like we are rendering 785 primitives, but for some reason, the whole screen is black if I move the camera...NO idea why...grrr...
- ØØ -
Ehhh...wossy? Can you tell me what this is?
[Removed because of frustration]
It is in the
public void DrawPrimitive(Primitive thing)
function....
- ØØ -
I had to add that because there is a bug in the wallpart.distance calculation, it keeps returning numbers greater than 1, which it shouldn't do. I thought it was because your BSP (or whatever it is) is trying to draw objects that are beyond the far plane.
Try commenting out those lines and see what happens. If it crashes in the GetFog() functions then the distance value is not in the range 0f...1f
Yeah it crashed...so we obviously have some more bugs to iron out here. So I gave up on implementing my new stuff into your distance darkening project, and in stead went the other way around and added my new code into the old mapviewer. That way at least it works, even if it will still flicker as much and be just as bad to use as the last one. Sorry guys, better luck next time.
Here it is:
http://www.noteme.com/doomsharp/release/mapviewer2.zip
At least this will give me more time to find out where the bug with distance lightning occours..:)
- ØØ -
What new stuff?
Ehh..what do you mean...your new stuff is the distance lighthing stuff. And my new stuff is the 2 bug fixes with the camera.
- The sudden overflow crash on some coordinates
- The random triangle in front of the camera.
In the new mapviewer we have my new stuff, but not your new stuf. But in the newest versoin of the engine, there we have both, but nothing is working..:)
- ØØ -
Culling.cs is wrong, it must be. The only way that we can get a distance of greater than 1 is if we are trying to draw an object that is further away then the far plane.
Have you made sure that culling is discarding things beyond the FP?
Sorry, Note. Something big with the new map viewer... doesn't even launch the program and I get this error:
Quote:
See the end of this message, instead of this dialog box, for details on invoking
just-in-time (JIT) debugging.
************** Exception Text **************
System.IO.FileNotFoundException: Unable to find the specified file.
at DSMath.Map.FromFile(String path)
at DoomSharp.Form1.Form1_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50215.44 (beta2.050215-4400)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50215/mscorlib.dll
----------------------------------------
DoomSharp
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/David/Desktop/DoomSharp();/map%20viewer2/DoomSharp.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50215.44 (beta2.050215-4400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50215.44 (beta2.050215-4400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50215.44 (beta2.050215-4400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
DSMath
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/David/Desktop/DoomSharp();/map%20viewer2/DSMath.DLL
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Quote:
Originally Posted by timeshifter
forgot to change the tile path..to sec...will just tell wossy somthing..
- ØØ -
Quote:
Originally Posted by wossname
It is not wrong. As I told you, it is not a far plane. It is a shpere. It is a shpere so we can use look up table, so it is an appoximation. And I have two screenies here to show you. The first one, I am rendering, and all values that are outside the imaginary FLAT FOV that doesn exists, are getting a LIGHT colour. So you can see in the end of this tunnel that a whole wallpart extra is drawn.
On picture number two I am setting the lightning to 1.0 for those wallparts outside the imaginary fov. And then you can see they turn dark.
So there is three opertunites here.
- One I do an other pass with by culling, to support a flat FOV instead of a round one. I think this will be stupid since it will just take more time.
- We can just set them to 1.0 as in picture number 2. I think this is a waste of resources too.
- In your distance calculation, calculate m_farPlane as (m_farPlane + 1.99999) or (m_farPlane + 1.99999), then you will support a round FOV too, and the bug is gone, and we don't waste any extra resourses, because we can just say that the FOV is 2 less if that is what we want.
That is at least my 2 cent..:)
http://www.noteme.com/doomsharp/img/img074.jpg
http://www.noteme.com/doomsharp/img/img073.jpg
- ØØ -
Ok, mapviwer fixed...same path.
- ØØ -
OK we do the 3rd thing then...so have you changed the calculation to (m_farplane + 1.99999)?
I'm confused about where the game is right now, is it still broken? Can you upload it to the server by tomorrow afternoon?
I will upload it when I leave work today. I wil NOT do any more improvements today. I will use a couple of hours now to clean up code. I am a little bit confused about the camera still. I am not 100% if 0,0,0 is 0,0,0, on the map after you serialized it. Might be wrong, but it seems weird to me, since if i am setting the camera to position:
0,1,0
and looking in direction:
0,0,1
on the slaghter map, then the screen is just dark. But I have to see if I can find our test map again. If that works out, then everything is as it should be.
Will add the (m_farplane + 1.99999) right now.
- ØØ -
Grrrr...map map00001.dsm isn't working since it was made before the serialization...grr....well. But at least map00002.dsm is working. And it looks good. So I guess it is just Phil that hasn't made any cubes at 0.0.0...at least I hope..:)
So everyithing is good then. Still a lot of variables for me to tune on the culling and the camera class. But at least they are working. But remember that many of my calculations are aproximations. So they can be done fast.
Edit: I forgot to say that I love you Wossy and that your distance darkening make me get goos bumps (SP?) on my dick...in a good way..::)
- ØØ -
Hey w00sy
i've been having a bash at that perspective texture blitting.. hard stuff
but i've got the first part of it working, horizontally its in perspective (the distance in relation to the camera is set as Z to each corner of the quad)
now i need to warp the image onto the changing shape of the quad, and also make vertical z effects work.. and then finally get it accepting many kindsof odd shaped quads..
that's if iget that far LOL... ill keep going and see if i can get it right.. it's actually mainly the warping of the image killing me, im getting the perspective bit working pretty easily, see even to map the poly im drawing one in red first and then blitting over it (easily adjusted to take the blits from calc instead of gdi+)
I'm glad your friend Richard likes it. ;)Quote:
Originally Posted by NoteMe
Phill, are you using unsafe code for this? Thats the only way we'll get even remotely decent performance.
I don't think we really need perspective correct texturing, just as long as the texture fits into the quad that's all I'm concerned about at the moment. Our textures aren't long enough to really look strange.
But we still get problems like this. Look at the left side of the road here.
http://www.noteme.com/doomsharp/img/img067.jpg
- ØØ -
Actually it's in VB.. lol, language most native to me, so i was going to convert and optimize it afterwards or let you do most of that.. although shouldnt be too hard
you don't need perspective? oh.. because an issue i have is finding the initial pixels of the poly, so for now that's just drawn with gdi+ then the image redrawn over that, was hoping to use your original blitting code as the input for it instea dof gdi+ for speed.. although by the time i get it fitting the image in properly it may become independant. Sop basically it's current function is to provide perspective textures, hmm, but im currently working on the 'fitting' in part, so ill work harder on it and see how it goes.
although i thought you already had that sorted.. also, can some pixelation be tolerated for more speed?
I don't think this sort of thing can be written easily in VB because accessing both the source and destination pixels is done with pointers. Any VB algorithm would need to be almost completely rewritten to include pointers.
Note, yeah i'm working on that. Its the same problem we've been having all along.
Nice screeny note, is that from the game or from the previewer?
previewer... one of the ones i posted from phill's map. i think the rest of his screenies are on page 31
We are only on page 20..:D..I have 50posts per page..:D
here the rest are:
http://vbforums.com/showpost.php?p=2...&postcount=914
yeah.. those... i'm on page 34... it makes post race look more impressive.
Oh.. but only the getpixel setpixel stuff.. which i knew was temporary, all the maths to figure out where everything goes remains, so it should be alright.Quote:
Originally Posted by wossname
Ohhhh...****....ehhh...ehhh....Wossy...can you tell me how serialization actualy works, since I have never used it before...I think we have done a big mess out of this now....
What does it actualy store...and how does it make the new object and init the variables?
I guess I can't even add a private member variable now in the camera class without all the maps made crashing...right?
- ØØ -
I am trying to find out how your map editor works with brute force here..:D. But if I make a new blank map and right click one of the dark fields..then it crashes...just as you know..:)..and I hope it is not something I hve done...:)
Now how do I get that texture on the walls..:D
- ØØ -
1. It stores everything (unless you deliberately tell it not to).Quote:
Originally Posted by NoteMe
2. Every time you change the class the old files are no use.
So everyone who is making maps needs to stop doing it right now.
The editor has undergone some low-level changes and now all the old maps are incompatible with the new version.
Bug fixes in new version:
1. right clicking a black square when no cube is selected no longer crashes the app.
2. dragging is now gone, replaced by shift+click and shift+dragging :D (much nicer)
hahaha :D I remember this problem.. can't remember if it was java or whatever language it was.Quote:
Originally Posted by NoteMe
bumpy road there, still need help with it? ;)Quote:
Originally Posted by NoteMe
:lol: we needed help with it last week. :)
This is what I propose for a potential texture renderer function...
A signature of this kind:
Now the textures by this point will be stored in 1 dimensional uint arrays. The textures will have been converted to 32bpp ARGB pixel format first though. This ensures that image.width == stride/4.PHP Code:public unsafe int QuadBlit(int textureNum, Point[] pts)
{
...
}
The pts[] array simply represents the 4 corners of the quad into which the image is being stretched (not interested in perspective correction at this point).
1. (somehow) break up the quad into trapezoids and work out scanline start/stop for each line affected by each trapezoid.
2. loop through all the scanlines and (somehow) calculate the correct source pixel for this destination pixel, then copy the integer over.
This is going to be hard. Yeah we need help :) if you have any to offer I'd appreciate it. Would you be able to describe the theory so i can have a go at coding it myself?
Thanks..
NEW SCREENY AHOY!!!
(Distance darkening bug fixed, culling seems to be much improved too :))
So you managed to get my code to work? Or?
- ØØ -
Man I'm so wasted, I only just realised that its not august any more. I've been writing august on all the backup dates :D
I've fixed it now though.