jval Posted November 18, 2017 DD_MODEL is a tool for creating procedular models for DelphiDoom. Current version is 1.0.2. Features: Script Editor with syntax highlighing. Fast compilation. Build in 3d preview with frame animation. Export to binary (compiled format) files (*.dmx) Decompile binary models (future version hopefully will support decompile of MD2/MD3 etc model formats) Decompile the model's script to C or Pascal source. Downloads: https://sourceforge.net/projects/delphidoom-procedural-modeler/files/DD_MODEL_1.0.2/ (Windows executable and full source code). Procedural Model is a new DelphiDoom's model format available for the OpenGL renderer (version 2.0.3.706 or higher). The mesh is generated with script using opengl commands. The application uses PascalScript as it's scripting engine. Every model can have a number of Frames. A frame can call other frames (i.e. you can use a frame as a submodel). Special care has been taken to avoid dead ends when recursively calling frames. DelphiDoom can use the *.dmx files or compile the source code and render the model. An example can be downloaded here. Example code (generates a spinning plane): model model1; procedure MakePlane; begin glbegin(GL_QUADS); glTexCoord2f(0,1); glVertex3f(-0.5,-0.5, 0); glTexCoord2f(1,1); glVertex3f( 0.5,-0.5, 0); glTexCoord2f(1,0); glVertex3f( 0.5, 0.5, 0); glTexCoord2f(0,0); glVertex3f(-0.5, 0.5, 0); glEnd; end; var i: integer; begin SetFrame(0); // Set current frame to #0 MakePlane; // Draw something // Spin it for i := 1 to 359 do begin SetFrame(i); // Set current frame to "i" glMatrixMode(GL_MODELVIEW); glPushMatrix; glRotatef(i , 0.0, 1.0, 0.0); CallFrame(0); // Call frame #0 glPopMatrix; end; end. Screenshots: Example: 0 Quote Share this post Link to post
Gez Posted November 18, 2017 Looking at the glBegin()/glEnd() code in the example, doesn't this feature lock you in using the deprecated "immediate mode" for OpenGL? That would make it harder to eventually move to Vulkan. 1 Quote Share this post Link to post
jval Posted November 19, 2017 7 hours ago, Gez said: Looking at the glBegin()/glEnd() code in the example, doesn't this feature lock you in using the deprecated "immediate mode" for OpenGL? That would make it harder to eventually move to Vulkan. Thanks for your question, it gives me the opportunity to explain the method I've used. The glBegin()/glEnd(), etc commands of the script are translated into an internal intermidiate structure that holds the appropriate mesh information. This is done when we execute the script. The script actual is generating the structure, it does not render the model. (i.e. script is not running while rendering).The actual rendering is performed by parsing the structure and performing the appropriate drawing functions. Yes, the rendering is performed with the old deprecated functions in the editor, but there are no restrictions on what rendering techniques we will eventually use. We can render the structure using VBOs, D3D or even software rendering. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.