March 28, 2024, 02:46:01 PM

Username
Password

Pages: [1] 2   Go Down
Print
Author Topic: Map Viewer questions  (Read 16083 times)
0 Members and 1 Guest are viewing this topic.
crash
Developer
*
Offline Offline

Posts: 59


View Profile
« on: October 03, 2013, 06:49:29 PM »

I have a few questions for the author of the Map Viewer(Rob?).  I have been messing around, trying to get a C# engine going, and I am having problems rendering.  Using your tools and looking at your project, I still cant get the base to look right.

In b101, for the tree groups are you using the mesh part's texture name to toggle the color keying?  Can you describe how you render the base, _gtregp1 in particular.  The black color key is giving me trouble.  How do you handle the transparency?

https://dl.dropboxusercontent.com/u/21362347/tregp.png

 Are you using the shd file in the map viewer to draw the shadows on the base? Or the heights and macroblock from the prj terrain section?

The attr block is listed as being packed 2 to a byte.  Can you post a pic of your attr block and terrblock (as bmp?) so I can compare?  My attr doesn't look quite right.

Here is a screenie from my engine.

https://dl.dropboxusercontent.com/u/21362347/current%20100313.png

Oh, and thanks to everyone keeping this game alive.
Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2268



View Profile
« Reply #1 on: October 03, 2013, 07:39:24 PM »

Hi and welcome!

I think that is Mikademus' Dark Omen Map Viewer which doesn't know to make the black edges of the 3d trees become invisible, like the original game engine does.

Ghabry is the only live modder that continues to help me with new Height Map Generator that we do make the ATTR block identical to the TERR block, as far as I can remember.  

Please keep posting your progress as sounds a cool project.

Smiley

Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
crash
Developer
*
Offline Offline

Posts: 59


View Profile
« Reply #2 on: October 03, 2013, 08:46:01 PM »

Here is an older pic that better illustrates my problem.

https://dl.dropboxusercontent.com/u/21362347/first%20try%20terrfx.png

Clipping out black leaves the top see-through, and I have no idea what is causing that line on the edge.  I am currently changing the technique according to the texture name, because I don't want to see through the black on the base.


PS How can I get a pic to appear on this thread?
Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2268



View Profile
« Reply #3 on: October 03, 2013, 08:49:08 PM »

i use imagshack.us and then copy and paste the embedded image link

Also try Rob's BTB Editor that displays an image of the TERR block

http://en.dark-omen.org/downloads/1.-modding-tools/1.-map-editor/index.html

Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
Ghabry
Developer
*
Offline Offline

Posts: 1020



View Profile
« Reply #4 on: October 04, 2013, 01:51:56 AM »

Sorry, can't help you with this.
I usually don't do 3d programming. You actually have better results then me. I never could even get the base display correctly Wink

Do you plan sharing the source later? Would be good a good starting point in case someone wants to write a 3d editor.

You can also upload the images as an attachment.
Logged

Rob
Developer
*
Offline Offline

Posts: 13


View Profile
« Reply #5 on: October 12, 2013, 03:55:28 PM »

Hi Crash,

The author of the map viewer was Mika, who hasn't been around for quite a while.

Colour key transparency is a really old way of doing this effect and I doubt that modern cards would support it well.  You'd probably be best to create a new texture with an alpha channel and manually set this to transparent if the color from the original texture matched the colour key.

You could then render with alpha test turned on (don't know how you're doing it now).

If you're trying to make a 3d editor or remake, I have some old C# libraries that you may be able to use to find out how some of the undocumented formats work: https://docs.google.com/file/d/0B8yyPPq-QlxtQndmZ29OckpacG8/edit?usp=sharing

Good luck!
Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2268



View Profile
« Reply #6 on: October 12, 2013, 11:19:06 PM »

Not sure it will be of help but here is NewBoids Test Engine, created by original Dark Omen programmer Andy Buchan, that i found years ago to share to help kick start our combined mod projects. It can load Dark Omen level .PRJ files ->

http://www.mediafire.com/download/i2d7d47f869cgpe/NewBoids.zip

and his C++ Source Code

http://www.mediafire.com/download/snlo7j6e6b75rdf/NewBoidsSource.zip

I think it was of some help in understading .PRJ but only up to the INST block and not the harder TERR height map stuff.

Smiley
Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
crash
Developer
*
Offline Offline

Posts: 59


View Profile
« Reply #7 on: October 21, 2013, 08:13:05 PM »

Thanks for the other projects.  They will be a lot of help.  I was surprised to see that they might have used boids in DO, that would have been new stuff at the time. 

