Lazarus

Programming => Graphics and Multimedia => Graphics => Topic started by: Akira1364 on June 05, 2016, 12:46:41 am

Title: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on June 05, 2016, 12:46:41 am
For anyone that isn't aware, in 2013 JuhaManninen (a moderator here, i think) ported DeleD (a simultaneously powerful and impressively easy to use 3D level editor/modeller) from Delphi to Lazarus. Originally it used dglOpenGL with a custom "TOGLForm" class that was native to the application. As far as I know he did get it 100% working with the original method of rendering, but then after beginning to attempt to move it over to use Lazarus' TOpenGLControl he stopped working on the project for one reason or another. So it's pretty much been entirely stagnant for the past few years with the TOpenGLControl implementation very much not working at all. I decided to pick up where he left off a couple of weeks ago, and I'm happy to state that I've pretty much got the entire application "working as intended" with TOpenGLControl (as in no more dglOpenGL anywhere.) I don't think I'm quite ready to post the updated codebase anywhere yet, but I certainly will once I get it cleaned up a bit more. Apart from getting it to work with TOpenGLControl at all, other significant changes I've made are:

-Replaced all of the outdated SendMessage and PostMessage stuff with proper LCL event handlers
-Fixed the Raytracer and Screenshot manager save-to-image-file functionality (the resulting files aren't just entirely black now!  ;D)
-Fixed some weird TList-related bugs that would cause certain aspects of the applications functionality (like the Hollow and Smooth Tool) to make it crash to desktop
-Replaced all the TControlBars with TPanels (TControlBar is just extremely buggy, and isn't a unique or important enough component relative to the applications functionality to be worth spending time fixing)
-Added an anti-aliasing level control so you can make the viewport look nice!
-Other misc stuff that i'll detail more later.

Here's a  preview screenshot of the application running with eight-times multisampling:
i.imgur.com/cMVCOqz.png (http://i.imgur.com/cMVCOqz.png)

EDIT: I certainly meant TControlBar, not TCoolBar. TCoolBar works fine. TControlBar does not. Bulletpoint has been modified as necessary, haha.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on June 05, 2016, 01:17:43 pm
Thanks a lot Akira1364!
I answered your post in DeleD forum. I will not repeat the same things here, please read everybody:
  http://www.delgine.com/forum/viewtopic.php?t=4844

About TControlBar: The current version is made by Blaazen. I know it is not completed but I thought it is better than TPanel for its intended purpose.
What are the serious bugs? Could you please open a bug report. Maybe Blaazen or somebody else can look at it.

It is after all a Delphi compatible LCL component, part of the Lazarus base installation. It should work as well as possible.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Blaazen on June 05, 2016, 01:26:56 pm
Ad TControlBar: IIRC there were reported some bugs (in Windows) but I was never able to reproduce them on Linux+Qt or Linux+Wine. So it would be better if somene with real Windows could look on it.
BTW, currently there are no opened TControlBar issues on bugtracker now. Reporting bugs is the good beginning...  :)
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: ChrisR on June 06, 2016, 05:02:14 pm
This sounds very promising. I will be happy to help tune this once you think it is ready for others input.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on June 07, 2016, 12:05:48 am
Regarding TControlBar, I am in fact using Windows, so I'm likely experiencing some form of whatever those previously reported Windows bugs were. I'll try to narrow down  exactly what's going wrong in such a way that I can describe it accurately in a proper bug report.

Now, as far as a little progress update:
I spent pretty much the whole day today converting all of the "List" code over to use generics. TDeledObjectList is now defined as:
Code: Pascal  [Select][+][-]
  1. TDeledObjectList<T> = class(TFPGObjectList<T>)
Which allowed me to descend the various other list classes from it (to use TPrimitiveList as an example) like:
Code: Pascal  [Select][+][-]
  1. TPrimitiveList = class(TDeledObjectList<TBasePrimitive>)
Which in turn allowed me to remove a LOT of repetitive re-implementations of general list functions like Assign, Delete, e.t.c, and also to remove the large amounts of manual typecasting that was going on everywhere (since the Items property of each list is now viewed as the exact class it should be, not just TObject).
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on June 07, 2016, 12:27:09 am
I spent pretty much the whole day today converting all of the "List" code over to use generics.

Yes, generics lists are a good idea.
You should however commit your chances into a revision control system ASAP, preferably to the DeleD SVN branch.
Committing all your changes as one big chunk makes it difficult to follow what has happened and to track potential problems.
Lots of small commits with proper descriptions are a good thing.
Do you have the changes in a local Git or Mercurial repo?
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on June 11, 2016, 09:51:47 am
Ping Akira1364.
We have not heard of you in this forum nor in DeleD forum for few days.
If you need help with revision control systems, please ask.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on June 12, 2016, 12:42:50 am
Sorry, I've been busy both with my actual job (which unfortunately at no point includes working on Deled) and also, paradoxically, working on Deled! ;) Apart from further genericization of the applications base classes and list-types, other noteworthy news is:

-I've dropped all use of Graphics32 in the application in favor of BGRABitmap (which as it stands today is just a much, much better library with significantly more useful/relevant functions). Graphics32 was great in the mid 2000s but in my opinion has fallen noticeably behind the competition in recent years.

-In conjuction with the above, I've massively simplified the "unit_TexureLoader" unit. Previously the application would load an image "from file", save it to a stream, re-load the stream in another function, go through a lengthy "data reading" process depending on the original image file type (complete with SetDIBits and all that fun stuff that's largely avoidable these days), and then finally pass the resulting "TTextureData" record to yet another function that actually loaded the image into OpenGL. BGRABitmap has allowed me to reduce the whole process to one function that looks like this:

Code: Pascal  [Select][+][-]
  1. function TOpenGLTextureLoader.LoadTextureIntoOpenGL(const AFileName: string): GLuint;
  2. var
  3.   Texture: GLuint;
  4.   MaxAnisotropy: GLFloat;
  5.   ABitmap: TBGRABitmap;
  6. begin
  7.   ABitmap := TBGRABitmap.Create;
  8.   ABitmap.LoadFromFileUTF8(AFileName);
  9.   ABitmap.VerticalFlip;
  10.   glGenTextures(1, @Texture);
  11.   glBindTexture(GL_TEXTURE_2D, Texture);
  12.   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
  13.   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
  14.   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  15.   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
  16.   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, 0.0);
  17.   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 0.0);
  18.   glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, @MaxAnisotropy);
  19.   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, MaxAnisotropy);
  20.   glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
  21.   glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, ABitmap.Width, ABitmap.Height, 0,
  22.     GL_BGRA, GL_UNSIGNED_BYTE, ABitmap.Data);
  23.   Result := Texture;
  24.   ABitmap.Free;
  25. end;

Now regarding uploading the codebase... I think I need a bit more time, both to clean up the various placeholders/test functions I've left "lying around" everywhere, and also to ensure that I've properly structured the project files so there won't be any issues loading them on computers that aren't mine. I understand what you were saying about uploading everything at once having the potential to cause issues, but honestly at this point I've deviated enough from the original code that I'm not sure it's going to matter either way.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on June 12, 2016, 03:16:58 pm
Code: Pascal  [Select][+][-]
  1.   ABitmap.LoadFromFileUTF8(AFileName);

