Jump to content
Hash, Inc. Forums

aaver

A:M User
  • Content Count

    614
  • Joined

  • Last visited

Community Reputation

0 Neutral

About aaver

  • Rank
    Prolific

Contact Methods

  • Website URL
    http://www.dotnet.se/aaver/
  • Yahoo
    anders_averoe

Previous Fields

  • Interests
    ■ Computer Graphics<br>■ Throwing Pottery<br>■ Singing<br>■ Reading<br>■ Music<br>■ Cooking<br>■ Scottish Single Malt Whisky<br>■ Computer Programming<br>■ Mathematics & Physics<br>■ Puzzle Solving<br>■ Problem Solving
  • Hardware Platform
    Windows
  • System Description
    Dell Latitude D600, Pentium M 1.7GHz, 512 MB RAM
  • Contests Won
    *

Profile Information

  • Name
    Anders Averö
  • Location
    Gothenburg, Sweden (GMT+01:00)
  1. I think I have already tried everything, but I'm still on v12.0w. Maybe this is only working in v13? Probably not, but can anyone confirm Object Collision working in v12.0w?
  2. BUMP! I just tried this again, but still no luck What is it that I don't understand? or is this in fact a broken feature?
  3. I think this is the method. There are of course different approaches for the surface tracking mechanism (particles, implicit surfaces,...), but in principle they are the same. Free surface flow is actually mixing of two different fluids; water and air.
  4. 100x100x100 cells are probably good enough for the simulation, but not for realistic rendering. But where do you get the density bitmap from? Generally, a CFD simulation produces a vector field. To visualize this in a realistic way, you will have to fill this vector field with some kind of "media" (mass less particles typically). For free surface flow, you will also have to have some kind of surface tracking mechanism (also particles usually) which is fed back to the CFD simulation. All these particles are then possible to transform into a density bitmap, should you want. The interpolation takes place when you move the particles in the vector field. Too large time steps are generally the reason for unstability although very small steps could give rise to floating point resolution instability. An implicit solver is always stable so the time steps should be chosen in order to make the water look realistic enough rather that to match the A:M sub-frame time step. I'm honored, but I have very little time for this at the moment. I'd be glad to help as much as I can though:) A year ago when I had more time for this I had a discussion with Bob Croucher on this. The GetPatchPoints() method is supposed to give you the patch points fully transformed in a Chor or Action, but for some reason it doesn't work as intended. Bob looked at it, but I don't know if this problem has been fixed in v13 SDK. If you have all the fully transformed patch points, it shouldn't be too hard to write a collision detector for a CFD solver.
  5. Marcel, I've written some about this a long time ago here and I'm sure you know that I also have plans for fluids in A:M. For the 2D case (i.e. water surface without self collision) I'm almost ready. I just have to find some more time to finish it (the problem is that I don't have much time to spare). For the more general case (the one you probably aim for) I have done some pre studiers. I've read and hopefully understood most of the research papers related to fluids in computer graphics and I think I have decides for which approach to choose. Using a freely available CFD library has crossed my mind, but since all that I've fond has been intended for engineering work, I've decided to implement my own solver based on the papers I've read. The main differens between an engineering CFD solver and a CG one is that for engineering, every physical property has to be accurate while for CG it only has to look stunning The later is much easier for the computer. I'm far from being an expert on this, but I'll try to give you some answers. There are examples of dedicated CG CFD that runs real time on modern computers That depends on the situation, but if you want realistic spray from free surface water, you will need a lot of resolution. There are two main approaches for solving differential equation; implicit methods and explicit ones. For the explicit method you need to have small enough time steps for the simulation to be stable. The implicit method is always stable for every time step, but you have to solve a large system of equations (i.e. invert large sparse matrices). I wouldn't recommend solving the system for every subframe though, but to interpolate the fluid position. I have! and I'm sure I'm not alone
  6. Drop your glass model over your table model in the choreography window (from the top view)
  7. Thanks. I am trying to make this plugin available to others. When I run it on another machine than the one I compiled it on I get this message: Unable to load plug-in [F:\Program Files\Hash Inc\V13.0\HXT\decalDeform.hxt], The specified module could not be found. (run on Windows XP home edition service pack 2. AM Version 13.0a.) Is there a guide somewhere on how to productionize a plugin? Do you have to have a Mac to compile the plugin for Mac users? I'm not familiar with that error message, but I compiled my own version of the plugin. I've attached it so you can test if that one gives you the same error. (Note: In my version, the displacement takes place in the y direction) Steffen knows everything on making plugins for the Mac (and not only for the Mac). Read all his posts on the SDK forum! ImageDisplace.zip
  8. You still have one bug left that is hard to find. When you change a CP you should change the Head CP of the CP stack. Since your code changes most stacks several times, it will probably take a while before you experience this bug. To fix the bug, always change the Head CP: cp = hbpuv->GetPatch()->GetCP2()->GetHead();
  9. Try this if ( hbpuv->IsPatch5UV() ) { HPatch5 *fivePoint =(HPatch5 *)hbpuv->GetPatch(); cp = fivePoint->GetCP5(); pos = *cp->GetPosition(); hcp->ReadBitmap(uvs[12].x*dWidth, uvs[12].y*dHeight, &heightValue, &opacity, 1); pos += Vector(0.0f, 0.0f, heightValue.Red()); cp->SetPosition( &pos ); } Also, you have one more problem to solve before your plugin is ready. You displace most of the CPs more than once. For a grid like this CP1------CP2------CP3 | | | CP4------CP5------CP6 | | | CP7------CP8------CP9 with your code, CP1, CP3, CP7 and CP9 are displaced once, CP2, CP4, CP6 and CP8 are displaced twice and CP5 is displaced four times since it's a member of four different patches. Before you are ready, you have to add some bookkepeing so you displace every CP just once. I think Steffen offered you some code in another thread that may be usefull for that.
  10. You do realize that the HDecal coordinates and the UV coordinates are different, don't you. Try this and I think you will have a working plugin int dWidth = hcp->GetWidth(); int dHeight = hcp->GetHeight(); . . . hcp->ReadBitmap(uvs[0].x*dWidth, uvs[0].y*dHeight, &heightValue, &opacity, 1);
  11. You mean like right clicking on the decal and seeing a plugin option there? How do I get the plugin option to show up there? In my Entry.cpp file I have: extern "C" __declspec(dllexport) BOOL HxtOnCommand(TreeObject, UINT index) { switch(index) { case MODEL: bla bla bla case OBJECTCONTAINER: bla bla lba } return FALSE; ) Is this the member funtion that generates the "plugin" option when you right click on the model or decal or coreography? To call your plugin from a HDecal, try this enum { DECAL }; extern "C" __declspec(dllexport) const BOOL HxtLoadCommandEntry(UINT index, ObjectType &objtype) { switch (index) { case DECAL: objtype = HOT_DECAL; return TRUE; } return FALSE; } Try this: HCP *cp = hp->GetCP1(); Vector pos = *cp->GetPosition(); pos += Vector( 0.0f, 0.0f, 10.0f ); // or what ever... cp->SetPosition( &pos );
  12. Yes it is, but maybe you should consider calling the plugin directly from the HDecal. That way you won't have to decide which decal to base the displacements from, should there be more than one. You can of course decide to pick the right one from a drop down list. It's a matter of taste, I guess. If that's the case, I'm happy to be able to help
  13. Aaver, Do you happen to have any source code that extracts the greyscale RGB value from a decal at a CP location? I am making a large mountain terrain with rugged cliffs and geological formations. I use 5 point patches and hooks to put lots of patches where the details are high and transition out to large patches to save on model size. I want to apply a heightmap decal to the finished 2D mesh or maybe even use a rotoscope and alter the altitude of the CPs with the greyscale values. I apologize for putting this request on several threads of this form but I am anxious to complete this plugin so I can finish my mountain range in time. I'm sorry, but I can't give you any advice off-hand to solve this. However, this pseudo code might be helpful: Vector2 uvs[15]; HClipProperty *hcp = hd->GetChildDecalClipContainer()->GetChildDecalClip()->GetClip(); HDecalStamp *hds = hd->GetChildDecalStampContainer()->GetChildDecalStamp(); for ( HBasePatchUV *hbpuv = hds->GetFirstPatchUV(); hbpuv; hbpuv = hds->GetNextPatchUV( hbpuv ) ) { hbpuv->GetUVs( uvs ); if ( hbpuv->IsPatch5UV() ) { // hbpuv[0], hbpuv[3], hbpuv[6], hbpuv[9] and hbpuv[12] now holds the UVs for the 5 point patch } else { // hbpuv[0], hbpuv[3], hbpuv[6] and hbpuv[9] now holds the UVs for the 4 point patch } HPatch *hp = hbpuv->GetPatch(); //hp now holds a reference to the actual patch. // With hcp->ReadBitmap( float x, float y, RGBFloat *diffuse, float *opacity, float pixelwidth ) // you may now read the color values from the decal for a particular UV coordinate and then // adjust the height for the Patch CPs accordingly }
  14. So a simple plugin that just generates a patch model from a height map won't make you happy then? I think I'll start with that anyway and after that, I'll give the complete terrain wizard another thought. The ocean plugin isn't available. It's not that difficult to program though and I have an almost working version for A:M v11, but when the SDK changed for v12 it wasn't possible anymore (or maybe I just don't understand how to). In the v13 SDK, I think it's possible again, but I don't have access to A:M v13 which makes development virtually impossible. Maybe I'll finish the v11 version, but since it won't run under A:M v12 & v13 I'm not sure really. Eventually there will be an Ocean plugin available. I'm not able to tell you when, though...
  15. I'm still working on this as in thinking about it, but it isn'ta high priority anymore. Why would you like to see an alternative to the standalone "Terraform"? Maybe you could convince me to continue with this idea. Programming a simple plugin that just generates a patch model from a height map takes maybe a day or two so if that would make you happier, I'd consider it
×
×
  • Create New...