Max3D GoogleCode

Miscellaneous Forums/General Discussion/Max3D GoogleCode

official open source location:

http://code.google.com/p/bmx3d/


developer newsgroup is here:

http://groups.google.com/group/bmx3d


nicest pic posted so far (degac):




Original announcement here

I vote Max3D gets its own forum.

I would like to see the discussion of it broke down into subjects, rather than just all piled into one huge thread. This one will grow out of control too, I am sure.

I vote Max3D gets its own forum.

I would like to see the discussion of it broke down into subjects, rather than just all piled into one huge thread. This one will grow out of control too, I am sure.

The max3d forum is on googlecode - follow the link in the first post.

I have just uploaded the r61 based oop interface : you can get it here:

http://www.blitzforum.de/upload/file.php?id=4278

it is a bmx3d module called max3doop

instead of Import bmx3d.max3d just use Import bmx3d.max3doop

!!!Warning!!!
you are able to use the procedural or the oop way but don't mix them without knowing what you do ;)

All API functions are included together with the helper functions of the original max3d module.


the dropcubes sample in oop:


Strict
Import bmx3d.max3doop

TMax3d.Graphics 800,600


TMax3D.EnableCollisions 1,1,1000,0,0
TMax3D.EnableCollisions 1,10,1000,0,0


TMax3D.SetAmbientColor .5,.5,.5
TMax3D.DisableShadows()

Local camera:TCamera=TCamera.Create()



Local white:TMaterial=TMaterial.Create()
White.SetColor("DiffuseColor",1,1,1)

Local green:TMaterial=TMaterial.Create()
green.SetColor("DiffuseColor",0,1,0)

Local yellow:TMaterial=TMaterial.Create()
yellow.SetColor("DiffuseColor" , 1 , 1 , 0) 
Local lightTex:TTexture = New TTexture


Local light:TLight = TLight.CreateSpotLight() 
light.Move(20,20,20)
light.Turn(0 , 120 , 0) 

TModel.CreateSphere(yellow,.5,0,0).SetParent(light)

Local shape:TModel=TModel.CreateBox( white,1,1,1,1,1 )
shape.Hide()

Local ground:TModel = TModel.CreateBox( yellow , 50 , .1 , 50 , 10 , 0 ) 

Local yaw#,pitch#=45,zoom#=-50,rot#=0

While Not KeyHit( KEY_ESCAPE )

	If KeyDown( KEY_SPACE )
		For Local i=0 Until 3
			rot:+25
			Local copy:TEntity=shape.Copy()
			copy.turn rot,0,0
			copy.Move 0,Cos( MilliSecs()/3 )*3+15,Sin( MilliSecs() )*6+12;
			Global n
			n:+1
		Next
	EndIf

	If KeyDown( KEY_LEFT )
		yaw:-1
	Else If KeyDown( KEY_RIGHT )
		yaw:+1
	EndIf
	
	If KeyDown( KEY_UP )
		pitch:+1
	Else If KeyDown( KEY_DOWN )
		pitch:-1
	EndIf

	If KeyDown( KEY_A )
		zoom:+.5
	Else If KeyDown( KEY_Z )
		zoom:-.5
	EndIf
	
	camera.SetTranslation 0,0,0
	camera.SetRotation yaw,pitch,0
	camera.Move 0,0,zoom
	
	TMax3D.UpdateWorld
	TMax3D.RenderWorld
	
	
	Flip 0
	
Wend


Thanks klepto.

I personally think the offical SVN mod version should be object based as quickly as possible anyway.

Nice work though Klepto! :)

Dabz

I'm also missing a max3d section here. The BRL forum here is way more handy than googlegroups.

Btw is it possible that you name the type class on your own, so that one can use m.* instead of TMax3D (don't know if it's allowed but can you also choose 3d)?

Nice work Klepto.
I really think user should choose WHAT he want (procedural or OOP approach): everyone is satisfied!

Some questions

1. How to disable shadows 'per object'.
2. SetEntityScale is 'broken' with latest revision?


Strict

Import bmx3d.max3d

Max3dGraphics 800,600
EnableShadows
EnableCollisions 1,1,1000,0,0
EnableCollisions 1,10,1000,0,0
Local camera=CreateCamera()
Local light=CreateDistantLight()
TurnEntity light,0,60,0

Local white=CreateMaterial()
SetMaterialColor white,"DiffuseColor",1,1,1

Local green=CreateMaterial()
SetMaterialColor green,"DiffuseColor",0,1,0

Local yellow=CreateMaterial()
SetMaterialColor yellow,"DiffuseColor",1,1,0

Local shape=CreateBox( green,1,1,1,1,1 )
Local ground=CreateBox( yellow,50,1,50,10,0 )
MoveEntity ground,0,-5,0

SetEntityScale shape,1,2,1 '?????

Local cube2=CreateBox(white,1,1,1,1,1)
SetEntityScale cube2,1,200,1 '?????

MoveEntity camera,0,10,-10
TurnEntity camera,0,45,0

While Not KeyHit( KEY_ESCAPE )
	UpdateWorld
	RenderWorld
	Flip 
Wend


3. Where post 'bugs'? Here or on GoogleForum? Both?

4.

nicest pic posted so far (degac):


Oh my God...I think/hope there will be BETTER image in future than mine!

EDIT:

5. I would like to show in a canvas gadget the 3d scene of Max3d...

3. The bug tracker may be the best place?

degac, it is not broken, try this:

SetEntityScale shape , 1 , 2 , 1 '?????
ResetModelTransform shape
CreateBoxBody shape,1,2,1,1,1

Local cube2=CreateBox(white,1,1,1,1,1)
SetEntityScale cube2 , 1 , 20 , 1 '?????
ResetModelTransform cube2
CreateBoxBody cube2,1,20,1,1,1


Physic Engines mainly don't support matrix scaling of objects and so the Physics update functions return a normalized rotation matrix so, the matrix is back at a scale of 1,1,1 .

@taumel:

Of course you're free to rename the Types to whatever you want, thats why i have asked in the previous thread if someone has ideas for Type names etc.
Keep in mind that the oop interface is autogenerated mostly. Because of this there is currently the overhead in the TMax3D Type (the ptr, nre and delete methods) I really would like to here more ideas about namings etc.

TMax3D is okay if you want it self explanatory but it's also something which i don't want to type each time i enter a command, therefore the shorter the better (max3d., max., 3d., m.). As for commands, Director's Shockwave 3D has the best naming convention i've used so far, short and easy.

@Klepto2: Oh! Thanks!

Well, for me it's strange.
Max3d when creates a cube,it creates too a physic body of the SAME size of mesh.
It should be more logic that a change to a mesh scale will be reflected to its' physic body (just calling internally and automatically ResetModelTransform shape and CreateBoxBody shape,x,y,z,c,m)
I think it's more intuitive in the design considering every mesh/entity has a physic body attached to it (I suppose - I'm a completely new to C++).


I really think user should choose WHAT he want (procedural or OOP approach): everyone is satisfied!



Yeah, I meant that... Pardon me! :)

But I do think it should be delivered through SVN with the rest of it, instead of a seperate download, this way, everyone has the newest revision as soon as said revision is available, and they can just get on with it.

They'll be all out war if theres a major update, and poor Klepto is on his jollys! ;) Hehehe

Dabz

I have to say he is completely(with some restrictions) correct. The module i provide is named oop because it uses oop features provided by Bmax. Indeed the wrapper is more some sort of workflow simplification as i find it much easier if you can program with Objects or Types. I've got the main production boost with Blide. The intellisense helps a lot when you start with a new engine espacially if you're used to use minib3d like commands.

In one thing i disagree a bit, we all talk about the same API whether you use the "oop" or the procedural API directly. The oop just wraps the api commands directly to the belonging types. So the result should normally be the same.

Also i've done the interface because i don't like the int style programming.

things like cam=CreateCamera() are in my opinion just dirty code. and i like the Style using something like this: cam:TCamera = TCamera.Create().


things like cam=CreateCamera() are in my opinion just dirty code. and i like the Style using something like this: cam:TCamera = TCamera.Create().



Personally, I'm the same! :)

Dabz


But I do think it should be delivered through SVN with the rest of it, instead of a seperate download, this way, everyone has the newest revision as soon as said revision is available, and they can just get on with it.


I think this is a Mark decision: his engine, his site, his rules.

Considering the engine is still in developement (and lacks some major features) I think the actual way is correct. (the 'hard-work' is due only to codelite compilation time to be honest...)

And for OOP I think the simplest solution is to provide both MakeMax3d.bmx and MakeMax3dOOP.bmx (by Klepto2) so anyone can choose what he/she want: I dont'see any reason to start a 'religious war' about style programming :D

ps: The only thing I'm missing is a 'place' where post: I'm feeling non comfortable with googlecode pages - I can't explain exactly, but it seems so 'aseptic'. Googlecode seems tailored for 'professional coder' (what I'm not...)...


I think this is a Mark decision: his engine, his site, his rules.



Well thats a given, but its just a suggestion. ;)

Dabz

EDIT: Oh I see the comments I agreed with have been <Mogged> so I may as well comment out agreeing with a comment no one can read.

Arrrgh, people complained about the flat functional MaxGUI API. In this model and I'm pretty sure Max3D the application object can't hope to extend the device level representation of the object when the device specific implementation of the API needs to extend the objects itself.

Any OOP abstraction at the public max3d interface level would simply remove freedoms from OOP game engine designers and infringe on any freedom Mark currently has on implementing DX/EGL layers in the way he/max3d developers see fit.

I don't think i ever mentioned things that imply ignorance. I use a lot libraries which just has a procedural API. And making this module was just an idea, i don't say use it or anything else. If you don't want to use it, then don't use it.

At least there will be no updates for the 'oop' wrapper, if you want to have something oop like, make it yourself. Sorry, but to be called ignorant for releasing something which might be helpful for some people makes me sad.

I've never said that this is the ultimate solution or Mark has to choose the OOP path, all i have done was comitting suggestions and ideas, but if you don't want ideas or suggestions or any help, why do you keep up the forum.

sad,sad.

The same ignorance was behind people complaining about the flat functional MaxGUI API.

Ah yes, I believe you're right. I do vaguely recall espousing a similarly (ignorant) view about MaxGUI being completely procedural.

Any OOP abstraction at the public max3d interface level would simply remove freedoms from OOP game engine designers and infringe on any freedom Mark currently has on implementing DX/EGL layers in the way he/max3d developers see fit.

Oh, I see. Well I hope he or his fellow developers fancy implementing that DX layer then. I was originally planning on having a go at the DX9 driver myself, but given that I have little interest in a purely procedural 3D engine, and it seems like any time I might disagree with the way he's doing things, I'm just going to be told I'm ignorant for daring to have a different view, then that rather seems like I'd be on a hiding to nothing.

Sorry klepto2 updated my rash post, the term ignorance was way overboard given the present pleasant company.

The RenderEngine / GameEngine divide is something I think people need to consider in the oop case. I personally think your time would be better spent on designing a game engine that usefully extends m3d, where physics reactions and resource management drive the design of the objects used by the game designer.

There should be no fight about OOP and procedural. It's a matter of taste.
Some people like raw meat, some people like it overcooked.
I've seen all OOP languages when I studied in a german university, including Eiffel, Oberon, Modula-2, Object Pascal, C++, etc...
Sometimes I like to program in OOP, because I feel fancy and smart.
Sometimes I like to program on procedural C, because I feel like a killer machine.

r64 released:

http://therevills.syntaxbomb.com/max3d/

When I build the maxmod I get the following text:


Building makemax3d
Compiling:makemax3d.bmx
flat assembler version 1.66
4 passes, 9024 bytes.
Linking:makemax3d.exe
Executing:makemax3d.exe
Created module bmx3d
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

Process complete



My BlitzMax is installed to C:\Program Files\BlitzMax130

Max3D still seems to work okay...

BTW In the last few builds with the castle example, I can work into the walls of the castle so I can see the other side, then it stops me... I didn't have this on the initial release...

That may be because the Camerarange is set to 1.0,256.0 .

Try to add this after the Camerageneration:

SetCameraPerspective(camera,45.0,GraphicsWidth()/GraphicsHeight(),0.1,256.0)


There should be no fight about OOP and procedural. It's a matter of taste.


Agreed!


When I build the maxmod I get the following text:


Oops, sorry, just committed a fix.

SetCameraPerspective(camera,45.0,GraphicsWidth()/GraphicsHeight(),0.1,256.0)



Well that did fix it! LOL... everything looks fatter now!

Oops, sorry, just committed a fix.

NP... just updated it, now I get a dosbox which quickly appears and disappears and no errors:


Building makemax3d
Executing:makemax3d.exe
Created module bmx3d

Process complete



What does speak against something like:

object.transform.position=vector(1,2,3)
object.transform.scale=vector(3,2,1)
:

Aye.. any chance of max3d using vectors in the future?

@Klepto2: I have a suggestion to make about the whole OOP port of max3d. I would considere to remove the T letter from shared non-instanciable classes (wich TMax3D seems to be), and leave it for regular classes, as a naming convention.

It is just a suggestion! the code you posted looks great :D

thx ziggy,

I the suggestion is not bad. I will test it out.

@all:
Sorry, i may have react to much yesterday. I will continue submitting the oop interface as soon as i have resolved some things. Also I'm already working on an alternative Newton 2.00 physics driver. But therefore I think there have to be some design things to be discussed. eg how to built in raycast etc. I don't know if ode supports it, but newton does and as every obejct is already a physic body i think it would be the easiest way to use the already delivered and prooven functions.

Another thing i'm currently working on is some kind of smoother shadows:

The first only uses 3 splits: (right one is standard max3d one)


this is a bit more detailed:


That looks nice, klepto2. I like the way (it seems) you can specify how detailed it will be.
How fast is it compared to the standard Max3D one?

the higher detail comes from using 5 instead of 3 splits. It is a bit slower than the te standard one. In generell this is nothing more than a dither filtering (wrong called PCF at gametutorials.com).

The goal is to provide a function where the user can set the filter kernel itself. Another thing i may try to add is PCSS but for this i have to get to know the inner structure of the engine a bit more. Also PCSS is a very intensive highend shadow algo which will not run smooth on mid or low end cards.

delete me! - sorry

I see the SS have been at my posts! Oo

Typically, it was part of the discussion at hand, yet, someone seems to think it wasnt relevant.

I do actually know why, but in all honesty, some people should leave their personal vendetta's at the door, as they have nothing to do with me, or the posts I put on the boards.

Dabz

Just to let you know: Max3D goes Max2D


For details go to the Googlegroup:
http://groups.google.de/group/bmx3d/browse_thread/thread/5a0d756378145245

I see the SS have been at my posts! Oo

Oh, so they have. Now I'm up there agreeing with comments which have been edited out. It looks like I'm having a conversation with myself, and only my court-ordered psychiatrist is supposed to know that I'm bipolar.

All this editing isn't doing much for my sanity :oP Trying to follow the thread through and poeple are refering to comments that aren't there. Gab, i need your psychiatrist :)

You can read the edited out comment (in post 17) about klepto's oop max3d on syntaxbomb.

http://www.syntaxbomb.com/forums/showthread.php?t=2454

I'm impressed, but I still have a few questions.

Is this a replacement/rewrite of the MiniB3D extended version?

Looking at the shades quickly do you need a Graphics card using at least pixelshader 2.0 or higher?

Compared to MiniB3D at this stage, what are the experiences at this moment, is it good to start using in games already or can I better wait a bit until it is more stable?

Anyway, great work Klepto and thanks for sharing. You do too much for us Blitzers :-)

Why isn't this sticky anymore?

Why isn't this sticky anymore?
Cheap sellotape, probably.

To Digital Anime£º
i don't think max3d a replacement of minib3d,max3d is not complete
and still some bugs,and need better video card. also need a lot of work to compile if you want to add something in....
minib3d is clean and easy to handle for people who using blitz3d,also
works fine with old video card!!

Yeuk !
The engine is so slow with my NVidia 7600 GS !
Every examples are lagging...

Will wait later versions to get my opinion on this.
Is this engine capable of incredible things as expected ?

Is this engine capable of incredible things as expected ?
What makes you expect that? Max3D is in-development and JUST got released.

I just looked if there is a new version of Max3D and woops surprisingly there was a 66 release.

Now i didn't looked into it closer but a question which was coming up whilst browsing through the forum was, if Max3D still is in such an uncomplete state, Newton2 is better than ODE and the whole physics commands haven't been implemented yet doesn't it make sense choosing Newton2 as the official physics engine?

I just have seen that Newton2 is still in a Beta stage and i don't know exactly about the licence but just a thought.

I'm working on a Newton2 driver, I'm still thinking about how to integrate the driver and how or what generel physic function may be included.
eg: How to implement buoyancy planes etc.
Another thing is how to add more user freedom. My suggestion is to maybe do it like i do it in minib3d and add usercallbacks which supply information about contact points etc. but this has be cleared with mark which way he wants to go.

the r66 update introduces a postrender pass which can be used to apply fog or other posteffect like DOF, blur etc. The other thing as i have seen is that it introduce the abilitiy to split up models into bsptrees so the rendering of big models can be optimized.

I only twice looked into Newton closer when it still was in a V1.x state. Would you say in the current V2 Beta state that it's better than ODE? Is ODE less feature rich but maybe more stable? The last update of ODE was in summer last year if i remember correctly. How often does Newton get updates?

Developing two physics modules at this stage sounds after redundance to me. The work better should be invested into agreeing on one, the overall better, solution and getting this as smooth and complete as possible done.

Years ago i mainly worked with Havok but nowadays i'm almost completely into PhysX. Anyway i don't know other methods of receiveing and handling physics events than using callbacks but that also would mean that you'll have to provide two timing methods like physics related ones and gfx related ones.

What i really find nice in Unity is that you can create physics objects with timers so that you for instance can easily let bodies explode or disable them once the timer is over. It also would be nice if you could add functions to a physics body like, if you hit this body then do the following.

Are bsptrees still the way to go these days?



Nice and foggy now... :)

Ive uploaded r66 for anyone who wants it:

http://therevills.syntaxbomb.com/max3d

..thanks therevills .. lets see how this thing working here..

Hm... All the revision 68 samples fail on my computer with the following error:

[quote]
Max3d Error: Can't find Max3d symbol:m3dClearSurface
[quote]

Any thoughts?

(ATI X1650XT)

Works for me okay... once I figured out I was building for the Mac... Mark changed the codelite project on us and the selected configuration was set to Macos Release...

God rays:



O_O

... I mean, the textures are horrid but still.... O_O

Works for me okay... once I figured out I was building for the Mac... Mark changed the codelite project on us and the selected configuration was set to Macos Release...


Ok, I downloaded the latest SVN update again, and re-compiled --
now the other samples are OK again, but castle.bmx fails with a different error:


Linking:castle.exe
Executing:castle.exe
ERROR:GL Error: INVALID OPERATION (file:C:/Code/Max3D/max3d/max3d/openglgraphics.cpp, line:63)



Hi.
I got the same error (Newest Max3D version) as xlsior. Other samples are ok.

I was able to detect the localisation of this error because i have the same issue. It seems to be something with the parameter creation.

xlsior let me guess: ATI gfx card?

seems to be a ATI related bug.

Yup, ATI X1650XT

Coulda sworn I saw that error once.. it was late at night though, so don't bet on it.

Max3D works quite well - at around 15fps with godrays, shadows and fog - on my ATI Radeon HD 2600 XT.

I think going OO with the module, officially, would be best. Not just for the conventions, but also for management. You would have to build your own type-system to maintain the destruction of entities, materials, etc. if it doesn't go OO (or use klepto's, currently not up to date ;), module).

I will upload a new OOP Version soon, currently fideling with some design things. eg: TMax3D will change to m3d.

Somehow the max2d part is broken since the introduction of renderpasses.
I think i have an idea whats happening with the max2d part, it seems as the textures are broken or scaled.

For those having problems with the Invalid_Operation Error: Try this

in godrays.glsl there is a line with this:

const int NUM_SAMPLES=100;

change it to something lower, for me it works until i get over 70.

Strange.. I can run it until it becomes too slow for interaction (around 350).

oh whoah I didn't realize until now that Max3D is in the wild. Still looks way primitive for anything I'd be interested in, but I do want to ask about one thing mark mentioned in the original announcement:

Currently Missing:
* Skinned meshes.


Has this been added yet? If not, is someone working on it? This seems like an important one to take care of right away.

Has this been added yet?
I don't believe so.

If not, is someone working on it? This seems like an important one to take care of right away.
Ask Mark yourself: http://groups.google.com/group/bmx3d

Hopefully I have posted a bugfix for the max2d mode in max3d:

Take look at http://groups.google.com/group/bmx3d/browse_frm/thread/5a0d756378145245 and please tell me if it works for you.

Also a small screeny:


Works here (on XP).

Had two hours and so gave r70 a little try.

o Installation at least on win was mostly harmless, it only took some time.
o Documentation of some of the commands is pfff (texture flags?).
o A simple scene ran instantly on my 3850 AGP ;O).

But oh boy i'm missing a lot of stuff in there. According to the quick reference there is no LookAt or PointAt, no AA settings, no shadow tuning (is there a way to set them additive btw?), reasonable physics commands, ...

Questions:
o What type can i use for the models in a list?
o Is the only way applying materials to imported models by running through their material ids?

Anyway what didn't work (compile errors like [ERROR:GL Error: INVALID VALUE (file:C:/bmx3d/max3d/max3d/openglgraphics.cpp, line:63)] or glitches) was parenting, using spotlights, i wasn't able to properly import 3d files in the format obj (shows geometry at weird scale, weird pivot and without texture information) or lwo (nothing at all), ...

Well, a first quick try, nothing amazing, win, had fun.

-> http://spielwiese.marune.de/_max/_tmp/uno.zip (mouse rotates camera)

1. It is an engine in alpha stage, don't expect too much from it in the part of documentation or other already fully released engines.

2. Cameras are Entities, so use SetTranslation, SetRotation, Turn etc commands to perform LookAt or PointAt commands (alternatively build these function by yourself using vectors)

3. shadows are additive blended or whatever else you mean with this.

4. for using the models in a list you currently may create a pointer Type eg
Type TMax3DPtr
Field ptr:Int
end Type

And add this to a list.

5. You can iterate through their surfaces as well. How do you want to change the materials else?

Take a look at the googlegroups page for additional hints (texture related)
Also maybe a small exsample about how you parent the spotlights would be great.

3. shadows are additive blended or whatever else you mean with this.

Then why are they darkening the textures in all the screenshots which have been posted? Surely, with additive blending it's not possible to darken, only lighten?

Gabriel, you're right, of course.

they are overlayed, but what would be the use of additve blended shadows? well, you could inverse the values of the shadow, but that would brighten nonlit areas too much if you use a lot of lights.

1) Are the formats and flags defined already? If so then it shouldn't be a problem at least listing them in a brief way, even at this stage. More a matter of minutes than days.

2) I know but it's obviously missing.

3) Of course meant it as adding the shadows and so getting darker. Depending on what kind of light you're using this sometimes seems to work and sometimes not. And any parameters for tuning them is badly missing. But it could be looking interesting if you also could brigthen the scene this way.

4) Thanks, i'll try this.

5) I would at least expect a setMaterial also for loaded Objects were one material is attached to each id/surface without looping on your own.

6) I just had another try at objects and also 3ds models freak out. They are loaded and displayed but as soon as you transform them with TurnEntity for instance after a few iterations they go wild and the application hangs.

7) Parenting was done like for instance:

Local camAuge=CreateCamera()
Local licAuge=CreateSpotLight()
SetEntityParent(licAuge,camAuge)

@klepto2
Worked, slightly different, although i also ran into some strange memory issues.

-> http://spielwiese.marune.de/_max/_tmp/uno2.zip (mouse rotates camera, again :O)


Oh and a few questions regarding texturing:

o How do i alter the Filtering (None, Bilinear, Trilinear, Anisotropic Level)?
o Can i choose the textureformat so that they are either plain or use a DXTC format?
o Why is the TextureTiling connected to a Model instead of a Material? Can i use different tilefactors for instance for Diffuse and Specular?

Hmm r71 does not compile for me.

How can i go back to r70?

The daily max3D break. :O)

Returned to r70, stacked some bricks and textured them quickly (don't blame me if it looks washed out and the lightning isn't any good, there are things i don't know how to define in max3D or they are broken, anyway:

-> http://spielwiese.marune.de/_max/_tmp/uno3.zip (mouse rotates camera, LMB /RMB inflict some -/+ tremmor)

Didn't tweak the physics either so the stacks will collapse after some time on their own which i found interesting to watch. I'm out...

r71 defaults to Linux Build mode. You can change the Build mode from the first menu option in the Build menu in CodeLite.

As did it previously default to MacOS release, just be sure to check that every time you checkout the newest revision.

That wasn't the problem, i did set it to win release. Anyway there is a r72, this might work again.

Just to let you know, I had a problem compiling r71 last night too (and I checked which version I was compiling too ;-))...

Mark has released an update and that fixes it :)

Uploaded r72:

http://therevills.syntaxbomb.com/max3d

Tried to compile it, which works, but now the textures are broken, which means not assigned anymore.

I think he changed the material names for the textures, see here:
http://code.google.com/p/bmx3d/source/detail?r=71 (/trunk/max3d/max3d/modelutil.cpp)

DiffuseMap is now DiffuseTexture
SpecularMap is now SpecularTexture
EmissiveMap is now EmissiveTexture
NormalMap is now NormalTexture

How are you setting your textures?

When running the castle demo with the latest builds I receive the following error:
Max3d Error: Can't find Max3d symbol:m3dSetObjectImportPath


@Plash
Thanks, i'll give it tomorrow another try.

Do you know how to setup the texture flags and formats btw?

No clue, I haven't been using any of the other texture slots.

klepto would probably know ;)

o Filtering

Well, i guess you can look it all up in the code if you really want to but again enhancing the brief documantation wouldn't hurt as well and making it easier for all. Same goes with updates, two or three lines explaining what has been changed/added would be better too, same old story, communication skills. Btw ever thought of a roadmap?

Anyway i tried out r72 and with texture instead of map it works again although i would be interested what spoke against map.


o Imported Models

Imported models still don't work properly. I tried exported models from Modo (obj, lwo) and 3dsmax (3ds) and whilst i'm able getting the geometry (now also lwo) i'm not able to get the texture on them.

Also the transform with such models is still broken. If you turn such a model then the scale alters and after a short time the application hangs.


o Problems

Lights and Parenting still do not work properly.

With lists of object references i'm having weird memory issues. Defining an object list size of anzA=5, anzB=6, objLis[anzA*anzB] may result into a memory issue during compilation whilst with a anzA=3, anzB=10 it might works. I'm using 1.30 from the BRL site on win.


o Post Processing

One post render effect i would like to see would be a glow filter.Contrary to many others this is one you can use quite often.


Looking foward to the next update(s)...

Anyway i tried out r72 and with texture instead of map it works again although i would be interested what spoke against map.
You will probably get a response faster at the Google Group than you will here. I would assume it was changed because they are textures, not maps! (but I'm no expert :)

o Imported Models
Check the Google Group (LWO has been fixed recently, I think). You might want to ask there too, post your findings, etc.

One post render effect i would like to see would be a glow filter.
Again, you should check the Google Group, Mark said he wants to do an HDR shader.

You mean chances are low that he's reading his own forum here?

Chances are higher there not only for him but other people that might be able to answer your questions.

My assumption would be that Mark doesn't read this thread as much as the group because this thread isn't exactly *support* - and he probably wont come back here and read every post just to check.
The group makes it much easier to help others, because its actual support questions, not all "Kewl engine!!", "This engine sucks.", and "OMGQJOY#!!!1!".

What does "OMGQJOY#!!!1!" mean? Looks cool, maybe i should write this too?!

Open for interpretation ;)

You don't seem to care much about my advice so I'll stop trying.

No, thanks for you advice, i'm just a little bit shy. ;O)

Btw if someone cares about fixing the modelimport in max3D, i've uploaded a little cube in the formats fbx, obj, lwo and 3ds for testing purposes at Modo's scale of 1m^3.

-> http://spielwiese.marune.de/_max/_tmp/cubeWood.zip

taumel, the last thing max3d needs is end users so I suggest, take a breath, get a grip and post to the relevant developer thread:

here, for instance, the likes of Tom Speed are contributing their valuable time and expertise to the improvement of max3d model importing:

http://groups.google.com/group/bmx3d/browse_thread/thread/4d9d92b9c12f32df

Thanks for the information.

Just a quick update, added Collada 1.4.1, split fbx (included texture and without) and yes i read that assimp can't handle fbx but who knows and Modo's source file, same Link.

Oh and there is r75.

I can now load objects (lwo crashes) and assign textures (obj and 3ds work with wrong orientation), transforming those still freezes the app but how can you assign more than one texture, for example a diffuse and a normal map, for a loaded model to a certain material?


Forget it, i got the texture thingy...

