Jump to content
The Dark Mod Forums

Particle Preview


Recommended Posts

I've started to work on an improved particle selector, with a preview. The particle renderer is about 50% done, so I'm able to show a bit of progress now:

 

particle_preview.png

 

Once the renderer is done, there is nothing stopping us from writing an improved Particle Editor plugin. But this is kind of boring work, so don't hold your breath about that one.

Link to comment
Share on other sites

Awesome. The particle renderer is the "cool thing" I always thought would be fun to implement, but imagined would be too difficult because of renderer limitations. I guess you've solved at least one major problem with the RenderSystemFactory however, enabling the use of multiple renderer instances instead of the one singleton instance.

 

I have some WIP changes to implement the use of GtkBuilder/Glade for interface design, so maybe this will be motivation to actually use it for an actual new GUI.

 

How does the animation work (if any)? Is it thread based, or GTK idle-callback based?

Link to comment
Share on other sites

How does the animation work (if any)? Is it thread based, or GTK idle-callback based?

It's really basic, nothing spectacular. I just added a gtkutil::Timer (based on gtk_timeout_add). It is attempting to refresh the view every 16 msecs. If that doesn't work due to the previous render being still in progress, the refresh is delayed by another 16 msec. No explicit threading, I don't know how GTK is handling it internally.

 

(You can have a look at it yourself in the particles branch, if you like, most particles are already half-way working.)

 

Btw, I've been holding back from merging your recent trunk changes, because I'm missing two source files - could you check them in?

Link to comment
Share on other sites

It's really basic, nothing spectacular. I just added a gtkutil::Timer (based on gtk_timeout_add). It is attempting to refresh the view every 16 msecs. If that doesn't work due to the previous render being still in progress, the refresh is delayed by another 16 msec. No explicit threading, I don't know how GTK is handling it internally.

 

Ah yes, that's what I meant -- GTK timeout not idle callback. That's how I was thinking to do it, since a perfect framerate is not critical anyway.

 

Btw, I've been holding back from merging your recent trunk changes, because I'm missing two source files - could you check them in?

 

Damn, I didn't realise, sorry. I'll check when I get back home (any missing files will be on my home PC).

Link to comment
Share on other sites

Thanks, guys.

 

to be clear though this is just a viewer right, not an editor? - still have to go to console to edit/create.

Yes, this is the viewing part I'm coding on, but it's the much more difficult part. The editor is GUI work, which is not hard, just tedious.

Link to comment
Share on other sites

Cool stuff, this is really useful for Linux users (who can't use the in-game particle editor). :wub:

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

More progress: after implementing the "view" orientation type, almost all D3 particles can be properly played back now (including the ones with "animationFrames", "aspect", "fade fraction" and other funky stuff).

 

What's left to do:

 

- Add support for the orientation "aimed" which is a bit harder than the rest, requires some more reverse-engineering.

- Add some more preview controls to restart and stop playback.

- Tweak default direction.

 

After this will have been done, I'll merge back into trunk.

Link to comment
Share on other sites

Great!

 

Just so you know, since you mentioned how tedious it would be to make a particle editor, it's worth saying how terrific it would be for mappers. I remember looking for a drip particle and the only one there wasn't very good, and I had a sinking feeling not knowing at all how to make the particle I wanted (one thing I really missed from dromed). We all know how particles, used well, can really add magic & immersion to a map. So working on an editor plugin is Good Work. I understand setting priorities and all; I just didn't want you to get sucked into the tedium without a little more encouragement about how nice it would be and that it's worth it. :)

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Great work as always, greebo! Looking forward to the preview, that should be much faster for Linux user instead of having to load a map in D3. :wub:

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Finally, the preview is feature complete. The last 10% were the hardest, as expected, but I'm through now and DarkRadiant's preview offers support for all the particle features in Doom 3. The toughest feature was the "aimed" orientation which was pretty hard to reverse-engineer, followed by the animationFrame fading. Very tough, but a fun and challenging project in retrospect.

 

The stuff is going to be merged back into the trunk, so I hope there are not many linux compilation issues, but if there are any, could you please take care of them, OrbWeaver?

 

Some screenies:

 

A helix particle using aimed trails with large time values and inverse gravity

particle_preview01.png

 

The particle I used to reverse-engineer the custom path "flies"

particle_preview02.png

 

D3 torso_fire particle

particle_preview03.png

 

Soul particle with aimed trails

particle_preview04.png

 

TDM Fire particle:

particle_preview05.png

Link to comment
Share on other sites

The stuff is going to be merged back into the trunk, so I hope there are not many linux compilation issues, but if there are any, could you please take care of them, OrbWeaver?

 

Yep, no problem. Hopefully I will also find some time to flesh out the GtkBuilder implementation so that designing an editor GUI is easier.

Link to comment
Share on other sites

@OrbWeaver: I installed Ubuntu 10.10 and my compilation is failing on the gtkutil library with this message:

 

libtool: link: g++ -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.4.5/crtbeginS.o .libs/ConsoleView.o .libs/GLWidget.o .libs/PanedPosition.o .libs/VFSTreePopulator.o .libs/Timer.o .libs/WindowPosition.o .libs/PersistentTransientWindow.o .libs/Dialog.o .libs/MessageBox.o .libs/dialog_legacy.o .libs/glfont.o .libs/MenuItemAccelerator.o .libs/cursor.o .libs/DeferredAdjustment.o .libs/PopupMenu.o .libs/widget.o .libs/RegistryConnector.o .libs/PathEntry.o .libs/TreeModel.o .libs/ModalProgressDialog.o .libs/SerialisableWidgets.o .libs/SourceView.o .libs/clipboard.o .libs/FileChooser.o -Wl,-rpath -Wl,/home/greebo/darkradiant/libs/xmlutil/.libs -Wl,-rpath -Wl,/home/greebo/darkradiant-install/lib/darkradiant /usr/lib/libgtkglextmm-x11-1.2.so /usr/lib/libgdkglextmm-x11-1.2.so /usr/lib/libgtkglext-x11-1.0.so /usr/lib/libgdkglext-x11-1.0.so -lGLU -lGL -lXmu -lXt -lSM -lICE /usr/lib/libpangox-1.0.so -lX11 /usr/lib/libxml2.so -lgtksourceviewmm-2.0 -lgtksourceview-2.0 /usr/lib/libgtkmm-2.4.so /usr/lib/libatkmm-1.6.so /usr/lib/libgdkmm-2.4.so /usr/lib/libgiomm-2.4.so /usr/lib/libpangomm-1.4.so /usr/lib/libgtk-x11-2.0.so /usr/lib/libglibmm-2.4.so /usr/lib/libcairomm-1.0.so /usr/lib/libsigc-2.0.so /usr/lib/libgdk-x11-2.0.so /usr/lib/libatk-1.0.so /usr/lib/libgio-2.0.so /usr/lib/libpangoft2-1.0.so /usr/lib/libpangocairo-1.0.so -lgdk_pixbuf-2.0 /usr/lib/libcairo.so -lpng12 /usr/lib/libpango-1.0.so /usr/lib/libfreetype.so -lfontconfig /usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so /usr/lib/libgthread-2.0.so -lrt /usr/lib/libglib-2.0.so ../../libs/xmlutil/.libs/libxmlutil.so -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../.. -L/usr/lib/x86_64-linux-gnu -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.4.5/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crtn.o -Wl,--export-dynamic -pthread -pthread -pthread -Wl,-z -Wl,defs -pthread -Wl,-soname -Wl,libgtkutil-1.5.0.so -o .libs/libgtkutil-1.5.0.so

libtool: link: (cd ".libs" && rm -f "libgtkutil.so" && ln -s "libgtkutil-1.5.0.so" "libgtkutil.so")

/bin/sed: can't read /usr/lib/libgdk_pixbuf-2.0.la: No such file or directory

libtool: link: `/usr/lib/libgdk_pixbuf-2.0.la' is not a valid libtool archive

make[3]: *** [libgtkutil.la] Error 1

 

It is a bit different to the message posted on the bugtracker, but it's the same library causing troubles.

Link to comment
Share on other sites

That's actually a bug in the libgdk-pixbuf-2.0-dev package in Ubuntu 10.10. I just submitted a patch that allows you to build a correct version of the package to Launchpad:

 

https://bugs.launchpad.net/ubuntu/+source/gdk-pixbuf/+bug/665768

 

Other than that, I've updated the DR Linux build scripts and everything looks fine, including the particle previewer.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • The Black Arrow

      Hey @nbohr1morehow come the zombies in The Dark Mod don't have a "resurrection" mechanic to it, similar to how Thief has it?
      They're quite a weak creature as of right now, it's merely a walking corpse that slashes you, making attacking them to kill them an actual strategy.
      Would be better if they had some cool mechanism to it that truly makes them a danger, such as the resurrection idea itself.
      · 2 replies
    • Ansome

      Query: when was the last time a zombie in a video game was unnerving or scary to you? I'm chipping away at my anniversary submission and I've been trying to gather opinions on the subject. I'm perfectly capable of lighting them well, changing their sfx, and creating effective ambience, but I'm worried that zombies at their core are just too overdone to be an effective payoff to the tension I'm creating.
      · 4 replies
    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
×
×
  • Create New...