Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: DoorKnobHandle on Sun 08/08/2010 16:55:17

Title: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Sun 08/08/2010 16:55:17

(http://i8.photobucket.com/albums/a7/dkh2/rb_screen1.png) (http://i8.photobucket.com/albums/a7/dkh2/rb_screen1.png)

This video explains it all:


CLICK BELOW TO WATCH!

(http://i8.photobucket.com/albums/a7/dkh2/razerblade1.png) (http://www.youtube.com/watch?v=2oH8u3pz5oE)

Grab Version 1.0 HERE (http://duals.agser.me/Plugins/Razorblade_3D_v1.0.rar). Note that it does contain a few undocumented functions and there might be bugs - especially in the collision detection area. The important thing for now is that the core functionality is there. Being able to load and display models with custom shaders and so on.

It comes with the demo game that you saw in the trailer (and source code, assets etc. to that) as well as the documentation and - of course - the DLL itself. Using the source code to the demo game and the documentation, it should be a piece of cake to start putting a 3d game together in AGS. Open the demo game up in the editor and run it from there please. If you run it from the Compiled folder it won't find its resources. If you want to publish a game, you have to copy your models and shaders folders into the compiled folder before distribution!

Let me know what you guys are thinking.

One thing I didn't mention: Razorblade 3D also supports casting rays (lines basically) into the level and then you can check if they hit anything and at which distance. This allows you to check whether a bullet hit an enemy for example.

Two notes:

- Sorry for overusing the phrase "you know" in the video. :D
- I misspelled the title of the plugin in the link image above, it's Razorblade, not Razerblade.

Credit goes to Davi "Exsecratus" Arakaki for the art in the demo game!


Here's a guide that straydogsstrut kindly provided! Make sure to read this before trying to develop with Razorblade 3D!

Quote from: straydogstrut on Sat 25/02/2012 23:33:07
** Pre-requisites for using the plugin **


  • AGS 3.2.x

** Installing the plugin **


  • Download the plugin (http://dl.dropbox.com/u/42455/Razerblade%203D%20Plugin%201.0.rar) and extract
  • Put the AGS Razorblade Plugin.dll in the main folder where AGS is installed (This is the same folder where the AGS Editor.exe is)

** Running the demo Game **


  • Download the demo game (http://dl.dropbox.com/u/42455/Razorblade%203D%20Testgame.rar) and extract
  • Start the AGS Editor and choose Open an Existing game
  • Find the Razorblade 3D Testgame and select the Game file
  • If the plugin is installed correctly you should see the active plugin listed under the Plugins node in the main tree in AGS (right hand side of the program)

Run the game but be aware that if AGS is installed anywhere other than 'C:\ AGS 3.2.1 SP1' (for example, mine is at C:\Program Files\AGS 3.1.2) it will complain about missing textures. This, it seems, is due to the 3DS Max models supplied with the demo game referencing absolute paths. You can dismiss these errors and the game will still run with a default texture. I no longer have 3DS Max on this machine to test the suggestion of changing the setting in the preferences unfortunately.

The demo game features an environment to move around in. WASD keys to move and arrow keys to move the light source around (IJKL can also be used but are commented out in the code). Left mouse click will cast a ray towards the location of the click and report on what was hit (like a gunshot in any FPS). The base model will return "hit nothing" while the lightbulb will tell you the name of the model hit. Note there is no collision detection in the plugin (this is intentional, it's a graphics engine primarily) so you can move through objects.

** Using the plugin in your own games **


  • Having installed the plugin, launch the AGS Editor and start a new game
  • You should see the plugin listed under the Plugins node in the main tree in AGS - right-click it and choose Use This Plugin
  • Make sure that Default Graphics driver is set to Direct 3D 9 Hardware Acceleration
  • Any models and shaders you want to use can be placed in subfolders in the main game folder called models and shaders respectively like the demo game.
  • Models should be in .dmf format (I haven't seen a link to the exporter previously mentioned)
  • The default texture default.png should be placed in the main game directory - I could not get the game to run without this but again presumably this is a path referenced by the demo models themselves?

Going by the demo game, the 3D scene is created in the GlobalScript file - the main bits to look at are:


  • The variables declared at the top of the GlobalScript.asc file (a boolean to track whether the initial setup has been done and integers for the models, lights and shaders).
  • The init function which sets some defaults (background colour, camera culling and clip distance), adds the the object models, shaders and lights
  • A crosshair GUI (see the example in the demo game under the GUI node) is placed and shown at the end of this function
  • The HandleControls() function calls the PlayerControl and AttachWeapon functions found in the Camera script (look under the script node) to allow camera movement and update the placement of the gun
  • The rest of the handleControls function sets up key presses to move the light source around
  • The GameStart() function sets the max FPS, positions the mouse, camera and shows some debugging info
  • The repeatedly_execute() function checks if the initial setup has already been done and if it has does stuff with the shaders that is beyond me ;) It also calls the HandleControl() function described above.
  • Finally the mouse_click() function contains the hit testing code (notice we added an extra model for the hit test)

The documentation that comes with the plugin is excellent and lists many of the commands available. This includes a description of what they do so you can work it out just by looking up the function call in that file.

** Publishing the game **

It has been mentioned that the models and shaders folders should be added to the Compiled folder when publishing the game. I have not tested this.

For people that just want to check out this plugin's capabilities without downloading anything, here's the current documentation:

Quote from: Documentation
CAMERA
   
function RB_SetCameraPosition ( float x, float y, float z )
float RB_GetCameraPositionX ( )
float RB_GetCameraPositionY ( )
float RB_GetCameraPositionZ ( )

   These functions allow you to set the position of the camera and retrieve it.
   Should be self-explanatory.


function RB_SetCameraTarget ( float x, float y, float z )
float RB_GetCameraTargetX ( )
float RB_GetCameraTargetY ( )
float RB_GetCameraTargetZ ( )

   These functions allow you to set the position of camera target and retrieve it.
   The camera target is a point in 3d space that the camera is looking at.
   Use this point as well as the camera position (see above) to position and orient
   the camera in any way you want.


function RB_SetCameraFOV ( float fov )
float RB_GetCameraFOV ( )

   These functions allow you to set the field-of-view of the camera and retrieve it.
   Play around with this value and see what happens for yourself.
   The FOV defaults to 60.0 - which is a standard value to use - so you don't HAVE to
   set it if you don't want to specifically.


function RB_SetCameraClipDistance ( float clip_distance )
float RB_GetCameraClipDistance ( )

   These functions allow you to set the clip distance of the camera.
   That is the distance at which things will start cutting off.
   Make sure this value is large enough so that your scene is visible.



MODEL

int RB_AddModel ( String filename )

   This function adds a new model into your scene.
   You have to supply a filename relative to the game folder that AGS creates for your
   games and the model has to be in the DWF format. Use an exporter for your 3d model
   program to export your assets in that format.
   The function returns a handle that you have to store (as an integer) if you want to
   change further parameters of the model.


function RB_RemoveModel ( int id )

   This function removes a model from the scene.
   You have to supply a handle to an existing model.


function RB_SetModelShader ( int model_id, int shader_id )

   This function tells the game to use a certain shader for a certain model.
   You have to supply a handle to a model as well as a handle to a shader.
   Models with no shader set will default to a very basic one without lighting.


function RB_SetModelPosition ( int id, float x, float y, float z )
float RB_GetModelPositionX ( int id )
float RB_GetModelPositionY ( int id )
float RB_GetModelPositionZ ( int id )
function RB_SetModelRotation ( int id, float x, float y, float z )
float RB_GetModelRotationX ( int id )
float RB_GetModelRotationY ( int id )
float RB_GetModelRotationZ ( int id )
function RB_SetModelScale ( int id, float x, float y, float z )
float RB_GetModelScaleX ( int id )
float RB_GetModelScaleY ( int id )
float RB_GetModelScaleZ ( int id )

   These functions allow you to position, rotate and scale a model in any way you want as
   well as retrieve their current position, rotation or scale.
   The first parameter has to be a handle to an existing model.
   Rotations are done in degrees.


function RB_SetModelCustomCullMode ( int id, RB_CullMode mode )

   This function sets a custom cull mode for a specific model. If your game doesn't use
   automatic backface culling, this function won't do anything. If it deletes faces that
   are counter-clockwise for example, but you have one specific model that is done the
   other way, you can use this function to set up a different cull mode for this mode only.



HIT MODEL

int RB_AddHitModel ( String filename )
function RB_RemoveHitModel ( int id )
function RB_SetHitModelPosition ( int id, float x, float y, float z )
float RB_GetHitModelPositionX ( int id )
float RB_GetHitModelPositionY ( int id )
float RB_GetHitModelPositionZ ( int id )
function RB_SetHitModelRotation ( int id, float x, float y, float z )
float RB_GetHitModelRotationX ( int id )
float RB_GetHitModelRotationY ( int id )
float RB_GetHitModelRotationZ ( int id )
function RB_SetHitModelScale ( int id, float x, float y, float z )
float RB_GetHitModelScaleX ( int id )
float RB_GetHitModelScaleY ( int id )
float RB_GetHitModelScaleZ ( int id )

   These functions are equivalent to the respective model functions (see above).
   The difference is that these concern not normal models but hit models.
   Hit models are always invisible and are only used to calculate collisions with.
   This way you can have a triangle-heavy visible model and a simplified one
   (a box, a cylinder, a sphere maybe, or a combination of these shapes with very
   few triangles) so that collision calculations are much faster.



LIGHT

int RB_AddLight ( RB_LightType type )

   This function adds a new light to the scene.
   You have to supply a light type. Currently only point lights are supported.
   The function returns a handle (integer as always) to the new light that you have
   to store if you want to change its parameters after the creation.


function RB_RemoveLight ( int id )

   This function removes a light from the scene.
   You have to supply it with a handle to an existing light.


RB_LightType RB_GetLightType ( int id )

   This function returns what particular light type a light in the scene is.
   You have to supply it with a handle to an existing light.
   The function returns the respective light type.


function RB_SetLightPosition ( int id, float x, float y, float z )
float RB_GetLightPositionX ( int id )
float RB_GetLightPositionY ( int id )
float RB_GetLightPositionZ ( int id )

   These functions allow you to set the position of a light as well as retrieve it.
   The first parameter has to be a handle to an existing light.


function RB_SetLightAmbientColor ( int id, floatare, float g, float b )

   This function sets the color of the ambient term of a light.
   The ambient light is added to all of your scene regardless of distance or orientation
   or anything. If you would want your scene to be lit by nothing except a single point
   light, set this to black. If you also want a distant moon lighting all of your scene up
   just a little bit, set it to a dark yellow.
   You have to supply it with a handle to an existing light.


function RB_SetLightDiffuseColor ( int id, floatare, float g, float b )

   This function sets the color of the diffuse term of a light.
   The diffuse light is only added to triangles that face the light to a certain degree and
   that are close enough. If you imagine a candle in a dark environment, the orange light
   coming from the candle and lighting up nearby objects would be the diffuse light.
   You have to supply it with a handle to an existing light.


function RB_SetLightSpecularColor ( int id, floatare, float g, float b )

   This function sets the color of the specular term of a light.
   The specular color is the light that reflects back from a lit up surface to the camera.
   It's particularly strong on objects with a wet or metallic surface.
   You have to supply it with a handle to an existing light.


function RB_SetLightIntensity ( int id, float intensity )
   
   This function sets the overall strength of the light.
   The more intense a light is, the brighter it will appear and the more area will be lit
   up by it.
   You have to supply it with a handle to an existing light.


function RB_SetLightCutoff ( int id, float cutoff )

   This function sets the exponent that is used to calculate the cutoff for the light.
   Setting this to 1.0 would result in a linear cutoff meaning a triangle x units away from
   the light would receive twice the light as a triangle double that distance would.
   Increase the value to get more realistic results where a certain region around the light
   gets lit up a lot and then it fades away very quickly.
   You have to supply it with a handle to an existing light.


function RB_SetLightShininess ( int id, float shininess )
function RB_SetLightSpecularIntensity ( int id, float specular_intensity )

   These functions allow you to control the exact behaviour of the specular part of the light.
   You have to supply them with a handle to an existing light.



SHADER


int RB_AddShader ( String filename )

   This function adds a shader to the scene.
   Store the handle it returns (as an integer) in order to apply it to models.
   You have to supply it with a filename relative to the game folder that AGS creates for your
   game where it can find a shader in the FX format (written in HLSL).


function RB_RemoveShader ( int id )
   
   This function removes a shader from the scene.
   You have to supply it with a handle to an existing shader.


function RB_SendFloatToShader ( int id, String name, float value )
function RB_SendFloat4ToShader ( int id, String name, float value1, float value2, float value3, float value4 )
function RB_SendFloatArrayToShader ( int id, String name, float value[], int element_count );\r\n" );
function RB_SendFloat4ArrayToShader ( int id, String name, float value1[], float value2[], float value3[],
float value4[], int element_count );


   These functions allow you to send varying floating point vales and arrays of values to the shader.
   You have to supply them with a handle to an existing shader, a name to a variable of proper type in
   the shader code as well as the necessary values. For sending arrays you also have to tell the function
   how many elements there are in the array in the last parameter.
   

function RB_SetShaderAutoSendWVP ( int id, String name, bool toggle );\r\n" );
function RB_SetShaderAutoSendW ( int id, String name, bool toggle );\r\n" );

   These functions allow you to make your game send a shader the world-view-projection matrix or simply
   the world matrix automatically each frame.
   You have to supply it with a handle to an existing shader, with a name to a matrix variable in the
   shader code and a boolean value to determine whether you want to turn the automatic sending on (true)
   or off (false).



MISC


function RB_SetClearColor ( floatare, float g, float b )

   This function sets a global clear color.
   That is the color the scene will default to every frame. The color will be visible when you don't have
   a model that surrounds the camera completely.


function RB_SetGlobalCullMode ( RB_CullMode mode )

   This function sets a global cull mode. You can improve performance by letting the game delete faces that
   don't face the camera as these wouldn't be visible anyways.
   Note that the global cull mode can be overwritten for each model.
   You don't have to set this value, it will default to not using culling at all as a wrong cull mode makes
   your models invisible.


int RB_SendRay ( float x1, float y1, float z1, float x2, float y2, float z2, RB_IntersectionType intersect_with )

   This function sends a ray from a position in 3d space to another location.
   You have to supply it with both the origin and the target points.
   You can also choose whether you want the ray to collide with anything or just hit models.
   The function returns a handle to a collision object, use that to check the collision test for results and
   retrieve further details.


int RB_SendScreenRay ( int x, int y, RB_IntersectionType intersect_with )

   This function works in the same way as RB_SendRay except that you can specify 2d coordinates on the screen
   and the game will send a ray through there. This is great for when you want to shoot a bullet through the
   center of the screen and check if it hit an enemy for example.


float RB_GetIntersectionDistance ( int id )

   This function returns the distance at which an intersection occured.
   You have to supply it with a handle to an existing collision object.
   If there was no collision, it will return -1.0.


int RB_GetIntersectionModel ( int id )

   This function returns a handle to the model that collided with the ray first.
   You have to supply it with a handle to an existing collision object.
   If there was no collision, it will return -1.

Edited by Dualnames. Included/replaced with working download link
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Kweepa on Sun 08/08/2010 17:07:00
Pretty freaking cool!
What art packages have you written exporters for? You mention Max. How about Maya?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Crimson Wizard on Sun 08/08/2010 17:08:21
That's neat, let's just hope people won't overuse 3d-ness to create silly boring games with fashionable graphics ;)
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Sun 08/08/2010 17:11:05
Thanks to both of you! :D

Quote from: SteveMcCrea on Sun 08/08/2010 17:07:00
Pretty freaking cool!
What art packages have you written exporters for? You mention Max. How about Maya?

There's only one for Max at the moment, I don't own Maya unfortunately so I'd need to find somebody who has it and has experience with its scripting language (or whatever it uses for plugins). I definitely want to port the Max exporter to Blender as well tho.

If all that fails, I can offer to export your models, until there are Exporters for at least one freeware package.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: GarageGothic on Sun 08/08/2010 17:33:48
Very, very cool!  :o

(Though I have to admit I'm slightly peeved that this, along with the stuff Calin is doing at the moment, make my own budding efforts in plug-in writing begin to feel redundant )

So if I understand correctly, you wrote your own 3D engine from scratch? Just, wow! Here I've been spending a month or so trying to weigh the pros and cons of various open source engines for my plugin - and have yet to find one I'm entirely happy with - never even considered the option of coding one myself (not that I would be able to with my current C++ skills, but even so, I imagined it would take years and years of work).

I look forward to check out the documentation to learn more about the feature set and current limitations. But what I saw in the video looked very promising. This could very well turn out to be the technology I've been looking for all along to use in my next project. Consider me impressed and intrigued :)

Edit: Forgot to say - Razorblade 3D is by far the coolest sounding name of any free 3D engine, I've come across. Not that it would be a deciding factor, of course, even so I'd much rather tell an interviewer that my new game was based on "cutting edge Razorblade 3D tech" than try to pronounce "Irrlicht" without sounding like a Nazi coughing up phlegm.  ;)
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Sun 08/08/2010 17:35:35
Thanks GG! Yes, it's basically a 3D graphics engine that I wrote from scratch in C++ using D3D9. Was a ton of work! :p

The demo game, the plug-in and the documentation will be available in the next couple of hours!
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Dualnames on Sun 08/08/2010 18:04:49
Quote from: dkh on Sun 08/08/2010 17:35:35
Thanks GG! Yes, it's basically a 3D graphics engine that I wrote from scratch in C++ using D3D9. Was a ton of work! :p

The demo game, the plug-in and the documentation will be available in the next couple of hours!

You tease!!!

Looks uber great!!
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: JD on Sun 08/08/2010 18:09:00
This looks awesome! Looking forward to checking the documentation and trying the plug-in!
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Sun 08/08/2010 19:05:21
Thanks guys!

THE PLUG-IN IS NOW AVAILABLE!

It comes with the demo game that you saw in the trailer (and source code, assets etc. to that) as well as the documentation and - of course - the DLL itself. Using the source code to the demo game and the documentation, it should be a piece of cake to start putting a 3d game together in AGS. Open the demo game up in the editor and run it from there please. If you run it from the Compiled folder it won't find its resources. If you want to publish a game, you have to copy your models and shaders folders into the compiled folder before distribution!

I will release the exporter for 3D studio Max next so you can start using your own models.

Grab Version 1.0 HERE (http://drop.io/4iins5r/asset/razorblade-3d-1-0-rar). Note that it does contain a few undocumented functions and there might be bugs - especially in the collision detection area. The important thing for now is that the core functionality is there. Being able to load and display models with custom shaders and so on.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: straydogstrut on Sun 08/08/2010 20:34:51
That is seriously cool! A tremendous amount of work you've put in there, unbelievable. I also hope everyone doesn't go 3D gaga but I look forward to the interesting uses people find for this. Thank you=)
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Kweepa on Sun 08/08/2010 21:49:55
I tried loading the demo game in AGS but the plugin has some missing dependencies (found using Dependency Walker):
D3DX9D_41.DLL (presumably the debug version of the D3D9 dll)
MSVCP90D.DLL
MSVCR90D.DLL (VC debug runtimes - I don't think these are available in VC redist packages, and I don't really want to download them from some random site...)

I think you need to compile with release DLLs.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Sun 08/08/2010 21:58:23
Damn. Let me fix that! :D

Alright, the new link is here (http://drop.io/4iins5r/asset/razorblade-3d-1-0-rar). I have also updated all links that were posted before.

Hope it works now!
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Calin Leafshade on Sun 08/08/2010 22:19:37
I have a question.

What possible role could the AGS engine actually play with this plugin?

Surely if you convert the display to a full 3d thing then all the AGS functions are pretty useless?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Sun 08/08/2010 22:26:25
The plugin only replaces rooms (objects, masks etc.) and characters. You can still use all that in a game that ALSO uses the 3d plugin but not simultaneously (obviously). But AGS offers a ton of other functionality that you can use together with the 3d graphics. As I say in the video, any user interface you want to have in your 3d game? Just make it exactly like you would for your 2d game. Sound, music and videos? 2d menus? Use AGS just like usual. It's just the game world that is no longer in 2d but 3d. It's still way different and much easier than just using a standard full-size 3d engine in, say, C++.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Calin Leafshade on Sun 08/08/2010 22:28:34
Yea thats true I suppose.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Sun 08/08/2010 22:31:23
Oh, also all the cursor-mode related functionality from AGS is very convenient to still have working when you want to make a 3d adventure specifically, I guess.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Calin Leafshade on Sun 08/08/2010 22:34:50
can you easily convert a mouse click co-ordinate to the 3d world?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Sun 08/08/2010 22:40:17
From the documentation:

Quote
int RB_SendScreenRay ( int x, int y, RB_IntersectionType intersect_with )

   This function works in the same way as RB_SendRay except that you can specify 2d coordinates on the screen
   and the game will send a ray through there. This is great for when you want to shoot a bullet through the
   center of the screen and check if it hit an enemy for example.

Call it with mouse.x and mouse.y and it will return a handle to the model that was clicked. Use one model as a "room" and then seperate models for each object or hotspot IN the room and you're all set. ;D
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Khris on Sun 08/08/2010 22:47:00
I had to copy all AGS and game files to "C:\AGS 3.1.2 SP1\" in order to make it work; looks like there's an absolute path somewhere in the dll?

I does look great though and never drops below 100 FPS on my machine.
Jumping doesn't work yet, pressing space moves the camera up but not back down. I guess this is related to the collision detection not being implemented yet?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Sun 08/08/2010 22:55:56
Quote from: Khris on Sun 08/08/2010 22:47:00
I had to copy all AGS and game files to "C:\AGS 3.1.2 SP1\" in order to make it work; looks like there's an absolute path somewhere in the dll?

I does look great though and never drops below 100 FPS on my machine.
Jumping doesn't work yet, pressing space moves the camera up but not back down. I guess this is related to the collision detection not being implemented yet?

Damn, that's because of the textures. Each model makes a reference to a material which then points to a bunch of textures. I couldn't get 3ds Max to use relative paths instead of absolute ones for that reference. I might have to think up some kind of magic to convert them.

Or is there any kind of error when you start a new game with the plug-in as well?

Jumping isn't possible because the collision detection isn't working (it did at some point but then apparently I broke it again). :D But the demo game could easily just move you down again a set amount, since the ground plane doesn't change in height in the level.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Dualnames on Mon 09/08/2010 00:34:09
runs at 100 FPS!!!!!!

I don't suppose there could be a problem if someone used this plugin for cutscene purposes?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Mon 09/08/2010 00:37:22
I haven't tried it but I don't see why not. :D

Did you have to move anything into weird folders to make the demo game run like Khris reported?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Dualnames on Mon 09/08/2010 00:38:36
Quote from: dkh on Mon 09/08/2010 00:37:22
I haven't tried it but I don't see why not. :D

Did you have to move anything into weird folders to make the demo game run like Khris reported?

Yes, infact I needed to move the game into C:\AGS 3.1.2 SP1\. Cause the models wouldn't work. They seem to be hardcoded.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Mon 09/08/2010 01:10:55
Okay, so it is the issue with the models/textures. That helps a lot. I'll work on an updated version ASAP.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Monsieur OUXX on Mon 09/08/2010 08:37:56
@dkh : May I inquire why you chose to program your own 3D engine instead of integrating, lets say, Ogre3D or Irrlicht?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Mon 09/08/2010 13:08:47
That wouldn't be possible, both from a technical (these engines have their own window setup integrated and making D3D9 render to the AGS window is a very hard task, you have to fiddle around a lot) and from a legal point-of-view.

To those that downloaded the plug-in and tried running the test game, what were the exact error message you got? When I extract the demo game to some other folder, what I get is only errors about missing textures (which I know why that happens) and then the game runs fine with the default texture.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Lt. Smash on Mon 09/08/2010 16:11:38
I always get an error message - it's missing d3dx9_41.dll - when starting the AGS Editor...
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Crimson Wizard on Mon 09/08/2010 16:38:18
Quote from: Lt. Smash on Mon 09/08/2010 16:11:38
I always get an error message - it's missing d3dx9_41.dll - when starting the AGS Editor...
I had similar problem on my job recently, where we used Ogre engine; but I forgot the actual reason why this dll is not predent in the system. I suppose it belongs to either DirectX SDK, or to older version of DX, or something like that.

Anyway, you can get one here:
http://www.dll-files.com/dllindex/dll-files.shtml?d3dx9_41
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: LimpingFish on Mon 09/08/2010 23:25:11
Quote from: dkh on Mon 09/08/2010 13:08:47
To those that downloaded the plug-in and tried running the test game, what were the exact error message you got? When I extract the demo game to some other folder, what I get is only errors about missing textures (which I know why that happens) and then the game runs fine with the default texture.

After you uploaded the latest version (without the leftover DLL dependencies) the only errors I got were in regards to the missing textures. Moving the folder fixed that. But even without the textures, the game still ran.

No other errors to report. :)
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Gilbert on Tue 10/08/2010 02:03:24
For people who get the d3dx9 error, are you using DirectX 10 or 11?

In that case upgrade DirectX9 and I think those dlls would be installed, as DX9 is a completely different thing from later versions. If a software requires a certain updated version of DX9, updating just DX10 or 11 won't help.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Tue 10/08/2010 02:18:01
Okay, sweet. Thanks for the help there, guys! I'll fix that texture issue asap as I know now exactly what's causing it.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Knox on Tue 10/08/2010 02:45:06
Can this be used where most of the game is a 2d-adventure, but some parts of the game the plugin is used for 3D driving in a 3d world?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Sledgy on Tue 10/08/2010 09:29:44
Hi guys! Thanks for this 3D thing.

But I can't load project and run game. Maybe you can help me with it?


Project. I use last AGS version - 3.1.2 SP1. And this programm says me the game project was made on 3.2.0 or unsupported beta, and I can't load the project.

Game (from Debug folder). It can't find "D3DX9D_41.dll" (not "D3DX9_41.dll", but "D3DX9D_41.dll" with letter D after 9). Crimson Wizard put here link to "D3DX9_41.dll", which doesn't work.

I installed DirectX9 June 2010 ( http://www.ag.ru/files/software/217/43095/agb ), but no new results.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Gilbert on Tue 10/08/2010 09:48:59
Well, using quick and awesome deep searching skills (called Google) I've found that dlls with a 'D' in their names are debug versions, i.e. the versions that provide debug features when programmers test their software.

These dlls are provided only by development suites (such as VS/DirectX SDK or whatever) that a normal user would not (and should not) have installed. So, software released for the public (be it final or general testing versions) should not link to these 'D' version and should link to the "non-D' release version of the dll files instead.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Sledgy on Tue 10/08/2010 10:13:20
I saw in Google about debug version of dll, but I didn't understand what is it and where I can get this dll. Seems, I must to install DirectX SDK?

I mean, you all can launch the game, so you did something for it?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Monsieur OUXX on Tue 10/08/2010 10:22:13
Quote from: Sledgy on Tue 10/08/2010 10:13:20
I saw in Google about debug version of dll, but I didn't understand what is it and where I can get this dll. Seems, I must to install DirectX SDK?
I mean, you all can launch the game, so you did something for it?

IS it only the Debug verison of the game that needs the Debug DLL? Will the regular DLL work with a Compiled version of the game?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Gilbert on Tue 10/08/2010 10:23:04
It's just because dkh accidentally released a build that was linked to debug libraries.
I've just checked the first page of this thread, that in fact this problem was already pointed out and the link to the file should be updated, so you should try downloading the thing again.
Quote from: Sledgy on Tue 10/08/2010 10:13:20
I mean, you all can launch the game, so you did something for it?
In fact, I couldn't, as I didn't even attempt to download and try it. I just don't have any interest in plug-ins.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Sledgy on Tue 10/08/2010 10:46:43
Monsieur OUXX, if you have Compiled version of the game, pls post here or in pm. In my Compiled folder wasn't exe. And then I put there exe from Debug folder I got error about wrong "ags razorblade plugin.dll" (unable to load plugin ags razorblade plugin.dll), but this file is in the Compiled folder too.

Gilbet V7000a, I downloaded from this link some hours ago (today). And as I see at the url address it's the same link.


I combined my errors in the one picture :) 164 kb

http://s53.radikal.ru/i141/1008/6d/25a489f3923a.png
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Tue 10/08/2010 12:17:28
Hey there,

first of all, you'll have to open the demo game with a newer version of AGS, try out AGS 3.2 Final 5 (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=37668.0).

I did remove all references to the debug libraries that I could find but I will re-check the DLL, maybe I missed something!

Running the game from the folder manually doesn't work at all (it's missing the DLL and the models/shaders folders) - just open it in AGS 3.2 Final 5 and hit Run!

Thanks for giving it a try!
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Sslaxx on Tue 10/08/2010 13:19:20
What's the tech you're using? Standard Direct3D?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Joseph DiPerla on Tue 10/08/2010 18:02:13
Wow. Nice Stuff!
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Sledgy on Tue 10/08/2010 18:02:57
dkh, it's wonderful thing! :D


Of course, it needs update - remove clip via walls, put sounds, create shooting, fix jumping (via Spacebar you can fly-y-y-y)) and can't go down any more).

In new updates please add quest elements (probably standart AGS system "Eye-Pickup-Talk-Inventory") and interactiion with some objects. It'd be superb! :)

***

btw, here instruction for running plugin (probably it'd useful for somebody ;)) is:

1. Download the Razorblade plug-in project (http://drop.io/4iins5r/asset/razorblade-3d-1-0-rar/safe_download)
2. Download AGS 3.2.x (http://www.adventuregamestudio.co.uk/AGS-3.2-Final5.exe), if you haven't it yet
3. Install AGS exactly in this folder 'C:AGS 3.1.2 SP1'
4. Unpack plug-in to 'C:AGS 3.1.2 SP1' (then files Documentation.txt and dll must be in this folder, and the plug-in project in the 'Razorblade Testgame' folder)

Do not rename the AGS folder, or the plug-in folder, or any files in the plug-in folder.


5. Run AGSEditor, choose Game.agf from the 'Razorblade Testgame' folder.

It must be opened without errors.


6. F5 - Run
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Tue 10/08/2010 21:59:09
Thanks for the feedback, everybody, and the steps there, Sledgy. I'm working on the folder issue. The problem is the following: models reference the textures they need. In the 3d program the artist can apply a texture to a model (or a part of it). The engine will read that link, load the texture and apply it in-game. So far, so good. However, 3ds Max can apparently only store absolute paths to textures and not relative ones. So it stores the texture as for example "C:\whatever folder\textures\1.jpg" and not relative to the folder where the model is in ie. just "textures\1.jpg".

If you don't follow Sledgy's steps there and just extract the files anywhere, open the project up in AGS and run it, the game will still work flawlessly except with a placeholder texture in place of the real ones though.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: abstauber on Tue 17/08/2010 17:02:17
Wow  :o You've finally finished it!
Congratulations!!!

I hope I'll find some time to play around with it soon. Does it already have some AI like pathfinding integrated?

Anyway, it's great to see this coming to life!
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Anian on Thu 19/08/2010 23:07:04
1. AWESOME!
2. did you say 5000 triangles on the whole level? Have you tried stressing it further, cause that number sounds like a character or two in some engines? This is pure curiosity btw.
3. AWESOME!
4. what about animations and moveable meshes and characters, or is it better to use sprites (2d ones, which I'm asuming is ok cause that's what AGS uses)?
5. THIS IS AWESOME!
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Thu 19/08/2010 23:16:26
Thanks guys!! :D

Quote from: abstauber on Tue 17/08/2010 17:02:17
Does it already have some AI like pathfinding integrated?

The point of the plugin is to just be a graphics engine. It's not supposed to do these kind of things. :D HOWEVER, it comes equipped with all functions for people to write their own pathfinding etc. (ie. you can cast rays in all kinds of directions from, say, a model and check that for collisions, get the distance to that collision and so on). The reason why there is no pathfinding is in order to keep it general (you'd need different pathfinding for a 3d strategy game than for a 3d adventure and even different pathfinding for a 3d shooter in 1st or 3rd person perspective). It's possible that people publish their, for example, camera code or, again, pathfinding code in a module, too.

Quote from: anian
did you say 5000 triangles on the whole level? Have you tried stressing it further, cause that number sounds like a character or two in some engines? This is pure curiosity btw.

I have tried complex models and it works just like any normal direct3d game works on your system, it's up to your graphics card mostly. I have a pretty good set-up here and I've had ~500.000 triangles at 100fps still. :p It also depends on texture more than pure triangle count I've found.

Quote from: anian
what about animations and moveable meshes and characters, or is it better to use sprites (2d ones, which I'm asuming is ok cause that's what AGS uses)?

You can do whatever you want. The most common way would be to use normal 3d models. Unfortunately, version 1.0 doesn't yet support bone-animation nor standard vertex animation. But I will work on that as soon as I can find the time. It's not exactly an easy topic. :p


Sorry for the lack of proper English, tired. :D
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Anian on Thu 19/08/2010 23:39:02
Quote from: dkh on Thu 19/08/2010 23:16:26You can do whatever you want. The most common way would be to use normal 3d models. Unfortunately, version 1.0 doesn't yet support bone-animation nor standard vertex animation. But I will work on that as soon as I can find the time. It's not exactly an easy topic. :p
Lol, well, programming is to me borderline magic, so I'm not rushing you or anything, just curiosity.  ;)
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: PaperJack on Tue 24/08/2010 23:58:20
This is very cool, however I have a few function requests:

function RB_createBox(int id, float x, float y, float z, float x1, float y1, float z1, float x2, float y2, float z2)
Creates a simple parallelepiped at the position x y z, with the size x1 y1 z1 to x2 y2 z2 with ID id.
(also a similar function for creating simple hitmodels)
(if possible make similar functions for other simple geometric shapes)

function RB_changeColor(int id, float r, float g, float b)
Changes the colour of id's texture toare g b. a changes the alpha (trasparency).
Inputting id 255 255 255 255 changes the back to how it was originally coloured.

function RB_createLine(int id, float x1, float y1, float z1, float x2, float y2, float z2, float thickness)
Creates a visible line from point x1 y1 z1 to x2 y2 z2 with thickness thickness. Make it possible to change the colour.

I'm not exactly sure how to call it, but add a function that allows to change if an object is affected by lights or not (if not, it should always be at full brightness).
Also, a function that enables "wireframe" mode.

Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: .M.M. on Sat 28/08/2010 08:55:56
When I try to start the test game from the editor, I repeatedly get errors "Razorblade Plugin: Failed to draw indexed primitive for the mesh 'Pipe'..." and "Razorblade Plugin: Failed to draw indexed primitive for the mesh 'Hand'..." What´s wrong? I have done everything as Sledgy wrote.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Buckethead on Mon 30/08/2010 22:19:37
This really has me speechless. Soooo awesome!! :o

Will try it out tomorrow...
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: TM on Fri 10/09/2010 00:15:16
Quote from: dkh on Tue 10/08/2010 21:59:09
Thanks for the feedback, everybody, and the steps there, Sledgy. I'm working on the folder issue. The problem is the following: models reference the textures they need. In the 3d program the artist can apply a texture to a model (or a part of it). The engine will read that link, load the texture and apply it in-game. So far, so good. However, 3ds Max can apparently only store absolute paths to textures and not relative ones. So it stores the texture as for example "C:\whatever folder\textures\1.jpg" and not relative to the folder where the model is in ie. just "textures\1.jpg".

I think what you need to do is go into Preferences > Files > check Convert Local Files Paths to Relative
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Guyserman82 on Fri 24/09/2010 19:20:58
Damn, now I have to make my RPG in 3D :). This is really cool! I can't wait for a Blender exporter.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Shane 'ProgZmax' Stevens on Sat 16/10/2010 19:45:28
I just wanted to say brilliant work here, dkh.  You've really gone to a lot of effort here and once you've cleaned this up we can finally say Wintermute has nothing on ags.  Very nicely done, man.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: GarageGothic on Sat 16/10/2010 21:10:10
Quote from: ProgZmax on Sat 16/10/2010 19:45:28once you've cleaned this up we can finally say Wintermute has nothing on ags.

Just in time for the Wintermute 2.0 to go into beta, no doubt ;)
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Icey on Fri 22/10/2010 20:18:02
I cant get this to work, I keep getting this error were ags(latte's version) cant use the plug in or something. Basically ags cant start the plug in.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Calin Leafshade on Fri 22/10/2010 21:05:10
Dude, 3D maths is wayyyy out of your league.. just let this one go.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Icey on Fri 22/10/2010 21:44:34
I know but I got to see how it looks. Also if I see this it might give me a reason to push my self to learn how to use maya.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Emperor Justin on Sat 23/10/2010 01:37:47
Quote from: icey games on Fri 22/10/2010 21:44:34
I know but I got to see how it looks. Also if I see this it might give me a reason to push my self to learn how to use maya.

Push yourself to do something small first.  You've yet to actually complete anything so throwing more things on your plate is a pretty bad idea.  But hey, whatever.  Can't wait for the next PMQ game that'll never take off.

On topic: that's pretty freaking sweet.  3D programming is beyond my limited ken of abilities, but I'm looking forward to the things other more tech-savvy people will produce with this! :D
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: subspark on Sat 23/10/2010 08:59:14
All the hard work's finally paying off, good buddy. 8)
This is really great stuff. I wonder if we could use this to drive our custom pathfinding system for sprite based characters we had on paper?
QuoteDude, 3D maths is wayyyy out of your league.. just let this one go.
QuotePush yourself to do something small first.
Quotewhatever.  Can't wait for the next PMQ game that'll never take off.

Whoa :o, dread from another thread - did I miss something?! Go easy on the new kidz fellers! :)

Cheers,
Sparky.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Atelier on Sat 23/10/2010 10:57:45
Seriously Emperor Justin, you're like following icey around. 15 out of your 17 posts have been wasted on him. Just leave him be.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Dualnames on Sat 23/10/2010 14:31:43
Quote from: Calin Leafshade on Fri 22/10/2010 21:05:10
Dude, 3D maths is wayyyy out of your league.. just let this one go.

Hey may be a troll sometimes, but that doesn't mean we can be dicks constantly.
Icey try and copy the exact message here.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Calin Leafshade on Sat 23/10/2010 16:12:36
3D maths is out of *my* league duals and I have a passably decent knowledge of maths... relatively speaking anyway
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Emperor Justin on Sat 23/10/2010 18:28:35
Fair enough.
EDIT- on a side note, I love how the folk across the pond say "maths."  Unlike us grunting, savage yanks.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Buckethead on Sun 24/10/2010 12:27:12
I have very little knownledge in 3d programming but it would be great fun to team up with someone who can. I do know how to model in 3d and how realtime shaders work.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: lan on Fri 18/03/2011 20:06:43
The download does not work...trying to access <url>http://www.drop.io/4iins5r/asset/razorblade-3d-1-0-rar/safe_download</url> results in a time-out...is there any alternative link to razorblade 3d plugin for downloading it?

thanx in advance :)
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Fri 18/03/2011 21:12:35
I re-uploaded it to here: http://www.yourfilelink.com/get.php?fid=634101

Let me know if that worked for you, I didn't have the original archive anymore so I had to put it together again.

EDIT: And the demogame can be found here: http://www.yourfilelink.com/get.php?fid=634109
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: lan on Sun 20/03/2011 07:45:49
Quote from: dkh on Fri 18/03/2011 21:12:35
I re-uploaded it to here: http://www.yourfilelink.com/get.php?fid=634101

Let me know if that worked for you, I didn't have the original archive anymore so I had to put it together again.

EDIT: And the demogame can be found here: http://www.yourfilelink.com/get.php?fid=634109

At first: Thank you for your really fast response!!! The downloads worked fine :)

When I tried to open your demo with AGS (V3.2.1, February 11th) it first complained about the missing dll, which I copied into the directory of the demo game. After opening demo again I got a compilation error:

Camera.asc(258): Error (line 258): Undefined token 'RB_SetCameraPosition'

Maybe I have forgotten to install some required component/plugin/module/... ?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: lan on Mon 21/03/2011 14:45:40
In the meantime I tried to run Razorblade3D following the above instructions of Sledgy

Quote from: Sledgy on Tue 10/08/2010 18:02:57
btw, here instruction for running plugin (probably it'd useful for somebody ;)) is:

1. Download the Razorblade plug-in project (http://drop.io/4iins5r/asset/razorblade-3d-1-0-rar/safe_download)
2. Download AGS 3.2.x (http://www.adventuregamestudio.co.uk/AGS-3.2-Final5.exe), if you haven't it yet
3. Install AGS exactly in this folder 'C:AGS 3.1.2 SP1'
4. Unpack plug-in to 'C:AGS 3.1.2 SP1' (then files Documentation.txt and dll must be in this folder, and the plug-in project in the 'Razorblade Testgame' folder)

Do not rename the AGS folder, or the plug-in folder, or any files in the plug-in folder.


5. Run AGSEditor, choose Game.agf from the 'Razorblade Testgame' folder.

It must be opened without errors.


6. F5 - Run

Unfortunately the compilation errors still occur:

Camera.asc(258): Error (line 258): Undefined token 'RB_SetCameraPosition'

Any help would be appreciated. thank you.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Mon 21/03/2011 15:22:08
Hm, I'm not 100% sure as to what the problem could be unfortunately. All I can think of is that I did some changes to it in the meantime between release back then and this re-release. Don't really have the time to look into it (sorry). If you, in your game script (or that of the demo) somewhere type "RB_" it should pop up the autocomplete window with a couple of Razorblade functions in there, does that work at all?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: lan on Tue 22/03/2011 06:30:25
Quote from: dkh on Mon 21/03/2011 15:22:08
Hm, I'm not 100% sure as to what the problem could be unfortunately. All I can think of is that I did some changes to it in the meantime between release back then and this re-release. Don't really have the time to look into it (sorry). If you, in your game script (or that of the demo) somewhere type "RB_" it should pop up the autocomplete window with a couple of Razorblade functions in there, does that work at all?

Unfortunately auto-complete does not work, all Razorblade functions seem to be unknown/undefined. 

Maybe any of the other Razorblade users can provide a download with a working version of the plugin and the demo game???
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Tue 22/03/2011 10:41:43
Quote from: lan on Tue 22/03/2011 06:30:25
Quote from: dkh on Mon 21/03/2011 15:22:08
Hm, I'm not 100% sure as to what the problem could be unfortunately. All I can think of is that I did some changes to it in the meantime between release back then and this re-release. Don't really have the time to look into it (sorry). If you, in your game script (or that of the demo) somewhere type "RB_" it should pop up the autocomplete window with a couple of Razorblade functions in there, does that work at all?

Unfortunately auto-complete does not work, all Razorblade functions seem to be unknown/undefined. 

Maybe any of the other Razorblade users can provide a download with a working version of the plugin and the demo game???

That would be helpful. If you open the editor and take a look under 'plugins', is the Razorblade plugin listed there? Is it greyed out?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: lan on Wed 23/03/2011 06:37:16
Quote from: dkh on Tue 22/03/2011 10:41:43

That would be helpful. If you open the editor and take a look under 'plugins', is the Razorblade plugin listed there? Is it greyed out?

Neither nor...the "plugin" from the download contained a DLL and a documentation.txt, which i copied into my AGS installation directory.  I think, there's somthing missing...?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Wed 23/03/2011 12:27:04
The DLL is the only thing it should need to install properly and show up in the 'plugins' section of the AGS editor. You said in a previous post you copied the DLL into the directory of the demo game? You need to copy it into the directory of the AGS Editor instead. Also make sure to run the right version of the editor in case you have more than one installed.

Ie. make sure that the 'AGS Razorblade Plugin.dll' file is in 'C:\AGS 3.2.1' (if that is your install location of the editor) and then, in that folder, run the 'AGS Editor.exe'. I sometimes made the mistake of using my desktop shortcut which would point to a different version of the editor. If you can confirm that you have done these steps and it's still not showing up, something is indeed very wrong.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: lan on Wed 23/03/2011 15:48:48
Quote from: dkh on Wed 23/03/2011 12:27:04
The DLL is the only thing it should need to install properly and show up in the 'plugins' section of the AGS editor. You said in a previous post you copied the DLL into the directory of the demo game? You need to copy it into the directory of the AGS Editor instead. Also make sure to run the right version of the editor in case you have more than one installed.

Ie. make sure that the 'AGS Razorblade Plugin.dll' file is in 'C:\AGS 3.2.1' (if that is your install location of the editor) and then, in that folder, run the 'AGS Editor.exe'. I sometimes made the mistake of using my desktop shortcut which would point to a different version of the editor. If you can confirm that you have done these steps and it's still not showing up, something is indeed very wrong.

Yes, that was VERY helpful!!! THANK YOU VERY MUCH!!!

Now I can load the razorblade demo and - after enabling the razorblade plugin - I can compile and execute it.

Unfortunately (after game start) there are more error messages in a dialog box, saying 'Razorblade plugin: Failed to draw indexed primitive for the mesh 'Hand'...' and 'Razorblade plugin: Failed to draw indexed primitive for the mesh 'Pipe'...'

Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Fri 25/03/2011 13:59:40
Hm so that means either I did make changes to the plugin after release (that I can't remember right now) or there is a problem with the plugin running on your system - kinda unlikely though. In any case, to test we would really need someone to upload the original DLL file from back in the day.

Anybody still got that?

The plugin is still in development BTW, I recently made some progress getting actual skeleton/bone based animation implemented into the custom model file format, once that works it's high time for a 1.1 release!
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Buckethead on Fri 25/03/2011 15:51:45
Sure, here's the original dll file:

http://dl.dropbox.com/u/6325410/AGS%20Razorblade%20Plugin.dll

What I think this plugin needs too is some sort of editor. Maybe I'm just spoiled by engines like Unity and UDK but I think it gets really technical without an editor to see where you are placing things.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Fri 25/03/2011 17:13:31
Awesome, thanks a TON, BH! I'll store it. Try that Ian and let me know how it goes (just go through the DLL files of Razerblade that you have in the Editor directory, in the test game directory and maybe even in the compiled folder in that and replace the DLL with that one BH posted!

QuoteWhat I think this plugin needs too is some sort of editor. Maybe I'm just spoiled by engines like Unity and UDK but I think it gets really technical without an editor to see where you are placing things.

Hm yeah, good call. While developing a full-blown editor is pretty much out of the question as far as the workload goes for me, I think we could use a map/level/world format to accompany the model format. These levels could then be made in the same 3D program that is used for making models with the difference that you could place models in it. I should think about that, really too busy for anything in the near future though.

EDIT: I have actually given the testgame a try now with the plugin file that I posted originally a couple posts above and it does work with that, must be a problem on your end. Try to run in windowed mode, update graphics drivers and so on.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: lan on Mon 28/03/2011 12:40:25
At first thank you again for all your support.

Unfortunately, it still does not run on my machine (win xp+sp3+directx9.0c+ latest driver for my 'ati mobility fire gl' graphics card) though I installed all as described by Sledgy (into c:\AGS 3.1.2 SP1).

When demo game is compiled and started from AGS it shows the following error:
  http://img109.imageshack.us/i/zwischenablage01r.gif/

After that error is confirmed it shows the following screen:
http://img856.imageshack.us/i/zwischenablage02.gif/

As already mentioned I updated drivers etc. - what else could I do?

And by the way which tool do you use to create and edit the 3d-models? and: will there be an integration into  AGS in future versions?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Thu 31/03/2011 18:09:45
Sorry for being so slow at responding, I'm extremely busy due to an internship currently.  The errors mean that something goes wrong when trying to render meshes, but apparently only some fail (the pipe and hand mesh) and the rest appears to work fine. What that is that's going wrong I really can't tell. Do you have access to a different machine and could try it out there? I and others have used the plugin and tested it out and it seemed to work for everybody so far except you. :D

At the moment you can only create models/levels and so on in 3DS MAX. Don't know what exactly you mean with integration into AGS in future versions? Integrating a 3d model editor to use seems incredibly hard and time-consuming, wouldn't hold my breath on that one.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Matti on Thu 31/03/2011 20:19:06
Quote from: dkh on Thu 31/03/2011 18:09:45
I and others have used the plugin and tested it out and it seemed to work for everybody so far except you. :D

As far as I remember, I've had the same error messages when I tried out the plugin some time ago. But I didn't care as I'm not really interested in doing something in 3D.

But great work nevertheless!
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: lan on Tue 05/04/2011 15:04:30
Quote from: dkh on Thu 31/03/2011 18:09:45
Sorry for being so slow at responding, I'm extremely busy due to an internship currently.  The errors mean that something goes wrong when trying to render meshes, but apparently only some fail (the pipe and hand mesh) and the rest appears to work fine. What that is that's going wrong I really can't tell. Do you have access to a different machine and could try it out there? I and others have used the plugin and tested it out and it seemed to work for everybody so far except you. :D

I will try to install AGS and the razorblade plugin onto another machine within the next days...thanx for that hint!

Quote from: dkh on Thu 31/03/2011 18:09:45At the moment you can only create models/levels and so on in 3DS MAX. Don't know what exactly you mean with integration into AGS in future versions? Integrating a 3d model editor to use seems incredibly hard and time-consuming, wouldn't hold my breath on that one.

a 3d model editor which is seamlessly into the ags ide (incl. walkable areas, regios, hotspots and so on) that's exactly what I meant. nevertheless razorblade is a cool plugin...if only it would work on my machine ;-)
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Amalgam on Thu 11/08/2011 21:27:51
the links seems to be dead, could you fix them?:)
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Thu 11/08/2011 21:30:43
From page 4: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=41581.msg572647#msg572647

Hope this helps you! :D
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Amalgam on Thu 11/08/2011 22:21:30
they did'nt work either xP
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Thu 11/08/2011 22:57:07
Sorry, here, I uploaded the files again.

The actual plugin
http://dl.dropbox.com/u/42455/Razerblade%203D%20Plugin%201.0.rar

And the demo game
http://dl.dropbox.com/u/42455/Razorblade%203D%20Testgame.rar
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Amalgam on Thu 11/08/2011 23:28:00
thank you so much :D
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Amalgam on Wed 17/08/2011 18:45:28
btw i think you mentioned in your video that you made a 3D studio max importer/exporter ,do you still have those?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: on Fri 24/02/2012 23:23:13
how do you download it?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: on Sat 25/02/2012 01:33:31
Quote from: dkh on Thu 11/08/2011 22:57:07
Sorry, here, I uploaded the files again.

The actual plugin
http://dl.dropbox.com/u/42455/Razerblade%203D%20Plugin%201.0.rar

And the demo game
http://dl.dropbox.com/u/42455/Razorblade%203D%20Testgame.rar how do i import it into ags
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Icey on Sat 25/02/2012 01:42:18
Click the links and they download automatically.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: on Sat 25/02/2012 02:28:02
thank-you but how do i import plugins into ags
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Icey on Sat 25/02/2012 02:32:11
No prob, Take the plugin and drop it in the Main AGS folder. Usually located in the Program Files folder.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: on Sat 25/02/2012 04:11:29
how do up set up this plugin?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Icey on Sat 25/02/2012 04:19:15
Ok that part I can't help with. I tried this plug-in a while ago and failed. I think you would be better of ask here. Quick Post (http://www.adventuregamestudio.co.uk/yabb/index.php?action=post;board=6.0)
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: on Sat 25/02/2012 23:19:26
ok i'v downloaded a plugin how do i set it up
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: straydogstrut on Sat 25/02/2012 23:33:07
I never did get around to trying this first time around so here's what i've managed to suss out from this thread and the documentation that comes with the plugin.

I cannot take credit for this as I found all the answers in the original thread/documentation/code/AGS manual, but hopefully a summary is useful to bring it all together. I've made assumptions so please feel free to correct me if i'm wrong as this is my first time using a plugin ;)

** Pre-requisites for using the plugin **


** Installing the plugin **


** Running the demo Game **


Run the game but be aware that if AGS is installed anywhere other than 'C:\ AGS 3.2.1 SP1' (for example, mine is at C:\Program Files\AGS 3.1.2) it will complain about missing textures. This, it seems, is due to the 3DS Max models supplied with the demo game referencing absolute paths. You can dismiss these errors and the game will still run with a default texture. I no longer have 3DS Max on this machine to test the suggestion of changing the setting in the preferences unfortunately.

The demo game features an environment to move around in. WASD keys to move and arrow keys to move the light source around (IJKL can also be used but are commented out in the code). Left mouse click will cast a ray towards the location of the click and report on what was hit (like a gunshot in any FPS). The base model will return "hit nothing" while the lightbulb will tell you the name of the model hit. Note there is no collision detection in the plugin (this is intentional, it's a graphics engine primarily) so you can move through objects.

** Using the plugin in your own games **


Going by the demo game, the 3D scene is created in the GlobalScript file - the main bits to look at are:


The documentation that comes with the plugin is excellent and lists many of the commands available. This includes a description of what they do so you can work it out just by looking up the function call in that file.

** Publishing the game **

It has been mentioned that the models and shaders folders should be added to the Compiled folder when publishing the game. I have not tested this.

Hope that helps. Thanks again to dkh for the plugin, it's awesome. Here is another link to the mouth-watering video (http://www.youtube.com/watch?gl=GB&v=2oH8u3pz5oE)  :)
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Sat 25/02/2012 23:44:57
Thanks for collecting that information and compiling this excellent document, straydogstrut! I greatly appreciate that!

I should really allow other file formats to be loaded, if I could only find the time... :(
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: straydogstrut on Sun 26/02/2012 00:11:03
No problem! :) Just out of interest, did you ever release the exporter for 3DS Max and can this be found online somewhere?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: on Sun 26/02/2012 21:20:14
is the health bar provided or do you have to make it yourself?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: straydogstrut on Sun 26/02/2012 23:52:21
You'd have to roll your own. Please realise that dkh has provided a super-awesome 3D graphics engine with a tech demo showing off models, lights and shaders, not a full blown FPS engine.

As described earlier in this thread, the plugin replaces rooms and characters, but all the other AGS functionality exists: you can easily put together a health bar using a GUI (as you would expect).

I knocked up something pretty quick just by reading the manual and a couple of searches in the forums. It may not be the best way - I haven't really done anything with AGS before - but I:


To keep this thread clean, if you have questions unrelated to the plugin itself, i'd recommend you search the forums and start a new topic if necessary. Good luck!
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: on Mon 27/02/2012 02:41:03
Quote from: straydogstrut on Sun 26/02/2012 23:52:21
You'd have to roll your own. Please realise that dkh has provided a super-awesome 3D graphics engine with a tech demo showing off models, lights and shaders, not a full blown FPS engine.

As described earlier in this thread, the plugin replaces rooms and characters, but all the other AGS functionality exists: you can easily put together a health bar using a GUI (as you would expect).

I knocked up something pretty quick just by reading the manual and a couple of searches in the forums. It may not be the best way - I haven't really done anything with AGS before - but I:


  • Made graphics to represent the different levels of health: full, 75%, 50%, and 25%
  • Made a GUI for the health bar and assigned my full health image as its' backgroundGraphic
  • Created a Global Variable to store the player's health (playerHeath)
  • In the game_start() function I set the initial value of the player's health (100)
  • In the repeatedly_execute() function I had an IF statement set the backgroundGraphic of my health bar GUI based on the current value of playerHealth. I ended that statement with an ELSE setting the graphic to zero, making the graphic invisible (no health)
  • So long as playerHealth was above zero, I subtracted from it whenever a condition was met, otherwise I set playerHealth to zero. I chose to subtract health whenever I left-clicked on anything but the lightbulb, but obviously you could use any condition

To keep this thread clean, if you have questions unrelated to the plugin itself, i'd recommend you search the forums and start a new topic if necessary. Good luck!

thanks
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Monsieur OUXX on Sun 13/05/2012 23:51:54
Hi dhk.

I want to mention that the last plugin update is the one that was compiled in Debug, hence causing the errors described by Kweepa on page one of this thread (d3d9d dlls missing).

It would be really appreciated if you could recompile in Release, and if you could re-upload.
Also, please update the very first post of the thread, so that the download link is easily found :-)
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Dualnames on Mon 14/05/2012 10:08:39
I've temporarily edited the first post to include a working download link. Ideally, if dkh is up for it, straydogstrut's post should be included either in its entirety or referenced to with a link.
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Mon 14/05/2012 12:09:21
Thanks and done, guys!
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Monsieur OUXX on Mon 14/05/2012 12:54:27
Quote from: Dualnames on Mon 14/05/2012 10:08:39
I've temporarily edited the first post to include a working download link.


Dualnames, you didn't read my post properly, and dkh, you didn't double-check ;-)

It's still the Debug version, and we need the Release version.

If I may be so bold, I'd recommend removing ALL posts referring to the debug version from this conversation thread. It's a real mess.
Also dkh you should put a big download link in the first post. the "video" link is hiding the small download link below.


EDIT: My mistake, it's now the release DLL, but I'm still missing it.

Tip: If you get the "missing d3dx9_41.dll is missing" error, you can either download the whole DirectX 9.0c package (http://www.microsoft.com/en-us/download/details.aspx?id=8109) from Microsofot's website, or, if it's already installed (but old and missingrecent  files), then you can use this useful site: http://www.toymaker.info/Games/html/d3dx_dlls.html

(http://img137.imageshack.us/img137/6112/93239768.png)


Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Monsieur OUXX on Tue 15/05/2012 09:26:13
So if I'm not mistaken the exporter has yet to be released.
Can you at least upload the exporter from Max, even if you think it's not perfect?

Is it a script that HAS to be run from Max, or is it standalone? I hope it's standalone,as I don't have Max but plan to export my mesh as a Max file from Blender.

Also, do you think it's possible to render a simple textured rectangle with the primitives you provided, or would it necessarily have to be a loaded mesh?
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: DoorKnobHandle on Tue 22/05/2012 19:00:54
The exporter was never released iirc. It's a 3DS MAX plug-in (these are not standalone, you need 3DS MAX). I was having problems implementing skeletal (bone-based) animation, that's what was holding that up. Unfortunately I won't have time to sort this out in the near future at all, I'm just too busy... Wasn't a very good idea to go with a custom model file format anyways, should've stuck with .x files (which are easy to load and support skeletal animation anyways). Something for Razorblade 2...

Sorry!

Razorblade 3D doesn't support primitive rendering, it only works with models. You could just make a quad/plane mesh and bring it into the game, of course, but the exporter isn't released yet...
Title: Re: PLUGIN: Razorblade 3D - full-blown, modern 3D within AGS!!
Post by: Monsieur OUXX on Fri 25/05/2012 11:57:51
Quote from: dkh on Tue 22/05/2012 19:00:54
Razorblade 3D doesn't support primitive rendering, it only works with models, but the exporter isn't released...

Don't you have an unfinished version of the exporter?
As it is atm, this plugin is of absolutely no use, since it uses models but the game designer cannot import any models :(