nVidia fire from vulcan demo [updated for Ogre 1.8.0]

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
User avatar
bishopnator
Goblin
Posts: 223
Joined: Thu Apr 26, 2007 11:43 am
Location: Slovakia / Switzerland
x 5

nVidia fire from vulcan demo [updated for Ogre 1.8.0]

Post by bishopnator »

Hi, I tried to implement fire from nvidia's vulcan demo. Of course the most important thing on this effect is texture. I used texture from vulcan demo. I tried to find license which covers this texture but I didn't find it (in vulcan demo license I didn't find anything about files in demo, but I can missed something). I wrote question about this texture to nVidia's forum and I they will answer that it is not possible to use this texture I will must remove this example :-\

My goal was to implement fire as particle system using built in particle system support in ogre instead of coding own by myself. I had some problems which I didn't solve very nicely, so any suggestions are welcome ;-)

Because texture is volume texture stored in DDS (3D texture) I needed to use custom shaders and animate particles inside shader. Current implementation of ParticleSystemRenderer for rendering particles as billboards doesn't support custom vertex format definitions and I think that also using BillboardSet is not very good forbillboards which are rendered via shaders. So I created my own ParticleSystemRender which allows defining own vertex format in particle system script. Second problem was how to bind custom data to particles and access these data in shader. Particle class support BRAND NAME but that's all. It is not possible to handle this data in current emitters implementations - It is only possible to create this data in current renderer but there is no way how to work with it in current classes.

I decided to solve this by writing my own emitter class (I copied BoxEmitter from FX plugin) and add support to emitter for setting custom data in emitted particles. So result is that renderer create vertex declaration based on informations in script and at the end of declaration it adds also one tex coord with float4 type which is filled from particles.

Source code:
http://www.mediafire.com/?8t6nstsk8qy6yp8
Updated for the Ogre 1.8.0 - I built the Ogre from source and updated my project settings to this, so for OgreSDK it will be maybe necessary little adjustment. I still use VS2005, so only the project files for this VS are provided (I am just starting with CMake so if it will be huge interest, I'll create the settings for it). Anyway also with the latest Ogre it is not working properly with OpenGL - it seems that volumetric textures are not fully supported in Ogre with OpenGL renderer. During porting from Ogre 1.6.x to 1.8.0 I didn't know how to adjust/fix the methods in ShaderParticleRenderer::getNumWorldTransforms and in ShaderParticleRenderer::getWorldTransforms (I left the original code commented there so if anybody will suggest proper migration, I'll change it (seems that some methods from Ogre::Node were removed). Also in release mode from unknown reason it is not possible to unzip OgreCore.zip - in debug there is no problem. So in release mode it is necessary to unzip the file to the same folder and just comment it (or remove) in resources.cfg, then it is also working in release without problem.

Particle script for this:

Code: Select all

particle_system nVidia/fire
{
  quota              200
  material           animated_particle
  particle_width     2
  particle_height    2
  cull_each          false
  renderer           shader
  sorted             true
  local_space        false
  iteration_interval 0.01
  nonvisible_update_timeout 0
  
  // renderer specific
  diffuse_colour     true
  texture_coord      true
  particle_size      true
  time_frag_inv      true

  // emitter for fire particles
  emitter BoxWithCustomParam
  {
    angle              0
    colour             1 1 1 1
    direction          0 1 0
    emission_rate      5
    position           0 0 0
    velocity_min       0.5
    velocity_max       1.0
    time_to_live_min   1.5
    time_to_live_max   1.8
    duration           0
    
    // box emitter specific
    width              0.3
    height             0.1
    depth              0.3
    custom_params      0.0 0 0 0
  }    

  // emitter for smoke particles
  emitter BoxWithCustomParam
  {
    angle              10
    colour             1 1 1 1
    direction          0 1 0
    emission_rate      20
    position           0 0 0
    velocity_min       2.5
    velocity_max       4.0
    time_to_live_min   1.9
    time_to_live_max   2.1
    duration           0
    
    // box emitter specific
    width              0.3
    height             0.1
    depth              0.3
    custom_params      0.5 0 0 0
  }    
}
Attachments
ogre fire screenshot
ogre fire screenshot
ogre_fire.jpg (12.29 KiB) Viewed 8495 times
Last edited by bishopnator on Tue Jun 19, 2012 8:08 pm, edited 6 times in total.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: nVidia fire from vulcan demo

Post by jacmoe »

That's on fire! :D
Looks great.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
Xplodwild
Goblin
Posts: 231
Joined: Thu Feb 12, 2009 3:49 pm
Location: France
x 13
Contact:

Re: nVidia fire from vulcan demo

Post by Xplodwild »

It says "File currently unavailable."

Try upload it to Filebeam
User avatar
bishopnator
Goblin
Posts: 223
Joined: Thu Apr 26, 2007 11:43 am
Location: Slovakia / Switzerland
x 5

Re: nVidia fire from vulcan demo

Post by bishopnator »

File uploaded also to FileBeam - see my updated first post ;-)
User avatar
TWO
Halfling
Posts: 61
Joined: Sat Jan 26, 2008 9:30 pm
Location: Germany
Contact:

Re: nVidia fire from vulcan demo

Post by TWO »

Great effect, very voluminous :)
Lord LoriK
Goblin
Posts: 254
Joined: Tue Feb 13, 2007 5:33 am

Re: nVidia fire from vulcan demo

Post by Lord LoriK »

Look great! Thanks a lot for sharing it. :D
User avatar
Kyle_Katarn
Halfling
Posts: 92
Joined: Tue Jul 21, 2009 7:51 am
Location: Australia

Re: nVidia fire from vulcan demo

Post by Kyle_Katarn »

Wow man, that looks realistic as hell. Thanks for sharing man.
User avatar
Jabberwocky
OGRE Moderator
OGRE Moderator
Posts: 2819
Joined: Mon Mar 05, 2007 11:17 pm
Location: Canada
x 218
Contact:

Re: nVidia fire from vulcan demo

Post by Jabberwocky »

What's the deal, do you need to register at filebeam in order to download stuff?
I get a greyed-out, non-responsive download icon when I click the filebeam download links.

-edit- nevermind, after refreshing a few times, it's clickable now.

-edit2- yeah, that looks fantastic. Well done!
Image
neoranga974
Kobold
Posts: 25
Joined: Tue Apr 28, 2009 3:17 pm

Re: nVidia fire from vulcan demo

Post by neoranga974 »

Is this already Christmas ?

Thanks Santa Claus !
User avatar
CoreDumped
Gremlin
Posts: 177
Joined: Sun Aug 05, 2007 3:55 pm
x 14

Re: nVidia fire from vulcan demo

Post by CoreDumped »

looks great. thanks for sharing
User avatar
westpointer
Halfling
Posts: 62
Joined: Fri May 23, 2008 9:29 am

Re: nVidia fire from vulcan demo

Post by westpointer »

I can't download it, could you please upload it to RapidShare?

EDIT: I finally downloaded it after about 1 hour. But when I run the demo in debug mode, I get the following assertion, while in release mode is OK
Attachments
20091127213252796.jpg
20091127213252796.jpg (16.89 KiB) Viewed 7521 times
User avatar
bishopnator
Goblin
Posts: 223
Joined: Thu Apr 26, 2007 11:43 am
Location: Slovakia / Switzerland
x 5

Re: nVidia fire from vulcan demo

Post by bishopnator »

I already logged bug about this assert http://www.ogre3d.org/mantis/view.php?id=254. If this method will be fixed I suppose that this demo will be runnable also under OpenGL.
fiorebat
Gnoblar
Posts: 3
Joined: Sat May 12, 2012 11:57 am

Re: nVidia fire from vulcan demo

Post by fiorebat »

I'm tring to using it now with 1.7.3, but I cannot download source, normal particle loader says: "Cannot find requested render type. in ParticleManager::_createRender"
User avatar
bishopnator
Goblin
Posts: 223
Joined: Thu Apr 26, 2007 11:43 am
Location: Slovakia / Switzerland
x 5

Re: nVidia fire from vulcan demo

Post by bishopnator »

It is some time when I worked with Ogre last time .. but I should have still the sources on my hard drive - I'll look for them and refresh the download link. I'll try to compile and run it also with the latest Ogre.
User avatar
bishopnator
Goblin
Posts: 223
Joined: Thu Apr 26, 2007 11:43 am
Location: Slovakia / Switzerland
x 5

Re: nVidia fire from vulcan demo

Post by bishopnator »

After short play with latest Ogre, I managed the project works again - see 1st post and updated link. Also I described there some problems and notes about the porting - any suggestions are welcome. I saw the new sample framework for the 1st time and I am really impressed - if it is possible to suggest new sample, I can update the project to be suitable as sample (with some improvements if necessary). Enjoy and feel free to create real hell ;-)
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: nVidia fire from vulcan demo [updated for Ogre 1.8.0]

Post by duststorm »

I'm glad this project got revived, I missed it the first time around. It looks really impressive :)
A hellish fire demo for the ogre samples would really be a cool idea.
Developer @ MakeHuman.org
fiorebat
Gnoblar
Posts: 3
Joined: Sat May 12, 2012 11:57 am

Re: nVidia fire from vulcan demo [updated for Ogre 1.8.0]

Post by fiorebat »

tnx
Olive
Gnoblar
Posts: 2
Joined: Fri Jan 15, 2010 4:14 pm
Location: France

Re: nVidia fire from vulcan demo [updated for Ogre 1.8.0]

Post by Olive »

I was searching a good fire effect and this one is really great.

I had a problem on linux with this effect.
I fixed it by converting the frames.dds to a dds without compression (with gimp dds plugin) and this time it was working correctly.
Perhaps a problem with the support of compressed dds volume texture somewhere in OgreGLHardwarePixelBuffer.cpp.

Thanks for sharing this code
Post Reply