The UTF8 specific functions are not needed any more in LCL. The normal Delphi compatible functions can be used.
I am not sure what functions TBGRABitmap provides. Must check later ...

Quote
Now regarding uploading the codebase... I think I need a bit more time, both to clean up the various placeholders/test functions I've left "lying around" everywhere, and also to ensure that I've properly structured the project files so there won't be any issues loading them on computers that aren't mine. I understand what you were saying about uploading everything at once having the potential to cause issues, but honestly at this point I've deviated enough from the original code that I'm not sure it's going to matter either way.

Yes it matters. Good revision history is amazingly important. It helps other people see what is changed and how it is changed.
DeleD developers may be interested in your development, too. Maybe the code will be ported back again to Delphi later, who knows.
I believe all your changes are good but I would love to see separate commits for:
- Use generics containers
- SendMessage -> LCL events
- Fix save-to-image-file
- Fix TList-related crashes
- Added an anti-aliasing level control
- Graphics32 -> BGRABitmap
- Simplify unit_TexureLoader

You even wrote:
  -Other misc stuff that i'll detail more later.
Commit history would be the best place to detail them.
If anyhow possible, could you now please commit your changes to a local Git repo. "Git gui" lets you selects the changes that go to a single commit. You could still split it nicely into meaningful smallish commits and then write nice commit descriptions.
If that is not possible then at least commit your existing changes as one chunk and later continue with small pointed commits, either to DeleD SVN branch or somewhere else.

Please revert the TControlBar -> TPanel change. Let's fix TControlBar instead.
Reverting is easy by not committing those changes to Git, or committing them and later deleting the commit. Git lets you edit the commit history. Reordering, deleting and joining small commits is easy, splitting existing big commits is more difficult. Hence: always do many small commits.

I appreciate your work with this DeleD port. However I have learned how important a detailed commit history is for a big SW project which is studied and modified by many people.
Please look at the commit history of DeleD trunk. It has only 131 commits since they imported to SVN but those commits are well though. From their descriptions you know what they do.

Kind regards,
Juha
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: aradeonas on June 12, 2016, 03:28:51 pm
If I were you I used:
Code: Pascal  [Select][+][-]
  1. ABitmap := TBGRABitmap.Create(AFileName);
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on June 13, 2016, 12:31:25 am
@Aradeonas:

Yeah, I realized the redundancy of those two first lines a few minutes after posting them. I've spent so much time working with libraries that don't have handy "create-from-type" capabilities that it just didn't occur to me to write it like that at first.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: marcov on June 13, 2016, 07:03:17 am
What is the verticalflip good for? bottom-up vs top-down can be compensated in the draw commands, doesn't need slow in memory inverting?