For the base mesh I set the effect for the meshpart based on the texture name, and it works ok.  The problem I was having was easily solved once I added the textures to the project again.  XNA4 uses premultiplied alpha by default, and I had a texture set to turn that off,  which caused the weird looking render.  Tore my hair out for a week before I figured that out.  Going forward, the easiest fix for that and the trees would be to keep clipping the black (0,0,0) and change the color of the black I want to keep to a different shade like (8,8,8).


* minwid.jpg (152.07 KB. 497x465 - viewed 910 times.)

Logged
crash
Developer
*
Offline Offline

Posts: 59


View Profile
« Reply #8 on: October 21, 2013, 08:21:30 PM »

Here are some projects for loading the dark omen files.  Be warned, I am not a qualified software engineer, so if they cause a Conflagration of Doom on your house, don't blame me.

   To run these projects, you will need Visual Studio 2010.  The Express edition is fine.

ParsePrj   This MIGHT need the terrain and attribute blocks fixed.  Export images of them to see.  Modeled after the files in the do projects from your tools section.  However, this does not match the .cs files from the earlier post.  So, check it out, and post if you find out.

ParseBtb

ParseShd   can export images of shd files

unitcreator   load arm files.  when saving, the file size is the same, but the file    is a little different because of junk in the strings.  I did not fix because i planned on making my army file format a little different.

These projects don't do much other than save and load the dark omen files, but they should be a good start.  olly, can you post this zip in your tools section?

https://dl.dropboxusercontent.com/u/21362347/open%20d%20o%20files.zip


Here is a 2d project I am using to help me figure out Astar pathfinding.  It looks like I will need to use multiple grid sizes for the regiments.  In addition to VS2010, for this you need to have XNA GameStudio 4.0 refresh.  If I left the files in the bin\Release folder, you can just get the XNA 4 redist to run(assuming you have DotNet 4.0).

https://dl.dropboxusercontent.com/u/21362347/unitmovetest2d101913.zip

Here is a sample of my current progress.  Yes, the camera is jerky, and there are garbage collection stalls, but I am in the middle of another disaster, so they will have to wait.  You need the XNA 4 redist to run.

https://dl.dropboxusercontent.com/u/21362347/xotest101513.zip
« Last Edit: October 21, 2013, 08:56:28 PM by crash, Reason: added files » Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2268



View Profile
« Reply #9 on: October 21, 2013, 10:01:23 PM »

Awesome progress, well done. Have downloaded and can't wait to test. We will upload to tools section later this week and please keep the posts coming!

Smiley

Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
Ghabry
Developer
*
Offline Offline

Posts: 1020



View Profile
« Reply #10 on: October 22, 2013, 09:45:37 PM »

In case you havnt already noticed it:
You can take the mapping for the ARM files (e.g. which values means which banner, sprite or item) from the database.xml that I ship with Wh32Edit.

Will check out the other files later, nice work, currently on vacation Wink
Logged

crash
Developer
*
Offline Offline

Posts: 59


View Profile
« Reply #11 on: October 24, 2013, 06:46:18 PM »

Oops!  I was in a hurry and made a serious mistake.  The path to get the arm files was still hardcoded, so the last listing will crash and make you mad. Angry  Delete that, and use this instead.

https://dl.dropboxusercontent.com/u/21362347/XOmen102413.zip

Like the other project, you will need dotnet 4.0 and Xna 4.0 refresh redistributable to run.

Sorry.


* 102413.jpg (190.13 KB. 554x499 - viewed 920 times.)

Logged
crash
Developer
*
Offline Offline

Posts: 59


View Profile
« Reply #12 on: October 24, 2013, 06:51:42 PM »

Thanks Ghabry for permission to use your database.  Is there a way you could post the file for the army stats.  The link on the wiki didn't work.
Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2268



View Profile
« Reply #13 on: October 25, 2013, 02:20:19 PM »

I'm hoping that Ghabry will still have the Regiment data list from http://wiki.dark-omen.org/do/DO/ARM as wasn't in my Archives, although I think Mikademus created it so I can always email if required.

My modding pc doesn't have a compatible graphics card to test your creation on (probably not Dx10/11 for high def as its an Nvidia 7800GTX that allows Dark omen to run in 3d on Win7) so will try my new gaming pc (Nvidia Titan 6GB and Hex Core Intel 4.2GHZ) which should work.



Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
olly
Global Spokesperson
*
Offline Offline

Posts: 2268



View Profile
« Reply #14 on: October 25, 2013, 03:09:06 PM »

Very cool indeed! Works fine on my new Win8 pc



Many thanks, a battle editor/remake keeps me awake at night, thinking of such a great possible future.

Smiley
Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
Pages: [1] 2   Go Up
Print
Jump to: