Best way to do 3d in Max?

BlitzMax Forums/BlitzMax Programming/Best way to do 3d in Max?

CloseToPerfect(Posted 2011) [#1]
I'm looking to do some 3d programming in MAX and would like your input on what to use. I tried to use minib3d but I can't get it to even run the examples that are included. I don't know If I have to compile stuff with mingw and if I do, what file and where do they go, ect..

So with that in mind, I want something that integrates easy with MAX.

I have only looked at one other program and that is LEADWERKS and it looks very nice and simple to work with MAX. Comments please.

I didn't want to spend $200 on something If there are options so that is why I'm asking here first.


josk(Posted 2011) [#2]
Xors3D is easy to use with max, there is also a discount at the moment.

Xors 3D!

Last edited 2011


GfK(Posted 2011) [#3]
Xors3D is easy to use with max, there is also a discount at the moment.
Xors3D is Windows only, so forget it if you're planning to do cross platform stuff at a later date.


_Skully(Posted 2011) [#4]
Ya it depends on your targets

If you are going windows only then I'd suggest sticking with Leadwerks (very active developer)

If you are going Win/Mac/Linux then go miniB3D (Free) and it has other "ports" as well such as iminiB3D.

There are other options I believe for cross platform but I'm not sure what level of maturity they are at


Polan(Posted 2011) [#5]
Xors is really nice :) it have functions almost the same as blitz3d (name) + alot of extra stuff.


Kryzon(Posted 2011) [#6]
It's generally easier to use a commercial product then a free one. Start at that. The authors had a reason to take the time and get all the hassle away from implementing it (see Blitz3D, Xors3D, Leadwerks).

Next, don't worry if it supports only Windows - it's still 90% of the market share, so a lot of computers can still run your game. However, it'll probably be harder to advertise it to publishers (because they always want the broadest range possible, and that is achievable with cross-platforming).
Sometimes the "cross-platform is better" propaganda might force you to miss out on a good windows-only engine that you'd be happy to be working with. Don't allow that to happen.

To use MiniB3D yes you need MinGW installed, and yes it'll be a pain to put everything in the right place, but it's doable (it was a pain for me and I managed to do it - glad I did, miniB3D is very interesting).
All .C based modules will need MinGW, so you might as well install it anyway.


ima747(Posted 2011) [#7]
Don't mean this to sound offensive but if you can't get MiniB3D to install you should probably get more familiar with BMax before attempting to branch into 3D. Almost all modules install similarly to MiniB3D, and many if not most NEED to be compiled. And the ones that don't might need to be re-compiled in the future to handle some other changes...

Check the beginner forums for instructions on installing modules, or ask for help in the module's forum if you can't get it working. Generally speaking it's as easy as dragging a folder into the Mods folder in your BMax directory. Getting minGW installed however will take the help of a tutorial (again check the forums, there's some stickys for this).

Personally I can't recommend MiniB3D enough. It's what I started on and what I still prefer due to the cross platform factor. Kryzon is right, windows is still almost 90% of the market of home PC's however a vast swath of windows systems are used in work environments which will never know the pleasures of gaming. Don't discount the mac (or even linux these days) segments of the market as being to small to matter. However my real draw wish MiniB3D is it's spin off iMiniB3D. With proper planning (and the right skills) it becomes quite trivial to translate a MiniB3D project to iOS, and that's a BIG deal since iOS is so easy to monetize compared with PC platforms. Additionally I've been working on an Android port of MiniB3D which is coming along nicely. So with 1 engine you can hit the top 4-5 platforms, and it doesn't cost a dime to get started, you just need a few skills that you will need to pick up eventually anyway.

All of this is not to disparage the commercial or other free alternatives, Everything has it's pluses and minuses and the biggest one is usually comfort level of the individual user. This is just my preference.

Just my 2c.


wmaass(Posted 2011) [#8]
Don't forget abut GMan's irrlicht Mod.


CloseToPerfect(Posted 2011) [#9]
ima747 your don't offend me, but I'm not new to MAX. Been using it since it came out and Blitz Plus before that. I just have never needed to add anything to it before and know nothing of it. Honestly I don't even know what minGW is but I assume it's a C compiler but beyond that I don't know how it works with MAX.

GFK
I have never compiled any of my stuff for MAC cause I don't have one to test on. So to start with on 3D that is not important and I could always change later if I want to go that route.

I guess I'll take the time to figure out more about MinGW on Vista and see if I can get MiniB3D to work. But I will look at Xors just to see what it does since 2 have referred it.

About MiniB3D are there any good tutorials on it?


SLotman(Posted 2011) [#10]

Personally I can't recommend MiniB3D enough. It's what I started on and what I still prefer due to the cross platform factor. Kryzon is right, windows is still almost 90% of the market of home PC's however a vast swath of windows systems are used in work environments which will never know the pleasures of gaming. Don't discount the mac (or even linux these days) segments of the market as being to small to matter. However my real draw wish MiniB3D is it's spin off iMiniB3D. With proper planning (and the right skills) it becomes quite trivial to translate a MiniB3D project to iOS, and that's a BIG deal since iOS is so easy to monetize compared with PC platforms. Additionally I've been working on an Android port of MiniB3D which is coming along nicely. So with 1 engine you can hit the top 4-5 platforms, and it doesn't cost a dime to get started, you just need a few skills that you will need to pick up eventually anyway.


Amen to that. miniB3D is awesome... I am trying to extend it myself, and can't say enough how well done it is. The work Simon did on the engine is outstanding to say the least.

About miniB3D are there any good tutorials on it?

Besides the programs posted on it's forum, you can pretty much get any Blitz3D program and compile it on miniB3D without changes.

Also, check the code archives... lots of code there.

You just must try to always use Superstrict and declare variables - this will avoid problems in the future. Not big deal: cameras are TCamera, textures are TTexture, entities are TEntity, lights are TLight and so on...

And this is a very basic program:

SuperStrict

Import sidesign.minib3d

Graphics3D 800,600

Local camera:TCamera=CreateCamera()
Local cube:TMesh=CreateCube()
Local light:TLight=CreateLight()

AmbientLight 128,128,128
MoveEntity camera,0,0,-10

while not keyhit(KEY_ESCAPE)
   cls
   TurnEntity cube,0,1,1
   RenderWorld
   UpdateWorld
   Flip
wend

ClearWorld
end


You should see a spinning cube on your screen ;)

Last edited 2011

Last edited 2011


CloseToPerfect(Posted 2011) [#11]
Well an hr later and I must be getting somewhere cause I can ctrl+d but then I get a new error.

Compiling:blitz_app.c
gcc: CreateProcess: No such file or directory
Build Error: failed to compile C:/BlitzMax/mod/brl.mod/blitz.mod/blitz_app.c


I've installed and reinstalled set var and paths as all the suggestions say to but I'm really stuck. This is crazy for a program as simple to use as MAX to be so difficult in this one area and so many people have had so much trouble with it.


CloseToPerfect(Posted 2011) [#12]
ah new error

Compiling:blitz_app.c
In file included from C:/BlitzMax/mod/brl.mod/blitz.mod/blitz.h:5:0,
from C:/BlitzMax/mod/brl.mod/blitz.mod/blitz_app.c:2:
c:/mingw/lib/gcc/mingw32/4.5.0/../../../../include/stdio.h:26:20: fatal error: stddef.h: No such file or directory
compilation terminated.
Build Error: failed to compile C:/BlitzMax/mod/brl.mod/blitz.mod/blitz_app.c


CloseToPerfect(Posted 2011) [#13]
well, I'm done in my 3d with BlitzMax. I can't get the examples in MiniB3D I don't know if it's minGW or what. So now I'm afraid to try another 3d commercial engine because I have all of the threads on here about getting minGW to work and I can't. I don't know if these other engines need minGW to work or not so I guess it's best to avoid spending money on something I'm not sure about.

I have Blitz Plus and Max so maybe I will just buy Blitz3d and have the full set, lol. I hate to spend the time learning another language now that I am getting used to MAX........


Kryzon(Posted 2011) [#14]
Yeah, that's the pain of installing MinGW. Don't worry; redo the process with greater care.
Make sure you caught up on the "official" ways of doing it:
http://blitzbasic.com/Community/posts.php?topic=72892 - by Mark Sibly
http://www.blitzbasic.com/Community/posts.php?topic=90964 - by Ziggy (I already posted this)

Also, make sure to get skill in building individual modules by using the command line. The instructions for this are in BlitzMax home page (in your BMax IDE). When over there, select User Guide then scroll down the page to see "BMK". Click that to see the instructions.
Typical usage sums up to:
bmk makemods sidesign.minib3d



josk(Posted 2011) [#15]
You can download a demo of Xors3d, no cost. All the commands are there, there is just a time limit on programs running. No trouble to set up as well.

Maybe come back tomorrow and try to get MiniB3D to run.


wmaass(Posted 2011) [#16]
Once you can get going with mods there is a whole world of good stuff available to you. It took me a while but once I got going I couldn't stop.


ima747(Posted 2011) [#17]
I'm with Kryzon, give installing minGW another shot following an official guide (it's extra annoying with windows 7 if that's what you're running btw... gotta make sure you're instructions are matching the OS because MS LOVES to move things around...). Being able to build modules (and rebuild the official modules to include fixes etc. between full releases, is invaluable. It's annoying as can be to get it installed on windows but once it's set up right it works like you'd expect from max, just select the build modules option from the menu in the IDE and it builds the modules ta-da!

And as josk mentioned, most of the pay options have free trials of some sort as well, but I wouldn't be surprised if a lot of them require you to build something at some point.

minGW is indeed a C compiler, which is needed to compile C/C++ source files used in many modules (you can write your own C and use it in your projects too if you wish...) to optimize performance, or for easier code maintainence between related projects etc. MiniB3D uses it specifically for optimized math routines.


CloseToPerfect(Posted 2011) [#18]
I'm going to try to install mingw again tomorrow, there is no way to uninstall the old version other then just erasing the directory right? There is no installer so nothing to undo other then erasing the 2 user vars and the path entry.

So if I erase these things then and install again maybe then.....

I need to find a good post that explains modules really well, any suggestions?


CloseToPerfect(Posted 2011) [#19]
Thanks Guys, I wasn't going to try again and reading your comments got me to try again. I didn't expect it to work but.....It did!

I don't know what I did different I used the same guide by Ziggy. But yeah thanks, alot!

I have minib3d working and have ran some of the examples works like a charm!

Thanks again, CTP


josk(Posted 2011) [#20]
You have made me look at minib3d again now, i'd just started a new project in Xors3d as well.


Kryzon(Posted 2011) [#21]
I need to find a good post that explains modules really well, any suggestions?

http://blitzbasic.com/Community/posts.php?topic=42290 - How to make and edit Modules
http://blitzbasic.com/Community/posts.php?topic=59283 - How to make a Module?
http://blitzbasic.com/Community/posts.php?topic=68114 - Documenting your Modules

Glad miniB3D is working for you now. It's a great engine, but it does lack a few of Blitz3D features: for me the most important one by far is Morph-Target animations, also known as "hierarchical" animations - you only get skeletal; also, it uses Eulers instead of Quaternions, so ocasionally you get Gimbal Lock as a "bonus".

Last edited 2011


CloseToPerfect(Posted 2011) [#22]
Is there a way to get minib3d syntax highlighting for the MaxIDE?


kiami(Posted 2011) [#23]
my suggestion is to make sure you try xors3d - at least try it. xors3d is being developed continuously, though very slowly. minib3d is a limited and a discontinued project. about multiplatform issue, i have this comment: i love to ignore monopolists' products and work with linux and opengl and open source software or free products, however, i cannot wait and wait until some people feel like doing me a favor. so when i find a software is priced reasonably and it solves some of my problems, i won't wait a "decade" and i buy that product.


CloseToPerfect(Posted 2011) [#24]
kiami what is the 30 minute trial timer in the free version. I can use the product for only 30 minutes, which isn't enough time for me? Or, programs I write with it only will run for 30 minutes, which I can deal with?

If I use the trial version and like it, is it the same as the full version and if I buy it we everything still work?


CloseToPerfect(Posted 2011) [#25]
I'll dl it and try it.


kiami(Posted 2011) [#26]
30 minutes is for running your program. yes, download and try it. if you find bug, report it. if they say you need to buy the commercial version, then think and make decision. i don't say bad people won't put bug in their software to force you to buy their products, also i don't say xors3d guys are bad or good, just to raise this awareness that our world is not that simple, a lot goes on behind the scene.


SLotman(Posted 2011) [#27]
minib3d is a limited and a discontinued project

Not true at all... and still, you get the source, so you can do anything with it, contrary to most of the payed 3d engines - that if you have a bug, or you need some feature you depend on others to fix/implement it, instead of having the option to do it yourself.

if miniB3D isn't enough for you, I would recommend to try Unity.


Kryzon(Posted 2011) [#28]
Is there a way to get minib3d syntax highlighting for the MaxIDE?

Sure. It comes with it, if you are using the procedural interface (that is, the mapped functions located in Minib3d.mod\Inc\Functions.BMX - it's supposed to be similar to Blitz3D).

If you want to use the object-oriented interface, make sure to add the following markup at the declaration of all the Types AND their Methods\Functions (you don't need to do on all three, but you'll only get highlighting to the parts you do):
Rem
bbdoc: Type whatever you want to appear as a description for the element below. Or leave it blank so you just get the highlighting.
End Rem
In actual code, this would be like...
Rem 
bbdoc: 
End Rem
Type TMesh Extends TEntity
	Rem
	bbdoc: 
	End Rem
	Method Update()
	[...]

Then, hit "Rebuild Documentation" in your BlitzMax IDE. If you've done things correctly, next time you open a code that has these documented types, methods and functions, you will get syntax highlighting.
You can only make this BBDOC markup work in Module code files.

This documentation system has much more to it, more markups etc. You can read more about it in this link I posted previously.


kiami(Posted 2011) [#29]
if you go to minib3d site you will see that the project is discontinued and is limited. this is a false argument to say my statement is not correct. To see if i am correct do two things: 1 - see the date of mini3d then see what features are lacking in it, 2 - study logic, go to falsification area, see when a logical argument becomes false. unfortunately, i cannot do it for you, you need to go through the labor, pain and suffering of learning.


ima747(Posted 2011) [#30]
re: kiami
minib3d's site has never been accurate. Check the forum right here on the blitz community and you will see it's very much alive. Simon (the author of MiniB3D) is still quite active, though it being an open source project and therefore not paying, he doesn't have all the time in the world for regular updates. However the community has stepped up to offer patches between major point releases (see the Small Fix's version of MiniB3D in the forum) to help keep everything running smoothly.

Sadly the extended version of MiniB3D from klepto (which adds shader support among other things) has been discontinued as he has been working on a total re-write and it may have been abandoned as I haven't heard anything on that in quite some time.

Because a web page (of which there are atleast 3 which have varying degrees of official connection...) says something is dead doesn't make it so. In reality MiniB3D exists almost exclusively in the forum here as all attempts to create web sites for it have languished. In reality it's the web sites that are discontinued.

Last edited 2011


CloseToPerfect(Posted 2011) [#31]
Kryzon, I'm not sure I understand..... Do I have to open a file and then rebuild docs? I did a rebuild docs and I still have nothing highlighted. Do I have to type the stuff you showed for each command?


SLotman(Posted 2011) [#32]
if you go to minib3d site...

The miniB3D site, is the forum right here. Anything else, is not official. Just see the ammount of posts with bugfixes and new features on miniB3D forum, and you'll see its not discontinued, nor limited.

Do I have to open a file and then rebuild docs?

That's a tough one. I also struggled to get the commands highlighted, and ended up rewriting minib3d.bmx and functions.bmx several times, until somehow it started highlighting stuff.

Make sure on minib3d.bmx you have something like this right on top of the file:

Rem
bbdoc:
about:
End Rem
Module sidesign.minib3d
ModuleInfo "Version: 0.53"
ModuleInfo "Main Author: Simon Harrison (some@email). Includes routines by various authors."
ModuleInfo "License: You are free to use this code as you please"
ModuleInfo "Please see readme.txt for more details"


and then, on functions.bmx something like this, on every function you want highlighted (it should already have *something*, so no need to edit unless you want a better help file):
Rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=BrushBlend">Online Help</a>
about:brush - brush handle<br>
blend - <br>
1: alpha (default) <br>
2: multiply <br>
3: add
EndRem


This is what I did for BrushBlend command (the text was copied from Blitz3D help section): now not only it highlight the text, but if I hit F1 twice with cursor over it, it shows that text in the help section :)

Last edited 2011


Kryzon(Posted 2011) [#33]
That link I posted previously explains all there is to know about documenting a module, so make sure you are following that. That whole thread is filled with interesting information, so make sure to read the rest and not only the first post.

If you want highlighted commands you need to document a module.
MiniB3D already has highlighted function names. These functions are located inside Sidesign.mod\MiniB3D.mod\Inc\Functions.BMX, in case you want to see them (and their documenting-code).

If something as simple as "CreateCamera()" is not highlighting, perhaps you haven't updated your documentation by hitting Rebuild Documentation in your Max IDE menu Program -> Rebuild Documentation (it's the last option).
Doesn't matter which code file you have opened, the IDE will close them all after asking to do so. After the documentation is rebuilt, you'll probably get your highlighted miniB3D functions.

Last edited 2011


CloseToPerfect(Posted 2011) [#34]
any ideas why it is not updating my docs?

I have rebuilt the docs several times.

I looked a the Functions.BMX and it has all the bbdoc commands in it.


Kryzon(Posted 2011) [#35]
Well, is the module working itself? are you sure you are not using it as an "import file" by having "Import minib3d.bmx"? by using it like so you are not actually using it as a module: your code is just compiling it everytime you run the code.

For the module to be working, you should be able to do "Import sidesign.minib3d" and the samples should still work. This would show that the module is indeed working and was recognized by BlitzMax, and there would be no reason for it to not have its documentation rebuilt\updated.


CloseToPerfect(Posted 2011) [#36]
Yeah, I use it like that.
1st line in programs is Import sidesign.minib3d

When I update docs I don't see it in the final list but there are no errors either.

Rebuilding documentation...
Building: BlitzMax Help
Building: Modules
Building: Audio
Building: BRL.Audio
Building: TSound
Building: TChannel
Building: BRL.AudioSample
Building: TAudioSample
Building: TAudioSampleLoader
Building: BRL.DirectSoundAudio
Building: BRL.FreeAudioAudio
Building: BRL.OGGLoader
Building: BRL.OpenALAudio
Building: BRL.WAVLoader
Building: Pub.OpenAL
Building: Miscellaneous
Building: BRL.Bank
Building: TBank
Building: Pub.ZLib
Building: Streams
Building: BRL.BankStream
Building: TBankStream
Building: BRL.EndianStream
Building: BRL.RamStream
Building: BRL.SocketStream
Building: BRL.Stream
Building: TStreamException
Building: TStreamReadException
Building: TStreamWriteException
Building: TIO
Building: TStream
Building: TStreamWrapper
Building: TCStream
Building: TStreamFactory
Building: BRL.TextStream
Building: BASIC
Building: BRL.Blitz
Building: BRL.Reflection
Building: TMember
Building: TField
Building: TMethod
Building: TTypeId
Building: BRL.Retro
Building: Graphics
Building: BRL.BMPLoader
Building: BRL.D3D7Max2D
Building: BRL.GLGraphics
Building: BRL.GLMax2D
Building: BRL.Graphics
Building: BRL.JPGLoader
Building: BRL.Max2D
Building: TImage
Building: BRL.Pixmap
Building: TPixmap
Building: TPixmapLoader
Building: BRL.PNGLoader
Building: BRL.TGALoader
Building: Pub.OpenGL
Building: Events
Building: BRL.Event
Building: TEvent
Building: BRL.EventQueue
Building: BRL.Hook
Building: BRL.Timer
Building: System
Building: BRL.FileSystem
Building: BRL.MaxLua
Building: TLuaObject
Building: TLuaClass
Building: BRL.StandardIO
Building: BRL.System
Building: BRL.Threads
Building: TThread
Building: TThreadData
Building: TMutex
Building: TSemaphore
Building: TCondVar
Building: Networking
Building: BRL.GNet
Building: BRL.Socket
Building: User input
Building: BRL.KeyCodes
Building: BRL.PolledInput
Building: Pub.FreeJoy
Building: Data structures
Building: BRL.LinkedList
Building: TLink
Building: TListEnum
Building: TList
Building: BRL.Map
Building: Math
Building: BRL.Math
Building: BRL.Random
Building: MaxGUI Drivers
Building: MaxGUI.CocoaMaxGUI
Building: MaxGUI.FLTKMaxGUI
Building: MaxGUI.Win32MaxGUIEx
Building: MaxGUI
Building: MaxGUI.Drivers
Building: MaxGUI.Localization
Building: MaxGUI.MaxGUI
Building: MaxGUI.ProxyGadgets
Building: Other
Building: Pub.Lua
Building: Language
Building: Advanced topics
Building: Interfacing with C
Building: Memory management
Building: Pointers
Building: Arrays
Building: BASIC Compatibility
Building: Collections
Building: Comments
Building: Conditional compiling
Building: Constants
Building: Data types
Building: Debugging
Building: Exceptions
Building: Expressions
Building: Functions
Building: Identifiers
Building: Literals
Building: Modules
Building: Objects
Building: Program flow
Building: Projects
Building: Slices
Building: Strings
Building: User defined types
Building: Variables
Building: Licenses
Building: bssc
Building: ftl
Building: glx
Building: oggvorbis
Building: sgi
Building: zlibpng
Building: Tutorials
Building: BlitzMax overview
Building: MaxGUI overview
Building: User Guide
Building: bmk
Building: maxide

Process complete


CloseToPerfect(Posted 2011) [#37]
I installed Xors trial as well and it's not in the list and no highlighting on it either?


ziggy(Posted 2011) [#38]
Then you're installing it wrong. :D No offense intended, just be suer to have this folder structure:
[blitzmax folder]\mod\sidesign.mod\minib3d.mod

and inside the minib3d.mod, a file called minib3d.bmx that has the header:
Module sidesign.minib3d

If that's not exactly like this, the module is not properly installed.


CloseToPerfect(Posted 2011) [#39]
ok I have that,
[blitzmax folder]\mod\sidesign.mod\minib3d.mod

but I also have this
[blitzmax folder]\mod\minib3d\sidesign.mod\minib3d.mod

so maybe I delete the 2nd folder then?

both end up with the minib3d.bmx file.

EDIT, So I deleted that folder and rebuild docs and still nothing minib3d is still working so I guess that folder was another version I downloaded at some point.

Last edited 2011


ziggy(Posted 2011) [#40]
Yes, delete the second folder. It is doing nothing :D

Then, be sure that the minib3d.bmx file you have in the minib3d.mod folder has this sentence at its begining:
Rem
bbdoc: minib3d
End Rem
Module sidesign.minib3d
'ModuleInfo "Version: 0.53"
'ModuleInfo "Main Author: Simon Harrison (simonh@...). Includes routines by various authors."
'ModuleInfo "License: You are free to use this code as you please"
'ModuleInfo "Please see readme.txt for more details"


Be sure that the sentence Module sidesign.minib3d is not commented. It was on latest release and it has to be uncommented.

After checking this, save the file if needed, and rebuild documentation (and maybe restart the ide). It should work.


Kryzon(Posted 2011) [#41]
\mod\minib3d\sidesign.mod\minib3d.mod

Every folder inside the MOD folder should end with ".mod". This first "minib3d" folder does not belong there - delete it.

The structure should be like Ziggy said: BlitzMax\mod\sidesign.mod\minib3d.mod\.


CloseToPerfect(Posted 2011) [#42]
Ziggy that line was commented out, I uncommented it and rebuilt and it is working now.

Thanks alot for all the help guys.


CTP


kiami(Posted 2011) [#43]
closettoperfect,
for xors3d help go to xors3d forums. it has forum for different aspects of the engine.
i found blide to be the best ide for blitzmax. it has a free verson which you can download it in the ide forum. but if you pay for it you will help the project too. blide seems going to be like visual studio. it has intellisense.