ec3t
Newton Scholar
Posts: 103
|
Post by ec3t on Feb 17, 2005 0:42:14 GMT 1
here .. simply remove the rem and it would fizzle badly
ndb_newtoncreate set camera range 10,100000
mapvar=1 for Z=1 to 10 step 1 load object str$(Z)+".x",mapvar col=NDB_NewtonCreateTreeCollision(mapvar) inc mapvar next Z
do CONTROL CAMERA USING ARROWKEYS 0,50,1 ndb_newtonupdate loop
In this example i used 15000 poly models but , the fact is the application close , not only does it slow down all the comp , it crashes
|
|
|
Post by kjelle69 on Feb 17, 2005 14:19:15 GMT 1
This is a bug that I cant recreate easily. The following code creates 1000 Treecollision objects, use the box.x model that is included in the media library in the wrapper to test it out ! Your bug must be caused by some overloading due to high poly objects. Try the optimise flag in the treecollision command and see if you still get the error. sync on sync rate 60 autocam off
set ambient light 100
ndb_newtoncreate set camera range 10,100000 position camera 100,0,-50 y=0 dim Room(1000) for y = 0 to 9 for x=1 to 100 obj=x+(y*100) load object "box.x",obj color object obj,RGB(100,100,x*2.5) set object ambience obj, 80 col=NDB_NewtonCreateTreeCollision(obj) Room(obj) = NDB_NewtonCreateBody(col) NDB_BodySetDBProData Room(obj), obj
NDB_BuildMatrix 0.0, 0.0, 0.0, x*2.0, y*2, 0.0 NDB_NewtonBodySetMatrix Room(obj) NDB_NewtonReleaseCollision col Position object NDB_GetDBPro(Room(obj)),x*2.0,y*2,0.0 next x
next y do CONTROL CAMERA USING ARROWKEYS 0,1,1
ndb_newtonupdate text 10,10," Cycles "+str$(Looptimes) inc Looptimes if controlkey() then NDB_DebugDrawNewtonLines sync loop
function NeverCalled() if memblock exist(1) then delete memblock 1 endfunction
|
|
ec3t
Newton Scholar
Posts: 103
|
Post by ec3t on Feb 17, 2005 14:40:54 GMT 1
oops ... i just noticed the rem wasn't in the quote well ... with the optimise command , if the command is this : NDB_NewtonTreeCollisionEndBuild col, 1
it simply crashes the app , without it , it works perfect
the code i wrote above is a simplified and localized bug , the one i encounter is actually within 2 for to .... for x to ... for bla to bla ndb_newtoncreatetreecollision next bla next x
that loads 100 models total with 15000 faces each , that's certainly much , but i used destroybody in the past , and it would STILL fizzle , and not fizzle during the process , but BEFORE ! during the compilation , and i know that because i made it write the data tree to disk
|
|
|
Post by Kjelle69 on Feb 18, 2005 4:46:19 GMT 1
you only need the "NDB_NewtonTreeCollisionEndBuild" command if you are creating a treecollision by hand (poly by poly).
if not, just use this:
col = NDB_NewtonCreateTreeCollision( objnum, 1 )
don't forget the paranthesis!
|
|
ec3t
Newton Scholar
Posts: 103
|
Post by ec3t on Feb 18, 2005 4:49:35 GMT 1
walab is there an irc channel you get used to go to ? the forum is so great but it takes so long at the same time ... *edit* thanks for the rererereply once i get all the stuffs , i'll unofficially hang around the forum and try to answer to others too HMMMMMM .... well it made no changes .... in 2 loops code i'm talking about when i input for 1 to 10 for 1 to 1 ... that would compile and run for 1 to 10 for 1 to 10 would fizzle with some debug .tx and if i use ... 1 to 2 , 1 to 2 at both ... it still fizzle so it's not ressource related to me might be name related .... cause it's writting a data tree serialization on the hard drive Ok , tested with 3 to 6 , 5 to 10 .... that would work , but the test is fizzling at a certain stage ................. d**n .... i guess it's datatreecollision making related .... what i reckon is that the object would not be tree created so .... is there alternative ? i tried with the serializer given with the package it still fizzle for the 2 ,1 object (wich is the same size and all as others) and that is dbo file format
|
|
ec3t
Newton Scholar
Posts: 103
|
Post by ec3t on Feb 18, 2005 5:54:12 GMT 1
ok there is a prob .... when i try to serialize within the serializer ... nothing would work along with 3DS , when i try with X it works , for most of the files , when i try with dbo too (converted in 3 formats)
when i try the object i'm talking about , 2X1 , this object would just make the application freeze i'm under win2k , lastest direct X vid drivers all .... all lastest and upgraded
In the documentation you wrote "would work for MOST objects" .... what about the remaining object you talk of ? data tree collision isn't working now .... could that be considered a bug to report to them ?
|
|
|
Post by Kjelle69 on Feb 18, 2005 8:26:15 GMT 1
if you have an object with too many polygons in a single limb, the dbpro limit for memblock size makes it impossible. the only solution is to break up the model into a few limbs, and use the ",1" method I've mentioned before.
|
|
ec3t
Newton Scholar
Posts: 103
|
Post by ec3t on Feb 18, 2005 8:52:03 GMT 1
no that's not because of face count , as i mentionned it's poly count is equal again I'm sure it's the builddatatreecollision command itself that is bugging , i'm gonna consult newton forums OK , is there a serializer made out of c or c++ that can do walab's serializer job cause if serialized under db , that fizzle , so maybe another exe made in c++ would work better ? there are 100 objects to serialize whereas they are ok ... if i have to limb them all and write a command for each .... and beeing obliged to afterward code to make them limb serialize write the serialization etc .... will take 1 week to me whereas the stuff is not due to my objects you even posted on the newton forum walab , to report about the datatree beeing buggy , and he replied do it with and without to test , well , here , i can tell i'm stuck by that bug for 4 days now and answers come one at a day , so i can tell , since i sneaked alot , that it comes from DB , or the wrapper , or newton itself not from the models , and i'm 100% sure
|
|
|
Post by Kjelle69 on Feb 18, 2005 10:22:04 GMT 1
why don't you post the model in question, and perhaps we can help you out.
personally I think it's the model, because the wrapper seems to work for nearly every other model out there.
|
|
ec3t
Newton Scholar
Posts: 103
|
Post by ec3t on Feb 18, 2005 10:26:55 GMT 1
i will send it via mail
|
|
ec3t
Newton Scholar
Posts: 103
|
Post by ec3t on Mar 4, 2005 20:56:06 GMT 1
Ok i found the answer , it had to do with the models , apparently , the command fizzled for objects as is , and when poly shrinked , that worked
i think it has to do with the polycount , somehow for some models it worked (with a certain amount of poly ) ; for others not (same ammount)
i think one has to consider the size of them too ... may be the size also
|
|
aaa11
Newton Scholar
Posts: 117
|
Post by aaa11 on Sept 18, 2008 4:12:37 GMT 1
|
|
|
Post by wowposter on Nov 8, 2008 13:51:28 GMT 1
|
|