user-guide for dynamica?

Is anybody here who could write an user-guide for dynamica? I would really like to use it, but I can’t seem to get to do what would like it to.
Thanks.

hehe, I’m still trying to figure out the path thing, I haven’t even got to really see it yet.

that’s really easy to fix. Just tell me where you unziped everything and I’ll try to make one to fit your path.

About the user guide thing, the FAQ.txt file containts some bits of informations on trickier functions like intergrav and grav attractors. I’ll try releasing a couple of example files for people to look at (the .blend and .dat files I mean).

Martin

That would be areal start, thanks!

Okay theeth, don’t laugh, I have a very bizarre way of organizing things. I unzipped to here:

C:/Sandy’s Imagination/3-D Stuff/Blender Documents/Python/Dynamica

okay, go ahead and laugh!

naah, I never laugh for something like this. It’s way more tidier than my HD.

ok, try copying the following in a text editor and saving it as Dynamica.py
Then, place it somewhere where it can be accessible by Blender. If you have your Python Lib path set in the Blender Info window, try putting it there.


# DYNAMICA PATH AND MODULE IMPORT SCRIPT
# (c)The Dynamica Team

import sys

Benchmark = 0



def SetPath():
	sys.path.append("C:/Sandy's Imagination/3-D Stuff/Blender Documents/Python/Dynamica/module")

def runBenchmark():
	global Benchmark
	Benchmark = 1

def LoadLIB(Path):
	global Benchmark
	if Benchmark == 1:
		import time
		init = time.time()
	SetPath()
	global LIB
	from ParticlesSystem import *
	from Physics import *
	import Blender
	import dynoise

	from math import *
	import dyshelve

	try:
		dir(LIB)
	except NameError:
		print "loading DATA"
		LIB = dyshelve.new(Path, "c")

	runSystem(LIB)

	if Benchmark == 1:
		import time
		print "iteration made in " + str(round(time.time() - init, 2)) + " seconds, with " + str(len(LIB["PCLOUD"].Particles)) + " particles."

def Reset(Path):
	SetPath()
	global LIB
	from ParticlesSystem import *
	from Physics import *
	import Blender
	import dynoise

	from math import *
	import dyshelve

	print "loading DATA"
	LIB = dyshelve.new(Path, "c")

if everything works ok, you should get the message “loading DATA” in the console. That means that the scripts started correctly and has finish loading the data already.

Martin
PS: about the demos, I’ll try packing a couple of them this week end and putting them online by monday.

thanks I’ll try that, one of these days I’ll be able to figure this out for myself.

The “Loading Data” is running in command window when I open Alpha06.blend. Should I be seeing anything other than a 3D window on the left and a code window on the right at this point?

I then hit Alt-P and get the following error:


loading DATA
Initializing GUI
  File "<string>", line 264
    "rand" + str(db["PCLOUD"].rdintp)
    ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "e:/blender/dynamica/module\GuiC.py", line 6, in ?
    import CustomAct
  File "e:/blender/dynamica/module\CustomAct.py", line 264
    "rand" + str(db["PCLOUD"].rdintp)
    ^
SyntaxError: invalid syntax
failed importing internal module GuiC
trying to import external module..
PYTHON SCRIPT ERROR:
Traceback (most recent call last):
  File "Gui.py", line 120, in ?
AttributeError: Section

Could anyone offer some assistance as to what I may have to do to fix? Thanks.

if you press Alt-A in the 3D window, you should see spheres been shot from a point in space and arcing down with gravity.

I then hit Alt-P and get the following error:


loading DATA
Initializing GUI
  File "<string>", line 264
    "rand" + str(db["PCLOUD"].rdintp)
    ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "e:/blender/dynamica/module\GuiC.py", line 6, in ?
    import CustomAct
  File "e:/blender/dynamica/module\CustomAct.py", line 264
    "rand" + str(db["PCLOUD"].rdintp)
    ^
SyntaxError: invalid syntax
failed importing internal module GuiC
trying to import external module..
PYTHON SCRIPT ERROR:
Traceback (most recent call last):
  File "Gui.py", line 120, in ?
AttributeError: Section

line 264 in CustomAct.py is (should be):


	print "rand" + str(db["PCLOUD"].rdintp)

I hope that works.

Martin

Thanks, that fix the problem, I must have accidentally deleted “print” when I was looking around the code. It works fine now and I’m looking forward to plying around with this. Great work.

http://www.clubinfo.bdeb.qc.ca/~theeth/DatRelease.zip

that’s the same release as before, but with a new dat file that showcase the gravity attractor effect. It uses 200 metaballs, so be carefull when rendering on slow CPUs. You just have to change the path in RunTime.py.

Martin
PS: I just discovered a bug when opening a dat with Gravity attractors: it doesn’t load the name of the attractors objects, so you’d have to retype them after loading. Maybe I’ll fix the bug soon enough.

In the installation text file it says I need Python 2.1 installed,…will Python 2.2 work as well?

The dynoise.dll file is compiled with Python 2.1

Please also note that it will not run in versions higher than 2.23.

Martin

Thanks. (looks awesome btw!) :o

:slight_smile: thats almost as bad as mine. I store it at:

C:\data\3d\blender\utils\dynamica\latest_version\ :wink:

Keith. 8)