snapshot from plugin testing

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

snapshot from plugin testing // SDK, Plug-in & 3rd Party Area

1  |  

Post by frootee // Nov 1, 2008, 8:06am

frootee
Total Posts: 2667
pic
ok... here's a snapshot of an object which was created from the importer plugin I am working on. Getting closer now! I resolved the scaling/translation issue.


I am working on the interface now. There are lots of things I want to do; part of this is C++; the other part (after import) is currently scripted. I have a lot in mind for this. Most of it works already; there are a few things I want/need to incorporate, plus documentation/tutorials.


Get Ready To Get SOAKED! :banana::banana::banana:

Post by Johny // Nov 1, 2008, 8:41am

Johny
Total Posts: 672
pic
Cool Frootee! :banana:

Post by ivampretti // Nov 1, 2008, 1:18pm

ivampretti
Total Posts: 151
pic
Maaaaaan you are almost there! It looks awsome! I hope my procedural objects had helped you!

Post by RichLevy // Nov 1, 2008, 1:29pm

RichLevy
Total Posts: 1140
pic
Very good work Frootee :banana:

I can't wait to play around with this.


Rich

Post by robert // Nov 2, 2008, 5:12am

robert
Total Posts: 609
pic
Depending on how quickly I learn the dynamics of fluid simulation and how fast I can implement it using the SDK, this may become obsolete relatively quickly.:p

Just messing with you, I have no idea what I'm doing, but I am trying to implement actual SPH (http://en.wikipedia.org/wiki/Smoothed_particle_hydrodynamics) and possibly Blender's LBM (http://elbeem.sourceforge.net/) method. At the moment I have written C++ code to find all the factors of any number. Without all the comments it is probably around 100 or so lines. Not to bad all things considered.;)

I know there is also a Vector Fields (http://en.wikipedia.org/wiki/Vector_field) method which could be very effective in simulated 2D/2.5D like what Dan-Ball's Powder Game (http://dan-ball.jp/en/javagame/dust/) and Liquid Dragon Studios (http://www.liquiddragon.com/tech.php) (link is to tech page) seem to be doing.

Any help is appreciated as right now I'm kinda lost and don't have very much time to learn C++ let alone the tS SDK. So help with either would be appreciated.:)

I know Froo you have helped me so far, thanks for all the info. Anyone else who has either actually programmed a fluid sim, whether in C++ or a sibling language like Java or something, or is familiar with them let me know as this could be a great addition to tS and also to my extended essay.:p

Nice work tho Froo, really something amazing you have there.

Post by frootee // Nov 2, 2008, 8:40am

frootee
Total Posts: 2667
pic
Maaaaaan you are almost there! It looks awsome! I hope my procedural objects had helped you!


Thanks Ivampretti. Your real time work is progressing very well too!


I was going to upload a video but it keeps timing out. Oh well.

Post by Burnart // Nov 2, 2008, 1:43pm

Burnart
Total Posts: 839
pic
ok... here's a snapshot of an object which was created from the importer plugin I am working on.


Wow! Looks very impressive! I'm curious - importing from what?

Post by frootee // Nov 2, 2008, 1:56pm

frootee
Total Posts: 2667
pic
Thanks Burnart.

Importing from Blender.

This is a single RsObj file which is loaded in truespace and rendered using the real time viewer. It's only a sample, so we can get far better results with texturing, etc.


I am currently generalizing the solution, in order to simplify user interaction.


EDIT:


Well I finally uploaded this simple little demo file.

I made a simple mug in truespace: composed of a half-torus for the handle, and a booleaned cylinder. I moved the mug in truespace, then exported this to DXF format.


Then I imported this into blender. The model was in the same position as truespace.


When I write the documentation, I will use a higher quality version of this, to explain the workflow.


Please bear in mind this is an extremely simple test; I was not concerned with image quality; hence the jerkiness. This can look a heck of a lot better.


The movie was rendered out to 320 x 200 in truespace Workspace side, using the toolset I am building which will allow integration of the fluid sim playback with scene animation.

Post by frootee // Nov 3, 2008, 5:30pm

frootee
Total Posts: 2667
pic
just a little update; please see previous post.

Obviously it needs work... :D

My intention is to make this look like beer but right now it looks like Hot Marshmallow Goo, or shaving cream.
Oh well. Discovering is half the fun!

Post by transient // Nov 3, 2008, 5:52pm

transient
Total Posts: 977
pic
That's a pretty good demo, this is going to be very cool.:)

Post by Asem // Nov 4, 2008, 12:13am

Asem
Total Posts: 255
Awesome frootee! By the way those who have decided to try and work on a fluid sim from scratch should not give up just because of frootee's plug-in. I've messed with the blender fluid sim and it's by far not perfect and atm not multi-threaded so multiple processor don't help but is still really powerful.

Since the simulation has to be done in blender. blender does not necessarily have a phys simulation that's outside of the game engine (this is why I think not perfect; they use bullet) though I've heard that it was to have one at some point maybe 2.5 (more than a normal release). I'll try to give an example:

1)You can't have the water fluid physically interact with an object at least as far as physics goes like having rushing water push a sphere/ball down some path. the ball will pretty much remain stationary. though you can use the object as a way to obstruct the fluids path like a barrier in this sense.

2)You can ,however , make objects interact with the water sim though like dropping a ball into a pond having the ball displace the fluid. You would use blender's physics engine and create a rigid body and have to export the objects keys from outside of the real-time.

The closest I've thought about how a work around should happen for (1) is when the fluid mesh is loaded to give it a ts property for buoyancy to happen.

I'm not sure if frootee's plug-in does more than I think and if it does than all the more better. Way to go frootee!

By the way blender's fluid sim got a few new features called control where it seems to act like an attraction type force. I've seen videos and it looks close to something like having the water transform into an object for example which is neat something kinda like the T1000 from the terminator.

Post by frootee // Nov 4, 2008, 4:05am

frootee
Total Posts: 2667
pic
Thanks Asem.

The solution to (1) would work, if we were working with a single RsObj file. But we are not. The fluid simulator generates a series of mesh files. The importer converts each file to an RsObj object. Therefore, I will have to implement physics via scripting in truespace. Specifically, I will be using the IRiPhysicsCommand Interface. We can use commands such as Physics.AddImpulse, and Physics.MoveObject, to do what we need. In several of the Physics commands, we include a time step as a parameter. I'll give it a shot to see how it looks.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn