![]() |
![]() |
![]() |
![]() |
What 3d chip sets are supported? | upd.: 18-Feb-01 |
|
When starting one of the Wavefront tools, nothing happens. | upd.: 18-Feb-01 |
|
How do I get my own 3d objects into Nebula? | upd.: 18-Feb-01 |
|
The new VisualStudio project files don't work! | upd.: 18-Feb-01 |
|
Compiling under Linux doesn't work! | upd.: 25-Mar-00 |
|
How do I start a new Nebula class? | upd.: 31-May-00 |
|
How to I debug a Nebula application? | upd.: 31-May-00 |
|
What are Nebula class packages? | upd.: 31-May-00 |
What 3d chip sets are supported? | ![]() |
Nebula should run on every chip with Direct3D and/or OpenGL support. We generally use the chip manufacturer's reference drivers for testing. Here's a list of current chip sets, and their known issues: nVidia TNT familyOk.nVidia GeForce familyOk. May be tricky to actually get hardware t&l especially under Win2k (hardware t&l should be less fragile with the upcoming D3D8 support in Nebula).ATI Rage128Ok.ATI RadeonUntested.3dfx Voodoo3D3D ok. OpenGL not recommended.Matrox G400D3D ok. OpenGL not recommended. |
When starting one of the Wavefront tools, nothing happens. | ![]() |
The WFTools generally expect their input from stdin and write their output to stdout. This seems strange but has the advantage that one can construct "pipelines" on the command line by handing output from one tool directly to another tool without having to go through intermediate files: wfclean < in.obj | wftriang | wfflatten >out.n3dThis example starts wfclean first, reading input from the file 'in.obj', which hands its output to wftriang, which in turn hand its output to wfflatten, which finally writes its output to the file 'out.n3d'. |
How do I get my own 3d objects into Nebula? | ![]() |
This is basically explained in our tutorial, here's a somewhat more techie description: You need a 3d modeler that can save Wavefront OBJ files, and the WFTools from our download page. The OBJ file should contain vertices, normals, texture coordinates and face definitions (v, vn, vt and f statements). Suppose you save the 3d object as "object.obj" from the modeler. Now, run the file through the following wftools pipeline: wfclean < object.obj | wftriang | wfflatten > object.n3d This will cleanup, triangulate and "flatten" the Wavefront file so that it can be used by Nebula. You can put the pipeline into a .bat script like this: rem --------------------------------------------- rem convert.bat 'from' 'to' rem Prepare standard Wavefront file for Nebula. rem 'from' -- name of input file rem 'out' -- name of output file rem rem --------------------------------------------- wfclean < %1 | wftriang | wfflatten > %2 rem --------------------------------------------- rem EOF rem --------------------------------------------- And then just run: convert object.obj object.n3d If the object has a texture, convert the texture to BMP format (8 bpp or 24 bpp uncompressed), scale it to a 2^n size (256x256 for instance) and save it into the same directory as "object.n3d" under the filename "texture.bmp". To display the object in Nebula, a minimal visual hierarchy is required, consisting of a n3dnode (providing position and orientation), a nmeshnode (providing the geometry), a ntexarraynode (providing the texture) and a nshadernode (providing the surface material), you should also include an ambient lightsource to see something. The following Nebula script should do the job: # ----------------------------------------------- # Minimal display hierarchy to display an # object. # ----------------------------------------------- sel /usr/scene # create an ambient light new nlightnode amb sel amb .setcolor 1.0 1.0 1.0 1.0 sel .. # create a 3d node with mesh, texture and material new n3dnode pos sel pos new nmeshnode mesh sel mesh .setfilename "object.n3d" sel .. new nshadernode sn sel sn .setnumstages 1 .setcolorop 0 "mul tex prev" .setlightenable true .setdiffuse 1 1 1 1 .setemissive 0 0 0 0 .setambient 1 1 1 1 sel .. new ntexarraynode tex sel tex .settexture 0 texture.bmp none sel .. sel .. # ----------------------------------------------- # EOF # ----------------------------------------------- Save this script as "show.tcl" in the same directory as "object.n3d" and "texture.bmp". Start nlaunch.exe with the startup.tcl script from the tutorial directory: nlaunch startup.tcl When the 3d window is up, open the console with Esc, change to the filesystem directory where your "object.n3d", "texture.bmp" and "show.tcl" script are located: > cd "fs_path" > _ Load the "show.tcl" script with Tcl's "source" command: > source show.tcl > _ You should now see your 3d object (unless it is very big, the ground grid has a resolution of 1.0 coordinates so your object's coordinates should be somewhere in the range of -5.0 to +5.0 to fit comfortably into the default 3d view. |
The new VisualStudio project files don't work! | ![]() |
VisualC++ doesn't know about the .cc file extension by default. To fix this a few changes to the system registry are necessary:
|
Compiling under Linux doesn't work! | ![]() |
Nebula's makefiles try to detect automatically which platform they run on to select the proper tools and options. The critical code snippet is at the beginning of 'nebula/code/config.mak': #--------------------------------------------------------------------- # N_PLATFORM = __LINUX__, __WIN32__ # Automatically try to determine the platform we are running # on. WinNT and Linux offer the 'OSTYPE' env var, Win9x not. #--------------------------------------------------------------------- N_PLATFORM = __WIN32__ ifeq ($(OSTYPE),linux) N_PLATFORM = __LINUX__ endif ifeq ($(OSTYPE),linux-gnu) N_PLATFORM = __LINUX__ endif ifeq ($(OSTYPE),Linux) N_PLATFORM = __LINUX__ endif If your Linux OSTYPE variable is not set to one of the above values, you need to add another 'ifeq ($(OSTYPE),YourOsType)' block there and try again. Please send me a mail (floh@radonlabs.de) if your OSTYPE is not supported, thanx! |
How do I start a new Nebula class? | ![]() |
A new class that can make use of Nebula's scripting, persistency interface and hierarchical object namespace must be derived from the nRoot class or one of its subclasses. Since nRoot classes live in dynamically loaded class package dlls, there are a few rules one needs to follow:
|
How to I debug a Nebula application? | ![]() |
Nebula class packages other then nnebula.dll (nopengl.dll or ndirect3d.dll) are loaded on demand when the first object of a class from such a class package is created. The problem is that the symbols for those dll's are only available after the dll is loaded. The solution is to put a break point into the function 'code/src/kernel/npackage.cc/loadPackage()', right after the call to n_dllopen(). Each time a new package dll is loaded, the debugger will stop there and you'll have a chance to set or enable your breakpoints. |
What are Nebula class packages? | ![]() |
Nebula class packages are the recommended way to write 3rd party extensions for Nebula. Class package dll's can be redistributed separately from the official Nebula distribution, and they may run under a different license then Nebula (although we don't recommend this). Optional class packages are also a good way to link Nebula to existing 3rd party libraries that run under a different license (for instance a commercial license). The technical advantage is that class package dll's are only loaded on demand. If a Nebula app renders through D3D, it only has to load the ndirect3d.dll, not the nopengl.dll. Also, when switching from D3D to OpenGL at runtime, the ndirect3d.dll will be unloaded, and the nopengl.dll will be loaded. All this is managed internally by the Nebula kernel. If a new object of an unknown class is to be created, the kernel will first look through all the package-table-of-contents files it can find. If the class is in there, the kernel knows what dll to load, and which constructor function to call to create the requested object. At the moment, the kernel simply fails, but in the future, this may be the place to hook in an exception handler which could download the required dll transparently from an update server or something similar. |