Max3D r75 loads LW 7.5 geometry without crashing (there's still issues, but they load at least). I'm not sure if assimp supports 9.x (just guessing you're using 9.x?).

The castle1.x mesh was quite big in r75, maybe Mark is still trying to find the optimal standard scale. I just hope he ends up with something like 1 unit = 1 meter, because that has been the standard in other engines.

@Tom
I'm not sure about which version it is exactly, i exported it from Modo302 but i doubt that it's a V9.x as 3DSMax7 a.o. also can read it properly, which was released before Lightwave9.

Can you import my example as a textured object and display it several times (CopyEntity) properly without crashes?

Lumooja: The castle was big, and Mark had some temporary code in there to scale it down, it's fixed now.

taumel: I had to re-assign the debug texture but they copy & display without crashes.

b.t.w, the Z axis is flipped on your debug texture there, unless Z it's flipped in Modo?



b.t.w, the Z axis is flipped on your debug texture there, unless Z it's flipped in Modo?

Modo uses a right-handed coordinate system, or always used to anyway, so that would make sense.

Check my depth-of-field effect!



This was unbelievably easy to do, even if it is a really crude implementation at this point, but this evening was my first real attempt to do anything with pixel shaders.

(Apologies for using imageshack, but I have no FTP access at present.)

Cool! I love depth of field. :)

@Tom

Not for me, i still do get:

"WARNING:aiImporter error:Unable to open file "cubeWood\objCube.lwo". (file:C:/bmx3d/max3d/max3d/modelutil.cpp, line:137)
Unhandled Memory Exception Error"

objCube.*lwo* doesn't exist the zip I downloaded, only .3ds & .obj, that's why it can't open it maybe? :D

Oh oh, my fault.

I once named it false, corrected it when i was adding the normal map but then i zipped the wrong folder (which i also used for mine), sorry!

Well, this can happen if you're doing things in between. :O/

I get the same error as Doiron:

Max3d Error: Can't find Max3d symbol:m3dSetObjectImportPath

was working before i updated to .83

Another tryout with r83:

-> http://spielwiese.marune.de/_max/_tmp/uno4.zip (mouse rotates, wheel zooms)

By the way do others (no ATI users maybe) also get the shadow map glitches (red circled area)?



Doiron: i fixed it by cleaning out the project before rebuilding, otherwise it doesnt seem to overwrite the old dlls.

Not loading. Looks nice though.

doesnt load for me either. max3d seems to hard code the location of the dll in anything you make.

Yes it does, and if you look at the max3d module code you'd see that it is very easy to change.

@taumel, cool screenshot - but it doesnt work for me neither...

r87 has been uploaded...

Ive uploaded the dll and samples to here:

http://therevills.syntaxbomb.com/max3d

Also Ive included the exe for the all samples in the samples87.zip.

Thanks!

I don't have the time right now to fix anything but here it just works. Hmm i guess it only needs the dll outside located in c:\bmx3d\Release\

-> http://spielwiese.marune.de/_max/_tmp/max3d_dll_r83.zip

Does it work then?

@Plash
Where can i set the lookup folder in which the dll will be searched?

Bottom of bmx3d.mod/max3d.mod/max3d.bmx at function OpenMax3d.

Remove the initial path ('c:/bmx3d/') and the release/debug additions (basically just change the path to 'max3d.dll').

i have a error:

Max3d Error: Can't find Max3d symbol:m3dSetObjectImportPath

thanks

Did you rebuild the Max3D module?

@Plash
Thanks, i found it but i guess you'll have to alter it in the template instead. As i saw the texture formats and flags inside there too, do you know if they can be accessed already so that one for instance can define loaded textures as clamped?

So this one should be autarkic, compiled with r87, i might be wrong but didn't r83 ran smoother?

Anyway there you go:

-> http://spielwiese.marune.de/_max/_tmp/uno4b.zip (mouse rotates, wheel zooms)

Thanks, i found it but i guess you'll have to alter it in the template instead.
Only if you want the changes to be made every time you run makemax3d.bmx (but if you modify max3d_template.bmx and do an svn checkout it will be replaced).

You have to change the module source every time the module template is changed/the module needs rebuilt.

EDIT: In the future we need a search path list!

Yup

I will upload my max3d template as soon as i'm coming home from work.
It will include some additions I've made:

-Max2D Support
-Dll search in SVN Dir + if not found it searches directly in the appfolder (will add a new option where it looks in the system folder aswell)
-Added Functions to add import search pathes and removeing them or displaying them
-minor changes (probably not needed in the r87)

Maybe Mark can use some of these functionalities in the SVN as well.

@taumel: tried your .zip file (uno4b.zip). I hear the background music, but I get only a black screen (with mouse pointer moving).

Plash: fixing it in the module doesnt seem to help with other peoples examples. I can run max3d fine but that demo still wont work.

@degac
I have no idea and also am not at my computer right now. When i altered the path i also upped the other ones as well. Here it all runs fine - beside of the glitches - , not sure if there is something else to be considered beside of the dll.

-> http://spielwiese.marune.de/_max/_tmp/uno1.zip (mouse)
-> http://spielwiese.marune.de/_max/_tmp/uno2.zip (mouse)
-> http://spielwiese.marune.de/_max/_tmp/uno3.zip (mouse, lmb, rmb)
-> http://spielwiese.marune.de/_max/_tmp/uno4.zip (mouse, wheel)

fixing it in the module doesnt seem to help with other peoples examples. I can run max3d fine but that demo still wont work.
Do you have the max3d dll inside the example's directory? (assuming you made the module search in that path.. and the only way it will work is if you compile their code, if you want to be able to run it with the dll in the example's folder then whomever wrote it would have to modify the max3d module themselves)

How can i do that? they supplied an exe, i cant recompile it.

Uh.. obviously only if you have the code can you change it..

Doiron: i fixed it by cleaning out the project before rebuilding, otherwise it doesnt seem to overwrite the old dlls.

I had to redownload anything from scratch (I wonder why svn doesn't update correctly) but you pointed me in the right way. Thanks! :)

I also experienced this in earlier versions, that only updating new releases did not work properly, instead you had to delete everything and download the whole release, meanwhile updating works.

When you have modified files, and SVN asks you how to sync, answer always tf (=theirs full). I had never problems with SVN not updating that way.

Phew... after a mere 4 hours, and a lot of evil, EVIL code, I finally have a working Spectrum shader, with correct colours and attribute clash!



Pointless but fun.

If they'd put that in R-Type Dimensions I might have had to like it.

Thats great James :)

@BlitzSupport
How about a general computer shader were you can set the wanted look like computer="c64","spectrum","amiga" (5 bitplanes)?

Does anyone know what has been done/updated in r90?

http://groups.google.com/group/bmx3d/browse_thread/thread/5ac21b5e091b86e7


in short:
CameraPick
( camera,colltype,viewport_x,viewport_y ), PickedPoint( coord ),
PickedNormal( coord ) and PickedEntity().

and some smaller fixes and changes.

Just a hint: There is a googlegroup, and also you can click the link r90 and you can view all changes.

Really need to be putting in some commit messages on these things. Diffs alone just don't cut it over a long period of time.

@klepto2
Thanks, didn't check the forum, just saw the update has received a r90 and when i remember correctly the last updates also weren't commented there. Btw i find it confusing that the one who initiated a thread isn't named as well.

Really need to be putting in some commit messages on these things. Diffs alone just don't cut it over a long period of time.
Especially when Mark changes so many files :/

Lots of changes made frequently sounds good to me, it means things are progressing.

Btw i find it confusing that the one who initiated a thread isn't named as well.


taumel, on the bmx3D google group? I can see the names of all post authors whether I'm logged in or not.

Uploaded r92 dll and samples to here:

http://therevills.syntaxbomb.com/max3d

(decided to wait a few revisions between uploading...)

@Tom
Yes on the google group, in the overview i only see the one who did the last posting but not the one who started the thread (like in the BRL forum for instance). Might be a setup thing?

i have a error:

Max3d Error: Unable to locate object of type 'CShader' at:copy.glsl
Max3d Error: Unable to locate object of type 'CShader' at:halve.glsl
Max3d Error: Unable to locate object of type 'CShader' at:blur15.glsl
Max3d Error: Unable to locate object of type 'CShader' at:clear.glsl
Max3d Error: Unable to locate object of type 'CShader' at:shadowmap.glsl
Max3d Error: Unable to locate object of type 'CShader' at:model.glsl
Max3d Error: Unable to locate object of type 'CShader' at:sprite.glsl
Max3d Error: Unable to locate object of type 'CShader' at:terrain.glsl
Max3d Error: Unable to locate object of type 'CShader' at:mirror.glsl
Max3d Error: Unable to locate object of type 'CShader' at:spotlight.glsl
Max3d Error: Unable to locate object of type 'CShader' at:pointlight.glsl
Max3d Error: Unable to locate object of type 'CShader' at:distantlight.glsl


thanks

i use a r92 from therevills

Quick road animation with r90 (testing the filtering), music ripped from Reyn Ouwehand performance.

-> http://spielwiese.marune.de/_max/_tmp/due.zip

@mongia2: Do you have the latest svn revision?

Even though you have the latest library you still need to get the new shaders.

taumel: that doesnt run for me, screen goes black then back to desktop.

Same result here smilertoo.

Uhm does it run, if you rename max3dQ.dll to max3d.dll?

Tried that already.

Okay, i thought with the new template the dll would be searched either in the dev location or in the local folder. Am i wrong with this assumption?

Runs here without any problems. Returning to the desktop would indicate a) not finding the dll or b) that some assets aren't found, as all the assets are in place i suspect it doesn't find the dll.

Does it run with the hardwired:

c:\bmx3d\Release\max3d.dll

?

I just uploaded a new version.

Could someone for whom it did not work please test if this one is working now and if not secondly test it with the dll in the directory written above?

Same link:

-> http://spielwiese.marune.de/_max/_tmp/due.zip


Thanks,

taumel

ok new one works..moving down a straight road with shadowed cubes appearing.
What did you change?

Still not working here.

@smilertool
Threw out stuff which shouldn't be in there and renamed the dll.

Get Filemon and you'll be able to see what file(s) it's looking for, and where it's failing to find them.

http://download.sysinternals.com/Files/Filemon.zip

Quick tip, when it runs you can set a filter of what processes to include/exclude, you may want to add in system processes to it doesn't get too messy on screen.

Set include to just: *
And exclude may look like: csrss*; pg2*; avg*;

Or, just set the include filter to the name of your app, castle-glow.exe e.t.c

Interesting, didn't know about this one, thanks.

Things look fine here, Plash?

What revision was it built upon?
Maybe a new addition to one of the shaders (or something else in the code) is crashing it?

It looks like due.exe is opening shaders from my bmx3d svn directory (first looks and does not find in the application directory).

That's weird because the shaders are loaded with the appropriate relative paths, version is r90.

I'm on r92..

As far as i know this shouldn't make a difference beside of that all looks blurred to you again as the anisotropic filtering is disabled by default if max chooses the r92 dll instead of the local r90 dll.

Do you know were you can explicitly define the paths were the dll is searched for?

hmm, i think the dll search thingy is a bit buggy. It was working for me but it has some major bugs in it as i have recognised now.

taumel: can you try to rebuild the module with this change:

just replace the beginning of the OpenMax3D function with this:
Function OpenMax3d( flags )
	If m3dLib Return
	Local lib:String
		
	For Local path:String = EachIn m3dDllDirs
		lib = path
		If lib <> "" And Not lib.EndsWith("/") Then lib:+"/"
		
		?Win32
			m3dLib = LoadLibraryA( lib + "max3d.dll") 
			Print "Trying : " + lib + "max3d.dll" + " --> " + m3dlib
		?Macos
			m3dLib = dlopen( lib + "max3d.dylib", 1 ) 
		?Linux
			m3dLib = dlopen( lib + "max3d.so", 1 )
		?
		
		If Not m3dLib Then
			
			?Debug
				lib:+"Debug/"
			?Not Debug
				lib:+"Release/"
	
			?Win32
				m3dLib = LoadLibraryA( lib + "max3d.dll") 
				Print "Trying : " + lib + "max3d.dll" + " --> " + m3dlib
			?Macos
				m3dLib = dlopen( lib + "max3d.dylib", 1 ) 
			?Linux
				m3dLib = dlopen( lib + "max3d.so", 1 )
			?

		End If
		If m3dLib Then Exit
	Next
				
	If Not m3dLib
		Print "Max3d Error: Can't open Max3d lib:"+lib
		End
	EndIf


This should fix the dll loading problem.

Hi klepto2, if you complete the Function, then it works.

Function OpenMax3d( flags )
	If m3dLib Return
	Local lib:String
		
	For Local path:String = EachIn m3dDllDirs
		lib = path
		If lib <> "" And Not lib.EndsWith("/") Then lib:+"/"
		
		?Win32
			m3dLib = LoadLibraryA( lib + "max3d.dll") 
			Print "Trying : " + lib + "max3d.dll" + " --> " + m3dlib
		?Macos
			m3dLib = dlopen( lib + "max3d.dylib", 1 ) 
		?Linux
			m3dLib = dlopen( lib + "max3d.so", 1 )
		?
		
		If Not m3dLib Then
			
			?Debug
				lib:+"Debug/"
			?Not Debug
				lib:+"Release/"
	
			?Win32
				m3dLib = LoadLibraryA( lib + "max3d.dll") 
				Print "Trying : " + lib + "max3d.dll" + " --> " + m3dlib
			?Macos
				m3dLib = dlopen( lib + "max3d.dylib", 1 ) 
			?Linux
				m3dLib = dlopen( lib + "max3d.so", 1 )
			?

		End If
		If m3dLib Then Exit
	Next
				
	If Not m3dLib
		Print "Max3d Error: Can't open Max3d lib:"+lib
		End
	EndIf
		
	{INITS}
	
	InitMax3d m3dImporter,flags
End Function


oh, of course. I have just copied it out of the module and not out of the template because changing the template without testing isn't that good ;)

So things should finally work, hopefully:

-> http://spielwiese.marune.de/_max/_tmp/uno.zip (mouse)
-> http://spielwiese.marune.de/_max/_tmp/uno2.zip (mouse)
-> http://spielwiese.marune.de/_max/_tmp/uno3.zip (mouse, lmb, rmb)
-> http://spielwiese.marune.de/_max/_tmp/uno4.zip (mouse, wheel)
-> http://spielwiese.marune.de/_max/_tmp/due.zip
-> http://spielwiese.marune.de/_max/_tmp/due2.zip (left/right arrow, mouse+hold lmb)



I downloaded Uno4, and extracted it. The screen goes fullscreen, and black, and then it drops back to the desktop with the app still showing on the taskbar. Then the app finally disappears from the taskbar.

No errors, and I can't find any kind of log.

For what it's worth, I haven't run and Max3D demos, haven't been using it myself, or anything like that. Videocard is an 8600GTS with recent drivers though, so it should be ok.

Try the uno4b.exe

As a sidenode: we really need some logging ability

@Gabriel
Hmm i've just tested it and everything works fine here, also taking the dll from the right folder. Can you download it again and retry it?

There was no Uno4b.exe in the first download. I downloaded it again, and tried both, but both Uno4.exe and Uno4b.exe behave as I described in the first reply.

Same happens to me. Tried both Uno4.exe and Uno4b.exe. There's a dat folder which has the max3d.dll in it so it can't be because that's missing.

It starts, goes to a black screen then quits to the desktop after about 3 seconds.

I'm using a 9500GT with latest drivers.

Do the others work for you?

oh, i think i've found the problem.
You don't provide the shaders with your program. (the ones from the bmx3d svn source directory (shadow.glsl, model.glsl, etc)

I thought they would be part of the 3d engine. Hmm how do you add them then?

Copy the glsl files into the dll directory of your app. Not tested, but this should do it.

Okay, upped just uno4 with the shaders, does this one work?

-> http://spielwiese.marune.de/_max/_tmp/uno4.zip

on my older system works everything fast and fine.
but on the newer the application quits to the desktop.

any ideas?
btw. on the newer system is MAX3D not present.

Nope, neither Uno4 or Uno4b work, even with the shaders included.

I haven't tried any others yet.

Okay, now it's working, all links have been updated, see above, #162.

Yep. Uno4.exe works fine now. Uno4b still closes down as before though, but I don't know what the difference is supposed to be.

Okay, now it's working, all links have been updated


Hey Taumel, what did you do to get it working?

I included the max3d shaders, added the path to the template, rebuilt max3d.

@taumel:

Tried Uno4.exe and Uno4b.exe ---> they run (slowly...maybe due to 'God's rays'....)
Tried Due.exe ----> it runs without problem (slowly too...)

Tested on Athlonx2 3800+ GeForce6600

Yep i played around with a much better gfx card than yours so your gfx card is the obvious bottleneck. "uno4" will be slow due to render state changes (i guess i had something between 500 to 600 objects in there) and "due" maybe due to the filtering, for the rest blame Mark. :O)

Hey this is funny, whilst everything works fine on a XP+SP2 system i just tried it out on a XP+SP3 system and guess what i do get permanent memory exception errors.

Still not working, window goes fullscreen then drops back.

Same, window goes fullscreen then drops back.

Demos work fine here, but I do have the same "shadow?" bug as discussed on post #106 uno4 and uno4b. Also uno4b runs a little smoother on my system than uno4, but both are relatively slow in framerate. It would be nice if we had a framerate shown to confirm this.

Opteron 165
ATI Radeon 4850

Work ok for me but i have max3d installed to default folder. There's a shadow flicker on uno3 (demo i tried)

Uno4 does not work for me. Same issues: fullscreen, goes black, and terminates without an error.


I'm using Windows 7 32bit, 4gb ram, ATI 3850 / 8.12 drivers.


Jason

So far to me it looks like this:

XP+SP2, all worked fine.
XP+SP3, uno, uno2, uno3 work whilst uno4 and due don't work anymore.

I have bmx3d installed on both systems, for testing purposes i renamed the bmx3d folders. The error i do get is an memory exception error from max3d.

Okay i tracked it down, well sort of.

What my SP3 version doesn't seem to like anymore is if you define a collisiontype with a higher number like 999, so for instance "EnableCollisions 1,999,1000,0,0" crashes whilst "EnableCollisions 1,10,1000,0,0" works again.


Upped the files (links in the post #162), does it work for others now as well?


Must i define collisiontypes in an order, like that i can't use 4 before i defined 1,2,3? I would have thought that they are just independent identifiers.

Upped due2, link above in #162.

@degac
This one should run faster on your system as well.

[Quirks: Copying objects is weird and doesn't always work, needs helper objects, couldn't import cylinders when they are closed as well, built in ones aren't really useable due to missing resolution settings.]

I tried to run the latest version of UNO4 on my work pc, and it fails the same way.

My work pc specs are Winxp /SP2 - AMD Athlon 64x2 3800+ 2ghz - 2gb ram - Nvidia Quadro NVS 210S w/ 256 RAM.


Jason

Out of curiosity, does due2 work for you?

hey taumel, nice demos. btw, what music is playing in due2? i realy like it :D

@taumel: new releases all work
And Due2.exe si very faster! (I like the blur effect and the other one (?))

@grable
Thanks, the music is from Reyn's bp08 performance, here is a video from the concert. Beware he plays the awesome Parallax at the beginning.

-> http://breakpoint.deb.at/2008/concerts/BP08_Concert_ReynOuwehand.mp4

@degac
All just the blur... ;O)

Looks like Mark has gone back to work on Max3d :)



Uploaded r97 dll and samples to here:

http://therevills.syntaxbomb.com/max3d

BTW Ive deleted the older versions... (ran out of room ;-))

I've thrown a clone of the SVN repo up on GitHub if anyone is into that sort of thing: http://github.com/nilium/max3d

At the very least, if you're doing work on it, it's probably easier to fork it, make your changes there, and share them on GitHub. (I won't be putting any non-SVN changes in the GitHub repo though.) If Mark or anyone else involved in Max3D to any reasonable degree has any disagreement with the clone for good reason, I'll be more than happy to take it down, but I should imagine there isn't any issue.

Edit: And please start using commit messages. The current lack of them is bordering on insanity, there's no way to know what is even being done.