I have some simple texture loading objects in the code linked from this article (http://forum.lazarus.freepascal.org/index.php/topic,30556.msg194627.html#msg194627)
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Thaddy on June 13, 2016, 12:27:52 pm
this article (http://"http://forum.lazarus.freepascal.org/index.php/topic,30556.msg194627.html#msg194627")
That link is never going to work. Can you correct it Marco? Oh well, That article? (http://forum.lazarus.freepascal.org/index.php/topic,30556.msg194627.html#msg194627)
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on June 14, 2016, 04:57:51 pm
What is the verticalflip good for? bottom-up vs top-down can be compensated in the draw commands, doesn't need slow in memory inverting?

I have some simple texture loading objects in the code linked from this article (http://forum.lazarus.freepascal.org/index.php/topic,30556.msg194627.html#msg194627)

Without it the textures are displayed upside-down and mirrored. I figured it was better to do the compensation exactly once per image, within the temporary TBGRABitmap instance, before sending it to OpenGL.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: marcov on June 14, 2016, 05:01:12 pm
Without it the textures are displayed upside-down and mirrored. I figured it was better to do the compensation exactly once per image, within the temporary TBGRABitmap instance, before sending it to OpenGL.

Upside down yes, because the opengl coordinate system puts 0,0 in the bottom left corner, and positive Y is up. But you have total control over the coordinate system in opengl, and this can be fixed using glortho or by having own mat4 types for coordinate transformation, and then it is a zero-time operation.

The linked example does this.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on June 18, 2016, 11:01:59 pm
Checking in: I have not died/e.t.c.

I think I'll have the application at the point I want to get it to before uploading the codebase within about a week. The past few days I've been refactoring all things image and texture related a bit more, partially based on some of the suggestions in this thread, and also implementing the last "major" change that I wanted to make, which is moving the (completely broken) MDI windowing system over to AnchorDocking. As it stands, I would say it almost works, but there's still a few bugs I need to work out with loading and saving the layout from XML.

Also, just for fun, here's a re-textured 4K raytrace of the "Castle Siege" example scene that I did today (only took 20 minutes to render!)
http://i.imgur.com/KqwkKyk.jpg (http://i.imgur.com/KqwkKyk.jpg)
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on June 20, 2016, 09:54:07 am
Sounds good Akira1364.
Is your solution cross-platform already?
In any case it will be easy to make cross-platform because the used components / libraries support it.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on June 20, 2016, 11:54:58 pm
I'm not entirely sure. I suppose I need to fire up VMWare and find out.

Here's a screenshot of the application running with an anchor-docked layout, by the way:
http://i.imgur.com/RO3O1HJ.png (http://i.imgur.com/RO3O1HJ.png)
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on July 05, 2016, 03:27:01 pm
Ping ...

I'm not entirely sure. I suppose I need to fire up VMWare and find out.

I am willing to test it under Linux once you publish the source code.
This is open source, why are you still incubating the code privately?
If you need help with revision control, just ask.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on July 10, 2016, 12:56:00 am
Ok, I felt like it was time to swing by the forums for another update.

Yes, it's been longer than a week (not that that wasn't an extremely rough estimate to begin with). Sorry! Things have been significantly busier at my real job than I expected, and wrangling AnchorDocking to work completely seamlessly with TOpenGLControl as well as the way Deled reads and writes to and from its INI file ended up being a little tricker than I thought. The biggest problem was that Deled needs the Viewport forms (meaning the ones that contain TOpenGLControls) to be freed completely when closed, but AnchorDocking only hides "dockable forms" by default and provides no easy built-in way to override that. Somewhat of a hassle, but I got it figured out eventually... Also, it occured to me that Deled is essentially useless if it can't at least export to file formats other than its own, so I've been working on a basic "native" OBJ exporter, which is about 85% done, I'd say.

This is open source, why are you still incubating the code privately?

Mostly because I'd rather leave the community with a codebase they can immediately start improving (i.e. adding new features), rather than wasting time fixing my bugs.
Also, as far as revision control, I'm fine, thanks.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on July 10, 2016, 11:45:19 am
Also, it occured to me that Deled is essentially useless if it can't at least export to file formats other than its own, so I've been working on a basic "native" OBJ exporter, which is about 85% done, I'd say.

So you are already doing new development and not only porting the existing code?
Please publish the code before you do that!

Quote
Mostly because I'd rather leave the community with a codebase they can immediately start improving (i.e. adding new features), rather than wasting time fixing my bugs.

People will not fix bugs if you tell them to wait and explain which parts you are working on.
Remember the open source motto: "Release early, release often".
Please release ASAP!

Last night it occurred to me that maybe there is no DeleD port from Akira. Maybe the pics were just mockups or rendered with the Delphi version.
Ok, maybe not... Just a thought late at night.

Quote
Also, as far as revision control, I'm fine, thanks.

Does it mean we see the changes divided into many meaningful commits?
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on July 10, 2016, 10:52:43 pm
it occurred to me that maybe there is no DeleD port from Akira. Maybe the pics were just mockups or rendered with the Delphi version.

So I went out of my way to study the source code to the extent that I'm able to convincingly talk about it, made up a bunch of changes/feature additions that I hadn't actually made, and then went on an internet forum and posted about it in detail in some weirdly specific attempt to impress a bunch of people I've never met? The amount of effort that would take is far more than it is to actually work on the code.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: lainz on July 10, 2016, 11:02:16 pm
it occurred to me that maybe there is no DeleD port from Akira. Maybe the pics were just mockups or rendered with the Delphi version.

So I went out of my way to study the source code to the extent that I'm able to convincingly talk about it, made up a bunch of changes/feature additions that I hadn't actually made, and then went on an internet forum and posted about it in detail in some weirdly specific attempt to impress a bunch of people I've never met? The amount of effort that would take is far more than it is to actually work on the code.

LOL. He said that to force you to upload the code... like right now.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on July 11, 2016, 12:41:24 am
LOL. He said that to force you to upload the code... like right now.

Yeah, obviously. I don't know why he cares so much, though. No one had worked on the application at ALL in over three years, and if I hadn't decided to pick up the codebase myself it could have just as easily remained untouched until the end of time.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on July 11, 2016, 02:33:24 am
Yeah, obviously. I don't know why he cares so much, though. No one had worked on the application at ALL in over three years, and if I hadn't decided to pick up the codebase myself it could have just as easily remained untouched until the end of time.

Heh :)
I care, or at least I am interested because I did the initial port but then my skills in graphics programming were not enough to continue.
My motivation also went down when nobody else seemed to care about the Lazarus port.
I had honestly thought that some old DeleD developers would jump in with enthusiasm and improve my code. Their forum have threads about the project's future when Delphi has become so expensive and not everybody has access to it. Some people even suggested rewriting DeleD with C++ or Java (!). To me Lazarus seemed like a perfect match for their needs.
To my disappointment the project has no active developers now, even the original branch has no recent commits.
Anyway, I hoped your effort could change that. That's why I suggested that you commit your code in the same branch where I did. I understood DeleD has users, somebody will notice when there is a usable Lazarus port.

Whatever happens, DeleD has already benefited Lazarus project as a stress test for many open editor files which lead us to optimize code. The porting project also pushed me to implement 2 components, ValueListEditor and CoolBar which both have been improved by others since then.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on July 11, 2016, 02:54:52 am
I had honestly thought that some old DeleD developers would jump in with enthusiasm and improve my code. Their forum have threads about the project's future when Delphi has become so expensive and not everybody has access to it. Some people even suggested rewriting DeleD with C++ or Java (!). To me Lazarus seemed like a perfect match for their needs.
To my disappointment the project has no active developers now, even the original branch has no recent commits.

The original DeleD developers have a vested financial interest in NOT ever working on the open-source Object Pascal desktop version of DeleD again, as they're currently focused on a web-based (written in JavaScript or something) version of the application that's going to used a tiered subscription model (as in you're paying for more texture asset storage space at the higher levels) once it's out of beta.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on July 11, 2016, 10:14:17 am
The original DeleD developers have a vested financial interest in NOT ever working on the open-source Object Pascal desktop version of DeleD again, as they're currently focused on a web-based (written in JavaScript or something) version of the application that's going to used a tiered subscription model (as in you're paying for more texture asset storage space at the higher levels) once it's out of beta.

That may complicate things.
On the other hand they created a SVN branch for Lazarus port and I even got some positive comments about the effort.

What is the best place to publish your code?
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on July 12, 2016, 10:27:54 pm
What is the best place to publish your code?

I'm not exactly picky. The SourceForge repository, as you suggested, would probably be the most logical place once I'm ready. In other news, I'm pleased to announce that I finished up the OBJ exporter today, and it's working perfectly! Here's a screenshot of the "Sanssouci" example scene running in Wings3D after being exported from Deled:
http://i.imgur.com/dqsVXQa.png (http://i.imgur.com/dqsVXQa.png)

Additionally, just to ensure that the silly notion of this all being some bizarrely pointless hoax on my part has been fully dispelled, here's the complete source code of the OBJ exporter unit:
Code: Pascal  [Select][+][-]
  1. //Original Author: Akira1364
  2. //Last Modified: 09/10/16
  3.  
  4. unit unit_OBJSceneWriter;
  5.  
  6. {$mode Delphi}{$H+}
  7.  
  8. interface
  9.  
  10. uses
  11.   Classes, Dialogs, Forms, SysUtils, FileUtil, LazFileUtils, unit_Scene,
  12.   unit_Functions, unit_Primitives, unit_PrimitiveList;
  13.  
  14. type
  15.   TOBJSceneWriter = class(TObject)
  16.     OBJData: TStringList;
  17.     MaterialData: TStringList;
  18.     TextureList: TStringList;
  19.     ExportList: TPrimitiveList;
  20.   private
  21.     FScene: TScene;
  22.     FDecimalPrecision: string;
  23.     FSmoothingLevel: integer;
  24.   public
  25.     constructor Create(AScene: TScene; ADecimalPrecision: string; ASmoothingLevel: integer);
  26.     destructor Destroy; override;
  27.     procedure WriteToFile(OBJFileName: string);
  28.     property DecimalPrecision: string read FDecimalPrecision;
  29.     property SmoothingLevel: integer read FSmoothingLevel;
  30.   end;
  31.  
  32. implementation
  33.  
  34. constructor TOBJSceneWriter.Create(AScene: TScene; ADecimalPrecision: string; ASmoothingLevel: integer);
  35. begin
  36.   inherited Create;
  37.   FScene := AScene;
  38.   FDecimalPrecision := ADecimalPrecision;
  39.   FSmoothingLevel := ASmoothingLevel;
  40.   OBJData := TStringList.Create;
  41.   MaterialData := TStringList.Create;
  42.   TextureList := TStringList.Create;
  43.   ExportList := FScene.Primitives.Copy;
  44. end;
  45.  
  46. destructor TOBJSceneWriter.Destroy;
  47. begin
  48.   OBJData.Free;
  49.   MaterialData.Free;
  50.   TextureList.Free;
  51.   ExportList.Free;
  52.   inherited Destroy;
  53. end;
  54.  
  55. procedure TOBJSceneWriter.WriteToFile(OBJFileName: string);
  56. var
  57.   LastTextureUsed, PolyIndexString, PolyString, MaterialFileName, TextureSaveDirectory,
  58.   RelativeTextureFileName: string;
  59.   I, J, K, L: integer;
  60. begin
  61.   L := 0;
  62.   try
  63.     TextureSaveDirectory := ExtractFilePath(OBJFileName) + 'Textures';
  64.     CreateDirUTF8(TextureSaveDirectory);
  65.     MaterialFileName := ExtractFilePath(OBJFileName) + ExtractFileNameOnly(OBJFileName) + '.mtl';
  66.     OBJData.Append('# Created by DeleD 2.45 Lazarus Edition #');
  67.     OBJData.Append('mtllib ' + ExtractFileNameOnly(MaterialFileName) + '.mtl');
  68.     for I := 0 to ExportList.NumPrimitives - 1 do
  69.     begin
  70.       if ExportList[I].IsLightOrPathOrSkeletonPart = True then
  71.         Continue;
  72.       with ExportList[I] do
  73.       begin
  74.         InitializeNormals(SmoothingLevel);
  75.         OBJData.Append('');
  76.         OBJData.Append('o ' + Name);
  77.         OBJData.Append('# Vertices #');
  78.         for J := 0 to NumPolygons - 1 do
  79.         begin
  80.           for K := 0 to Polygons[J].NumVertices - 1 do
  81.           begin
  82.             with Polygons[J].VerticeList[K] do
  83.             begin
  84.               OBJData.Append('v ' + FormatFloat(DecimalPrecision, x) + ' ' +
  85.                 FormatFloat(DecimalPrecision, y) + ' ' + FormatFloat(DecimalPrecision, z));
  86.             end;
  87.           end;
  88.         end;
  89.         OBJData.Append('');
  90.         OBJData.Append('# Texture Coordinates #');
  91.         for J := 0 to NumPolygons - 1 do
  92.         begin
  93.           for K := 0 to Polygons[J].UVCoordinates[0].Count - 1 do
  94.           begin
  95.             with Polygons[J].UVCoordinates[0][K] do
  96.             begin
  97.               OBJData.Append('vt ' + FormatFloat(DecimalPrecision, u) + ' ' +
  98.                 FormatFloat(DecimalPrecision, -v));
  99.             end;
  100.           end;
  101.         end;
  102.         OBJData.Append('');
  103.         OBJData.Append('# Normals #');
  104.         for J := 0 to NumPolygons - 1 do
  105.         begin
  106.           for K := 0 to Polygons[J].NumVertexNormals - 1 do
  107.           begin
  108.             with Polygons[J].VertexNormals[K] do
  109.             begin
  110.               OBJData.Append('vn ' + FormatFloat(DecimalPrecision, x) + ' ' +
  111.                 FormatFloat(DecimalPrecision, y) + ' ' + FormatFloat(DecimalPrecision, z));
  112.             end;
  113.           end;
  114.         end;
  115.         OBJData.Append('');
  116.         OBJData.Append('# Polygons #');
  117.         for J := 0 to NumPolygons - 1 do
  118.         begin
  119.           with Polygons[J] do
  120.           begin
  121.             with Material.TextureLayers[0].Texture do
  122.             begin
  123.               if IsColorTexture = True then
  124.               begin
  125.                 if LastTextureUsed <> Material.Name then
  126.                   OBJData.Append('usemtl ' + Material.Name);
  127.                 LastTextureUsed := Material.Name;
  128.               end
  129.               else
  130.               begin
  131.                 RelativeTextureFileName :=
  132.                   'Textures' + DirectorySeparator + ExtractFileName(FileName);
  133.                 if LastTextureUsed <> RelativeTextureFileName then
  134.                   OBJData.Append('usemtl ' + RelativeTextureFileName);
  135.                 LastTextureUsed := RelativeTextureFileName;
  136.               end;
  137.             end;
  138.             PolyString := 'f';
  139.             for K := 0 to NumVertices - 1 do
  140.             begin
  141.               Inc(L);
  142.               PolyIndexString := IntToStr(L);
  143.               PolyString := PolyString + ' ' + PolyIndexString + '/' +
  144.                 PolyIndexString + '/' + PolyIndexString;
  145.             end;
  146.             OBJData.Append(PolyString);
  147.           end;
  148.         end;
  149.         for J := 0 to NumPolygons - 1 do
  150.         begin
  151.           with Polygons[J].Material.TextureLayers[0].Texture do
  152.           begin
  153.             if (FileName <> '') and (TextureList.IndexOf(FileName) = -1) and
  154.               (TextureList.IndexOf(Polygons[J].Material.Name) = -1) then
  155.             begin
  156.               if IsColorTexture = True then
  157.               begin
  158.                 MaterialData.Append('newmtl ' + Polygons[J].Material.Name);
  159.                 with ColorToRGB(Color) do
  160.                   MaterialData.Append('Kd ' + FormatFloat(DecimalPrecision, r) +
  161.                     ' ' + FormatFloat(DecimalPrecision, g) + ' ' +
  162.                     FormatFloat(DecimalPrecision, b));
  163.                 TextureList.Append(Polygons[J].Material.Name);
  164.               end
  165.               else
  166.               begin
  167.                 RelativeTextureFileName :=
  168.                   'Textures' + DirectorySeparator + ExtractFileName(FileName);
  169.                 MaterialData.Append('newmtl ' + RelativeTextureFileName);
  170.                 MaterialData.Append('map_Kd ' + RelativeTextureFileName);
  171.                 CopyFile(FileName, TextureSaveDirectory + DirectorySeparator +
  172.                   ExtractFileName(FileName), True);
  173.                 TextureList.Append(FileName);
  174.               end;
  175.             end;
  176.           end;
  177.         end;
  178.       end;
  179.     end;
  180.     OBJData.SaveToFile(OBJFileName);
  181.     MaterialData.SaveToFile(MaterialFileName);
  182.   except
  183.     ShowMessage('Export error.');
  184.   end;
  185. end;
  186.  
  187. end.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: circular on July 16, 2016, 09:27:37 pm
Hi there!

That's a great job your doing Akira.

I never thought it was a hoax.

Note that if you don't want to make the code public yet, I would still suggest to make backups so that your work is safe.

It is great to have you around teasing us.  :)
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on July 16, 2016, 11:38:23 pm
Hi there!

That's a great job your doing Akira.

I never thought it was a hoax.

Note that if you don't want to make the code public yet, I would still suggest to make backups so that your work is safe.

It is great to have you around teasing us.  :)

Thanks! As far as the backups go, don't worry, I wouldn't dream of working on an application as large as DeleD without them.

Here's a couple more screenshots for everyone showing off the significantly increased window layout possibilities that AnchorDocking adds to the application:
http://i.imgur.com/fnUN0G8.png (http://i.imgur.com/fnUN0G8.png)
http://i.imgur.com/Y6y84sz.png (http://i.imgur.com/Y6y84sz.png)

By the way, if anyone is wondering "How did he get that sky background in there!!??", it's just a set of skybox textures. DeleD has always had the ability to load them into the 3D viewport through the main options menu.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on July 31, 2016, 03:19:58 am
Status update time:

The longer I work on DeleD, the more I realize just how much the application as a whole was held back by the fact that the original developers were actively concerned about maintaining backwards compatibility with hopelessly outdated hardware and ancient Delphi versions like Delphi 5/6/7. Well, maybe Delphi 7 I could have vaguely understood in 2011 (the last year the Delphi version was worked on, before JuhaManninen started the Lazarus port in 2013), but 5 and 6? Give it up already! To be more specific, what I mean is that after getting the application to a relatively "stable" point (as in stable including the major project-wide changes I've made) a couple of weeks ago, I started going through unit-by-unit specifically looking for areas where I could further "trim the fat", as I obviously don't share the original developers compatibility concerns (or any compatibility concerns when it comes to Delphi for that matter, as it would be literally impossible now). There were/are so many. To provide (just one) example, there was an 800-line (now unused) unit called "unit_TextureManipulator" that did absolutely nothing other than to (somewhat poorly) implement a total of four unique image-editing functions (drawing a line on an image, blitting text to an image, adjusting the alpha channel of an image, and finally, performing a flood-fill on an image.) Woo-hoo! Not. Every instance of its use in the application has been replaced with a call to the relevant BGRABitmap function/procedure, which reduces each of those instances from about 20 to 40 lines to 1 or 2. (As there is no longer a need to create a unique TTextureManipulator instance, pass the texture data to it, and so on, because all images are now themselves BGRABitmaps to begin with!) From there, the rabbit hole just gets deeper... I mean, here is a literal, direct copy-and-paste of a comment that was left in the code of a function called Tfrmside.UpdateProjection (which as the name suggests, updates the OpenGL projection of the 2D "side" viewport):

Code: Pascal  [Select][+][-]
  1. // INFO, PJ: On my Win98 Laptop, UpdateProjection is called before camera is initialized.

Cool, man! That matters a lot, currently, and I will be sure to keep it in mind.  ::)

Even in the somewhat unlikely case that "PJ" wrote that comment in 2004 (which is the year development on DeleD first began, as near as I can tell), it still would have been a borderline irrelevant issue referring to an outdated operating system running on the most niche hardware possible. (How many people who weren't lawyers or "businesspeople" that got issued them them by their employers really bought Windows 98 laptops for home use? And to those who did...Why? I personally found it extremely obvious (back then) that buying a laptop meant a drastic loss in performance for a non-trivially higher amount of money).

Not to fret, though: I'm no fan of vaporware personally, so although I've mostly stopped caring about trying to "release" the updated codebase by a specific date (my real-life job has enough deadlines to begin with! :P) I will say that you can all 100% for real expect to see a full-project upload by the end of the summer (meaning late August or so).

Also, just to be clear, none of this was meant to suggest that the original developers were individually "bad" at what they did. Obviously, that isn't true, or DeleD would never have reached the point it did. More so this was just kind of a tongue-in-cheek venting on my dislike of the combined "too-many-cooks-in-the-kitchen"/general red-tape syndrome that too often creeps into collaborative projects.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: circular on July 31, 2016, 06:43:33 pm
Wow lot's of things to do on Deled.

Happy my lib is useful  :)
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: marcov on July 31, 2016, 10:34:19 pm
Even in the somewhat unlikely case that "PJ" wrote that comment in 2004 (which is the year development on DeleD first began, as near as I can tell), it still would have been a borderline irrelevant issue referring to an outdated operating system running on the most niche hardware possible. (How many people who weren't lawyers or "businesspeople" that got issued them them by their employers really bought Windows 98 laptops for home use?

Simple business sense.  XP is from late 2001, but laptops with it preinstalled only came later (well in 2002). So I wouldn't be surprise that say by early 2004, a significant enough share of the customers still ran '98. You don't buy a laptop every two years.  (and you could rarely put enough memory in them to upgrade them manually)

That said, best wait a bit, and raise the limit directly to FPC 3.0.2+, with advanced TRectF and TPointF for vertices.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on July 31, 2016, 11:37:02 pm
Even in the somewhat unlikely case that "PJ" wrote that comment in 2004 (which is the year development on DeleD first began, as near as I can tell), it still would have been a borderline irrelevant issue referring to an outdated operating system running on the most niche hardware possible. (How many people who weren't lawyers or "businesspeople" that got issued them them by their employers really bought Windows 98 laptops for home use?

Simple business sense.  XP is from late 2001, but laptops with it preinstalled only came later (well in 2002). So I wouldn't be surprise that say by early 2004, a significant enough share of the customers still ran '98. You don't buy a laptop every two years.  (and you could rarely put enough memory in them to upgrade them manually)

That said, best wait a bit, and raise the limit directly to FPC 3.0.2+, with advanced TRectF and TPointF for vertices.

If you're referring to companies when you say "the customers", then if you re-read what I said you'll see I was talking about individual people who did not specifically require a laptop for work, and who were not issued them by their employers, but just simply went out and bought them to use at home for no particular reason. The overall point was that the laptops of that era were in general simultaneously very expensive and very terrible, compared to the still quite expensive but somewhat less terrible desktops, so buying a laptop was not a particularly financially sound decision unless you really needed it. Or, more specifically, the point was that being concerned about whether or not the 3D modelling software you're writing would run properly on Windows 9x laptops would have already been veering into the realm of "over-cautious" in 2004. Which is, again, the absolute earliest that comment could have been written.

As far as your second point, I feel as though I detect a hint of sarcasm? :P I suppose it would depend on how well fgl.pp worked in 2.6.4 and lower, as the application now uses TFPGObjectList descendants pretty much exclusively when it comes to containers.

EDIT: To be clear, I use trunk everything, all the time. Yes, yes, everyone always says "Rarrgh, trunk Lazarus is NOT meant to be used with trunk FPC! >:D" but I have historically found the combination of trunk Lazarus/trunk FPC to be pretty much always objectively better than the latest "official combined release" of FPC and Lazarus. I suppose this serves as a testament to the overall abilities of the FPC/Lazarus development teams: they very, very rarely introduce bugs that break compatibility between the two.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: marcov on August 01, 2016, 10:24:39 am
As far as your second point, I feel as though I detect a hint of sarcasm? :P

No. A bit tongue in cheek maybe since it suggest using a not yet released version. But I actually implemented it because of OpenGL work (http://forum.lazarus-ide.org/index.php/topic,30556.msg194484.html#msg194484).

I also agree with you that the lower versionitis is actually a point in FPC/Lazarus favor. 95% of the users are on the last 2-3 releases.

Quote
EDIT: To be clear, I use trunk everything, all the time. Yes, yes, everyone always says "Rarrgh, trunk Lazarus is NOT meant to be used with trunk FPC! >:D" but I have historically found the combination of trunk Lazarus/trunk FPC to be pretty much always objectively better than the latest "official combined release" of FPC and Lazarus. I suppose this serves as a testament to the overall abilities of the FPC/Lazarus development teams: they very, very rarely introduce bugs that break compatibility between the two.

Thank you, me too, but I suggest holding off updating for a while. My trunk/trunk was broken totally yesterday.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on August 02, 2016, 03:47:17 pm
As far as your second point, I feel as though I detect a hint of sarcasm? :P

No. A bit tongue in cheek maybe since it suggest using a not yet released version. But I actually implemented it because of OpenGL work (http://forum.lazarus-ide.org/index.php/topic,30556.msg194484.html#msg194484).

I also agree with you that the lower versionitis is actually a point in FPC/Lazarus favor. 95% of the users are on the last 2-3 releases.

Ah, my mistake then.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on August 08, 2016, 12:25:54 am
More choice cuts from DeleD (this was in the code of "frmMaterialEditorForm":

Code: Pascal  [Select][+][-]
  1. type
  2.   THackSplitter = class(TSplitter)
  3.   end;

Which was later used like this:

Code: Pascal  [Select][+][-]
  1. THackSplitter(splVertical).OnDblClick := splVerticalDblClick;

Because, you know, if we don't have the ability to assign double-click events to TSplitters, do we really have anything at all?

The actual "splVerticalDblClick", if you're wondering, was an entirely unnecessary procedure that did some resizing of a panel based on the current position of a neighbouring groupbox, for no obvious reason. It had nothing to do with the Splitter!
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on September 04, 2016, 03:44:30 am
Checking in:

I'm aiming to upload the full codebase for the application sometime Monday evening, as I have a day off work for "Labor Day"... if you're not from the United States (or Canada like me) and you don't know what that is, don't worry, it's not particularly important. :P

Significant changes since the last time I posted:

-The application no longer uses an "Application.OnIdle" notification to handle the redrawing of its viewports, or for anything else. Previously, all open viewports were redrawn endlessly as fast as the CPU could do it, regardless of whether or not they needed to be, which was a non-trivial yet entirely avoidable drain on performance. Now, they're only redrawn based on specific input from various user actions.

-The raytracing engine and main raytracing form have been completely revamped. Specifically, the raytracer itself now renders directly into a TBGRABitmap (instead of a disposable "TTextureData" record) which is much "safer" in the event of a crash (since the bitmap can be loaded "from file" and properly picked up from where it left off), and also seems to be noticeably faster, for me at least... As far as the raytracing form, the real-time preview is now displayed in a TBGRAVirtualScreen (instead of a TDrawGrid cell) and can actually be turned on and off arbitrarily (whereas before you were stuck with the pointless "thumbnail" preview no matter what, which I'm sure for users running lower-end systems would have been incredibly annoying.) Additionally, all items in the raytracing "queue" (completed or not) are now listed in and can be selected/displayed from a TComboBox in the form.

-Quite a few other things that I'm too tired to get into right now.

Here's a screenshot of me working on the Castle Siege example scene while simultaneously doing a raytrace of the Sanssouci example scene:
http://i.imgur.com/MmCWpAI.png (http://i.imgur.com/MmCWpAI.png)
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: circular on September 05, 2016, 11:49:16 am
Oh nice raytracing.

I am not sure if it matters, but SetPixel is slightly slower than using a PBGRAPixel pointer for one scaline. However compared to the raytracing anyway, that may not be significant.

I guess there is also the number of refresh of the raytracing screen per second. For example if you redraw the previous for each pixel, that would obviously be slow.

You can also consider calling InvalidateRect to redraw only the portion of the TBGRAVirtualScreen that has some change. I wonder if it would be handy to have such partial redraw function in the TBGRAVirtualScreen class.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Granada on September 14, 2016, 02:22:24 pm
Hi Akira1364

I am one of the original testers of DeLeD and wonder if there is a compiled x version i can try out (i still use DeLeD daily ).

Many thanks Dave 
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on September 14, 2016, 03:18:31 pm
I am one of the original testers of DeLeD and wonder if there is a compiled x version i can try out

No there isn't any version from Akira yet. I also wish he would publish it ASAP.
An open source motto is "release early, release often". The SW does not need to be "finished" or "ready" before it is published.
I honestly don't understand why he is holding it back. :(
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Granada on September 14, 2016, 03:40:40 pm
Quote
No there isn't any version from Akira yet. I also wish he would publish it ASAP.
An open source motto is "release early, release often". The SW does not need to be "finished" or "ready" before it is published.
I honestly don't understand why he is holding it back. :(


Thanks for the info,i will just have to wait  :).

Dave
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Granada on September 24, 2016, 01:01:28 am
Quote
I honestly don't understand why he is holding it back.
He must be busy ,Shame i was looking forward to trying this  :).

Dave
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Granada on January 06, 2017, 01:08:46 pm
Looks like this might be Dead now ,Sent a pm a while back with no reply.Shame i was looking forward to this  :(.

Dave
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on January 06, 2017, 03:18:57 pm
Looks like this might be Dead now ,Sent a pm a while back with no reply.Shame i was looking forward to this  :(.
Yet he felt important to report his "progress" in lengthy posts, like "Significant changes since the last time I posted:" and such...
Why? That is quite weird when nobody was allowed to see his "significant changes".
My diagnosis: It is a hoax! He did not do the things he claimed he had done.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Granada on January 06, 2017, 03:43:57 pm
Quote
It is a hoax! He did not do the things he claimed he had done.
I think you might be right,they used to call it vapor ware or something like that i think.But the funny thing is
he posted on the DeLeD forum about the work being done also.

Dave
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on January 06, 2017, 06:23:36 pm
Not dead. Not a hoax. (Really? You think it's more believable that I'm some kind of Photoshop hero capable of creating pixel-perfect forgeries than it is for me to have written some code?) I'm still working on it as often as I can. I've just been busy with real life, and on top of that (as I stated in another topic) the problems Lazarus has with parsing generics has slowed me down quite a bit. Yes, I said something about vaporware, yes, I failed to deliver in that particular timeframe. Good thing this is an actual paid job, and not something I started doing as a side-project for fun, right? Oh wait, that's the opposite of the truth.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on January 06, 2017, 06:59:58 pm
I believe when I see it.

[Edit] DeleD code does not use generics. At least Akira1364 should use his imagination and make up a better excuse.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Granada on January 07, 2017, 12:34:44 am
Quote
September 04, 2016, 03:44:30 am »


Quote
Checking in:

I'm aiming to upload the full codebase for the application sometime Monday evening, as I have a day off work for "Labor Day"... if you're not from the United States (or Canada like me) and you don't know what that is, don't worry, it's not particularly important. :P

Dave
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on January 07, 2017, 05:45:31 pm
I believe when I see it.

[Edit] DeleD code does not use generics. At least Akira1364 should use his imagination and make up a better excuse.

Wow. Wow. Wow. I don't even know how to respond to this. Have you actually read this thread? I talked several times about how I was converting the code for the various list classes over to use Generics. They do in fact now use nothing but Generics.

A brief sample:

Code: Pascal  [Select][+][-]
  1. generic TDeleDObjectList<T: class> = class(specialize TObjectList<T>)
  2.     type
  3.     FNotifyType =
  4.     procedure(ASender: TObject; constref AItem: T; AAction: TCollectionNotification) of object;
  5.   private
  6.     FUniquesOnly: Boolean;
  7.     FName: String;
  8.   public
  9.     constructor Create; overload;
  10.     constructor Create(AOwnsObjects, AUniquesOnly: Boolean); overload;
  11.     procedure Assign(constref Source: TDeleDObjectList);
  12.     function Remove(constref AValue: T): SizeInt; overload;
  13.     function Remove(constref AValue: T; AIgnoreOwnership: Boolean): SizeInt; overload;
  14.     function RemoveWithoutChangeEvent(constref AValue: T): SizeInt;
  15.     procedure RemoveList(constref List: TDeleDObjectList);
  16.     function Add(constref AValue: T; ARemoveOnExist: Boolean): SizeInt; overload;
  17.     function Add(constref AValue: T): SizeInt; overload;
  18.     function AddList(constref List: TDeleDObjectList): SizeInt;
  19.     function IsNotIn(constref OtherList: TDeleDObjectList; constref ResultList: TDeleDObjectList = nil): SizeInt;
  20.     function IsIn(constref OtherList: TDeleDObjectList; constref ResultList: TDeleDObjectList = nil): SizeInt;
  21.     function NumberOfOccurances(constref AValue: T): SizeInt;
  22.     property UniquesOnly: Boolean read FUniquesOnly write FUniquesOnly;
  23.     property Name: String read FName write FName;
  24.   end;

Yes, that is mode ObjFPC Generic code. I wanted to be able to take advantage of string-based case statements in certain units (not possible in mode Delphi), and figured I might as well change all the units while I was at it for the sake of consistency. Didn't take that long, maybe three hours tops. Mostly just simple syntax stuff like adding "^" and "@", changing "Color" to "AColor", and so on.

Quote
September 04, 2016, 03:44:30 am »


Quote
Checking in:

I'm aiming to upload the full codebase for the application sometime Monday evening, as I have a day off work for "Labor Day"... if you're not from the United States (or Canada like me) and you don't know what that is, don't worry, it's not particularly important. :P

Dave

Yes, I said that. Ended up deciding to just keep working on it instead. Try me at the Hague for my heinous crimes against humanity.

Here's another screenshot showing off the docked layout/real-time OpenGL lighting/anti-aliasing, none of which existed in the original version. You'll also notice the obvious overall changes I've made to the "look and feel" of the UI. Make sure to view it at full resolution. I'd love to hear all about how fake it must be.

http://i.imgur.com/7iVT1Pw.png
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Granada on January 07, 2017, 06:42:42 pm
I will be the first to admit,that screenshot looks great  :).

Dave
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on January 07, 2017, 09:37:10 pm
Thanks!

I'll also point out for anyone else reading this that I literally posted the complete code for an entirely new unit (implementing a built-in OBJ exporter) earlier in this thread...
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on January 07, 2017, 10:17:42 pm
I'll also point out for anyone else reading this that I literally posted the complete code for an entirely new unit (implementing a built-in OBJ exporter) earlier in this thread...
I'll also point out for you that such code snippets and reports about your significant and great code only make sense when you have published the whole code.
Without the full code this is just a sick game or joke going on and on...
You are not planning to publish anything, are you? I predict this will continue forever, you will always feel deeply insulted when somebody dares to ask to see the code.

Now I must ask you to stop it! Either publish the code ot stop praising this "invisible" (maybe non-existent) code of yours.
Understood?
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on January 07, 2017, 10:45:52 pm
I'll also point out for anyone else reading this that I literally posted the complete code for an entirely new unit (implementing a built-in OBJ exporter) earlier in this thread...
I'll also point out for you that such code snippets and reports about your significant and great code only make sense when you have published the whole code.
Without the full code this is just a sick game or joke going on and on...
You are not planning to publish anything, are you? I predict this will continue forever, you will always feel deeply insulted when somebody dares to ask to see the code.

Now I must ask you to stop it! Either publish the code ot stop praising this "invisible" (maybe non-existent) code of yours.
Understood?

Seriously?  "Understood?" You're descending into the realm of self-parody here. Yes, I absolutely intend after spending months and months working on DeleD to never ultimately show it to anyone. I just love wasting countless hours of my time. You got me. (Not.)

I don't know where you're getting the idea that I think my code is specifically "great". When I've said things were "significant", I meant the changes themselves were significant relative to the functionality that currently existed in the application. The code itself is... code. It's relatively clean and maintainable, I'd say, but nothing special. There are a lot of people who could have done what I've done so far... but no one did/has. Finally, I've not been "deeply offended" at any point, just surprised at the conspiracy theories. I have in fact done everything I've said I've done, and provided visual proof numerous times. One day I will upload the codebase, and I know that, so I'm really not concerned with what anyone thinks of me right now.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on January 07, 2017, 10:56:47 pm
The code itself is... code.
Yes, show us the code. That was the whole point. Otherwise please shut up.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Bart on January 07, 2017, 11:34:20 pm
Can we please tone it down a little?

Bart
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on January 07, 2017, 11:49:26 pm
I'd love to! I wouldn't have even come back to this thread until I had a reason, if I hadn't noticed Granada's initial comment about the project being "dead." (And in fairness he actually was being and has been perfectly reasonable the whole time...)
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: lainz on January 08, 2017, 01:10:51 am
Yes there was 7 months since you first published this news.

And when you upload this please upload it on GitHub, so any can fork it and give back to your repository the patches they made, if any.

Or you can upload it to Lazarus CCR (both sourceforge or github).

Any date you will upload this, or it will be a news for ever?!
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on January 08, 2017, 02:51:44 am
I feel like you're feeding the fire here, but I'll respond anyways:

First, I'll say yet again: Lazarus has serious issues parsing generics (both in the sense of CodeTools code completion, and Jedi Code Format.) I was not expecting this initially, and it has slowed me down quite a bit. I'm aware of how that reveals me to be someone who has become overly dependent on IDEs over the years, but that isn't the point. I hope this gets looked at soon, as I imagine anyone coming from, for example, any relatively new Delphi version would be rather put-off by the constant "Expression must be class or record type" and "Identifier expected near specialize" or "Identifier expected near type".

Secondly: I'm honestly just rather enjoying working on the codebase, and continue to find myself "turning corners" as far as streamlining/simplifying the code/figuring out how to add new features/e.t.c. The minute I upload it is the minute I have to deal with "peanut gallery" input that MAY be useful and worthwhile, but also MAY be fueled by the sort of, uh, "attitudes" that have come to light in this thread. Hopefully you know what I mean by that, I'm aware English is not everyone's first language.

Thirdly: Related to my second point, I've found the overall attitudes of people around here towards development to be entirely too "cautious". I won't and can't say that this applies to everyone, of course, but it's a reasonable "average". Like I stated in a post earlier today, there are a lot of people who could have done what I have done so far. I'm pretty sure the only reason no one has is because people seem to think that once a codebase has been established, it's breaking some kind of cardinal rule to go outside the confines of what has already been written in it. I personally think this is ridiculous, and am more than happy to scrap entire units if I don't think they're currently useful (and have done so quite a few times so far). To use the PNG loading code as an example once agin, as I did in another thread: It just didn't work. It was an absolute dead end waste of time. It used an implementation of ZLib 1.1.2 (which literally dates back to 1998). Yet for some reason no one was willing to just be like "hey, this is insanely old and it sucks!" and get rid of it, which is what I did (along with almost all of the "home-grown" image-related code in the application, in favor of BGRABitmap.)

"Fourthly" (really doesn't sound like a real word, but it is!): I got to a point where I realized that the application had no real long-term viability unless the rendering code was moved away from the outdated glBegin/glEnd stuff, so I made that a major "goal" for myself as well. So far I have pretty much completely converted the 3D viewport, and now just need to do the 2D viewports. I haven't gone full-on OpenGL 4.0+ as I thought that would make the minimum hardware requirements a little too high, but it is all arrays/shaders/the occasional display list now. (The display lists I ultimately intend to replace with shader-based functionality too, though.)
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: lainz on January 08, 2017, 03:19:15 am
You can at least provide an executable  ;)
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on January 08, 2017, 03:46:39 am
We'll get there, don't worry. At this point though I haven't tested it on anything other than 64-Bit Windows 10, tuned for Haswell.
(I honestly would not have posted this thread until I had something ready to present, if I knew it was going to turn into something like this. I'm just a guy who went to SourceForge one day and downloaded the codebase!)
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on January 08, 2017, 11:21:33 am
I honestly would not have posted this thread until I had something ready to present, if I knew it was going to turn into something like this. I'm just a guy who went to SourceForge one day and downloaded the codebase!
Yes, I also think you are an innocent victim. You could not possibly guess that anybody would ask for the code after you had explained its significant progress in your lengthy posts. Of course not.

Surprisingly it is always other people's fault that you cannot show the code.
Lazarus IDE has bugs. JCF has bugs.
The average forum users are too cautious and have a wrong attitude.
The original DeleD authors made a poor job and their code must be totally altered.
What next? I still predict this will continue forever. We will see another excuse for sure.

To clarify: the code's license allows anybody to change it for his own personal use without showing it to anybody else, but writing long detailed stories about it just makes no sense.
It is totally unsocial.
This forum is about Pascal programming. When discussing details of certain piece of code, showing the code is the obvious number 1. priority. Akira1364 knows it as well as anybody else.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Bart on January 08, 2017, 01:30:34 pm
OK, without the intent to offend anyone here....

To summon it up, there are 2 possibilities:


In either case IMHO it is not worth posting about this:

So, just stop arguing about it.
Enetually he will release his code, or he will not.
In either case it makes no sense biggering about it.

Bart
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on January 08, 2017, 02:59:57 pm
Ok, Bart is right.
Now however I have something positive in mind related to this issue.
I started to think of this :
You can at least provide an executable  ;)
No lainz, that would be a license violation. DeleD was published under GPL which requires source code to be available when an executable is delivered. At least the source must be provided on-demand if not directly with the executable.
Now Akira1364 follows the license rules as he does not deliver executables.

Akira1364, an idea for you: start to make business with DeleD. Maybe you had such an idea already.
It would make sense if you really have worked on the code and improved it as much as you say.
GPL allows business. The license authors even wrote a page about it to avoid misunderstandings:
 https://www.gnu.org/philosophy/selling.html
If you sell the sources, the buyer is allowed to copy and distribute it forward for free if he wants, according to GPL. So you may be able to sell it only once.
On the other hand, if you put a low price (say 1 - 2 € or $), and make the payment process easy, many people could buy the code just to get an easy download link.
I for example would pay that to see your code.
Companies that make long term business with open sourced SW typically offer services and support for the product, and / or include commercial SW that connects somehow to it. You could do the same with DeleD.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JD on January 08, 2017, 05:04:05 pm
It's early in a new year. Please don't let this discussion get out of hand. We all need each other. That is the strength of a community.

JD
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on January 08, 2017, 05:35:39 pm
I'm not a troll. Please, look at the multitude of screenshots I've posted, and compare them to the original application. That should be all the "proof" anyone needs. Do you want me to take a literal photo of my computer monitor while it's running the application, or something? Also, I have absolutely no intention of attempting to make any money off of this at any time, ever. Like I said before, one day I will upload the codebase, and nothing anyone thinks of me right now will matter anymore.

Surprisingly it is always other people's fault that you cannot show the code.

I have never implied that. I openly admitted to the fact that being slowed down by the IDE reflected poorly on me, and not the IDE.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Handoko on January 08, 2017, 06:09:38 pm
I believe Akira is not a troll. He has his reasons why the code should not be publicized now. Please be patient, what he doing is a great contribution to the Pascal communities. We should not push him but support him.

Hi Akira. From the screenshots I can see this program is awesome. I am very eager to try the improved version. You have mentioned lots of improvements, so hope you can understand people here are very impatient to try it or see the code.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on January 08, 2017, 07:55:02 pm
I will wait patiently. Maybe there are valid reasons for not publishing the code although I may not fully understand them.
Sorry for pushing this issue.

I want to clarify my business comment. There was no joke or irony involved from my side. Business around open source SW is typically a win-win situation both for the SW project and for the entrepreneur.
Unfortunately there was a blogger with a mission to kill all Lazarus forks and business around it, thus this may still be a sensitive topic here.
Anyway, if somebody starts business around DeleD or FPC or Lazarus or any project, I personally see it as a positive thing.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: Akira1364 on January 09, 2017, 12:59:06 am
That's a valid point, but I, uh, have a job already.  ;) I suppose someone else could technically do this if they wanted to though, once I put the code out there. Also, regarding releasing an executable without the code: Jeroen Commandeur (one of the original DeleD developers) straight-up asked me if "there was an executable we could try", in the thread I made on the DeleD forums, which would seem to directly imply that it wouldn't be a problem. (To be honest it's quite likely that he doesn't even remember what license DeleD CE specifically used, as he hasn't worked on it for years and is now focused on the web-based version.) So I actually probably will upload some test builds first, in the period leading up to when I upload the code.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: apeoperaio on January 10, 2017, 10:28:12 am
Maybe oot but could be possible to have something similar to DeleD palette in Lazarus components palette?
Something similar to 3DScene, 3DShapes, 3DLayers components available in Delphi?

Andrea
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: JuhaManninen on January 10, 2017, 03:17:50 pm
Also, regarding releasing an executable without the code: Jeroen Commandeur (one of the original DeleD developers) straight-up asked me if "there was an executable we could try", in the thread I made on the DeleD forums, which would seem to directly imply that it wouldn't be a problem. (To be honest it's quite likely that he doesn't even remember what license DeleD CE specifically used, as he hasn't worked on it for years and is now focused on the web-based version.)
Jeroen Commandeur is allowed to switch the license of his own code to something else, but GPL sets the rules until he does so.
[Edit] Actually a new license would affect only future forks. Our (mine and yours) DeleD forks will be based on the GPL version forever.

Quote
So I actually probably will upload some test builds first, in the period leading up to when I upload the code.
That is a license violation without any ambiguity!
In fact the GPL is made around this one idea and purpose: to ensure that source code of a delivered SW remains available always. The original code and all code derived from it.
In your obsession to not make it available you are ready to go as far as violate the code's license. Why? I don't see any valid reason for your behavior. All the reasons I can think of are wicked and evil.
Do you think the code must be "ready" before you publish? But then, how can you publish an executable? It is not "ready" either.
Please explain. I really really really do not understand you.
If you need help with revision control tools, I am sure many people here are willing to help you.

Maybe oot but could be possible to have something similar to DeleD palette in Lazarus components palette?
Something similar to 3DScene, 3DShapes, 3DLayers components available in Delphi?
Yes it is out of topic. Please start a new thread. Explain there what exactly you meant. A new palette using 3D effects or some 3D components in the existing component palette?
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: BeniBela on January 10, 2017, 10:22:16 pm
A thought crossed my mind.

Perhaps AkIra is just a chat bot. Someone experimenting with AI research.
Title: Re: I've made some fairly significant progress on JuhaManninen's port of DeleD...
Post by: marcov on January 10, 2017, 10:50:08 pm
A thought crossed my mind.

Perhaps AkIra is just a chat bot. Someone experimenting with AI research.

Please keep it a bit constructive.  I agree with Bart.
TinyPortal © 2005-2018