Shaping Posted February 13, 2012 Share Posted February 13, 2012 I need to render very clean-looking maximally anti-aliased cubes and spheres. Can anyone make specific suggestions? I rendered the basic cube, but see a lot of jaggies. Must I write a custom shader to render the cube smoothly? Has anyone already done this? Also, I rendered a sphere with CreateSphere (32) and with CreateSphere (100), and saw no difference in boundary smoothness. This is confusing because I recently tested DX Studio, in which I imported a sphere of 200 slices (about 20,000 polygons), and it rendered extremely smoothly in that WebGL-based engine. I feel limited, however, by the Javascript; so I decided to work with Leadwerks, instead. I need very smooth spheres too. So I have two questions really: How do I create extremely smooth cubes and spheres? Will Leadwerks ever target the Web directly as a platform, via WebGL? Regarding WebGL, the interactivity is great and the deployment model is very simple. Quote Link to comment Share on other sites More sharing options...
Canardia Posted February 13, 2012 Share Posted February 13, 2012 It depends how the triangles are arranged in the sphere. In Leadwerks there is a pretty smooth setup of triangles with 32 sectors. With 16 sectors you can see slight edges still. Leadwerks has the commadn SetAntialias(1); to enable antialiasing, but there has been also improved AA shaders in the forum, which you can just copypaste into the existing antialias shader. Fog, DoF and Bloom also makes things look smoother. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Josh Posted February 13, 2012 Share Posted February 13, 2012 Leadwerks Engine uses a deferred renderer and does not have MSAA. You can use the framework commands and enable antialiasing, but this is a post processing filter and does not have the same quality as MSAA. Leadwerks3D supports MSAA, even with the deferred renderer, as the feature we requested three years ago is finally supported. I have no plans to pursue WebGL, but there are other online platforms we are looking into. We'll probably end up supporting a variety of online platforms, because none are completely perfect, and each has tradeoffs. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Shaping Posted February 14, 2012 Author Share Posted February 14, 2012 Leadwerks Engine uses a deferred renderer and does not have MSAA. You can use the framework commands and enable antialiasing, but this is a post processing filter and does not have the same quality as MSAA. Leadwerks3D supports MSAA, even with the deferred renderer, as the feature we requested three years ago is finally supported. I have no plans to pursue WebGL, but there are other online platforms we are looking into. We'll probably end up supporting a variety of online platforms, because none are completely perfect, and each has tradeoffs. Is the MSAA technique being used in WebGL? If so, it looks extremely good, and I have no complaints. I'm concerned now because I see jagged sphere outlines when rendering a sphere with 64 slices in LE2.5 EK. That one sphere took more than 5 seconds to compose while the graphic window was opening. My simulation contains many (dozens) spheres. I'm happy to see that you have the good stuff slated for Leadwerks3D, but what should I do in the meantime? Can I test a beta very soon, like...now? I need very basic rendering facilities: two geometric primitives, flat text, a camera I can move (pan, zoom) with a perspective or orthographic projection, and one or two lights--nothing very fancy. I don't need the editor. I need only the C-API. Can you explain the problem with WebGL? Does it not scale well? Is deferred rendering not possible? It seems to be the forthcoming standard for Web-based graphics. Is there a better alternative? Quote Link to comment Share on other sites More sharing options...
Shaping Posted February 14, 2012 Author Share Posted February 14, 2012 It depends how the triangles are arranged in the sphere. In Leadwerks there is a pretty smooth setup of triangles with 32 sectors. With 16 sectors you can see slight edges still. Leadwerks has the commadn SetAntialias(1); to enable antialiasing, but there has been also improved AA shaders in the forum, which you can just copypaste into the existing antialias shader. Fog, DoF and Bloom also makes things look smoother. Does anyone happen to have shaders that draw a fully anti-aliased sphere and cube? Quote Link to comment Share on other sites More sharing options...
Shaping Posted February 14, 2012 Author Share Posted February 14, 2012 It depends how the triangles are arranged in the sphere. In Leadwerks there is a pretty smooth setup of triangles with 32 sectors. With 16 sectors you can see slight edges still. Leadwerks has the commadn SetAntialias(1); to enable antialiasing, but there has been also improved AA shaders in the forum, which you can just copypaste into the existing antialias shader. Fog, DoF and Bloom also makes things look smoother. How do I learn more about the "existing antialias shader"? I tried the above SetAntialias(1), and the program hung. Quote Link to comment Share on other sites More sharing options...
Canardia Posted February 14, 2012 Share Posted February 14, 2012 It works when you create your project with Project Wizard, which initializes all the needed stuff for Framework. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Shaping Posted February 14, 2012 Author Share Posted February 14, 2012 It works when you create your project with Project Wizard, which initializes all the needed stuff for Framework. No, it's not working for me. I am using ProjectBuilder now, always, and it is very convenient (except when selecting the project directory). When I use SetAntialias(1), the program hangs. Also, I tried switching the camera projection to orthographic and that produces a black scene. I used CameraProjMode (camera, 0) to do this. A perspective projection seems to be the default: CameraProjMode (camera, 1). Quote Link to comment Share on other sites More sharing options...
Canardia Posted February 14, 2012 Share Posted February 14, 2012 It should work for everyone. I think the newest version has also VS2010 templates, but you can open a VS2008 project with VS2010 too, and it will convert it. However, it's better to use Code::Blocks, because it creates faster code and compiles also much faster, and loads up much faster. The new VS2012 is quite horrible as it takes like 2 minutes to completely even load a project. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Shaping Posted February 14, 2012 Author Share Posted February 14, 2012 It should work for everyone. I think the newest version has also VS2010 templates, but you can open a VS2008 project with VS2010 too, and it will convert it. However, it's better to use Code::Blocks, because it creates faster code and compiles also much faster, and loads up much faster. The new VS2012 is quite horrible as it takes like 2 minutes to completely even load a project. Noted. I may switch to Code::Blocks. I tried the demo in which you switch between ortho (F1) and perspective (F2), but there was no difference in the appearance of the cube, except that it stopped rotating in the ortho case. Does anyone understand the problem here? Quote Link to comment Share on other sites More sharing options...
Shaping Posted February 15, 2012 Author Share Posted February 15, 2012 Noted. I may switch to Code::Blocks. I tried the demo in which you switch between ortho (F1) and perspective (F2), but there was no difference in the appearance of the cube, except that it stopped rotating in the ortho case. Does anyone understand the problem here? ... Is there a working demo of orthographic and perspective camera projections? Quote Link to comment Share on other sites More sharing options...
Shaping Posted February 15, 2012 Author Share Posted February 15, 2012 No, it's not working for me. I am using ProjectBuilder now, always, and it is very convenient (except when selecting the project directory). When I use SetAntialias(1), the program hangs. Also, I tried switching the camera projection to orthographic and that produces a black scene. I used CameraProjMode (camera, 0) to do this. A perspective projection seems to be the default: CameraProjMode (camera, 1). ... This bit of code uses 2 for orthographic, not 0 as above. CameraProjMode C: void CameraProjMode( TEntity camera, int projMode ) C++: void Body::SetProjMode( const ProjectionMode& mode ) Where mode is one of NOPROJECTION, PERSPECTIVE or ORTHOGRAPHIC BlitzMax: CameraProjMode( camera:TCamera, projMode:Int ) Pascal: procedure CameraProjMode ( camera:THandle; projmode:Integer ); Sets the projection mode for the specified camera. 0 - Nothing 1 - Perspective projection (default) 2 - Orthographic projection Attention: Orthographic project may not work correctly with lighting, various shaders and unproject commands. Quote Link to comment Share on other sites More sharing options...
Shaping Posted February 19, 2012 Author Share Posted February 19, 2012 ... This bit of code uses 2 for orthographic, not 0 as above. CameraProjMode C: void CameraProjMode( TEntity camera, int projMode ) C++: void Body::SetProjMode( const ProjectionMode& mode ) Where mode is one of NOPROJECTION, PERSPECTIVE or ORTHOGRAPHIC BlitzMax: CameraProjMode( camera:TCamera, projMode:Int ) Pascal: procedure CameraProjMode ( camera:THandle; projmode:Integer ); Sets the projection mode for the specified camera. 0 - Nothing 1 - Perspective projection (default) 2 - Orthographic projection Attention: Orthographic project may not work correctly with lighting, various shaders and unproject commands. Can anyone tell me why I can't make an orthographic projection work in LE2.5 EK? Even the tutorial provided to demonstrate the difference between perspective and ortho projections seems to be broken. Can anyone explain the problem, tell me what I'm missing, or provide a fix? I can't do any work on my simulation without an ortho projection. Quote Link to comment Share on other sites More sharing options...
Shaping Posted February 20, 2012 Author Share Posted February 20, 2012 Is anyone still working with the LE 2.5 Evaluation Kit? I haven't seen any responses in several days. Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted February 20, 2012 Share Posted February 20, 2012 well more specifically, I don't think many are working with orthographic projection! Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Canardia Posted February 20, 2012 Share Posted February 20, 2012 You get a dynamically adjustable orthogonal projection by increasing the camera zoom, and then scaling the models down and/or moving the camera further away. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Shaping Posted February 21, 2012 Author Share Posted February 21, 2012 You get a dynamically adjustable orthogonal projection by increasing the camera zoom, and then scaling the models down and/or moving the camera further away. I increased and decreased zoom. I don't know what the default FOV is, but suppose that it's large enough to show some visible difference between perspective and ortho renderings of the cube. I don't, though, see any evidence of an ortho projection. Are you saying this actually works in the demo mentioned? Did you try the demo? Switching between ortho and perspective shows no change at all, except for the stopping of the rotating cube in the ortho case. If you place a sphere, you'll see a prolate or oblate shape, not a spherical one. Quote Link to comment Share on other sites More sharing options...
Shaping Posted February 21, 2012 Author Share Posted February 21, 2012 well more specifically, I don't think many are working with orthographic projection! So it appears... Has anyone ever seen an orthographic projection work correctly in LE 2.5? If so, please tell me how you did it. Quote Link to comment Share on other sites More sharing options...
NillNicks Posted February 25, 2012 Share Posted February 25, 2012 Hey I am new comer on this forum. this is my first comments on this forum. Quote shoe lifts height increasing shoes taller shoes Link to comment Share on other sites More sharing options...
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.
Note: Your post will require moderator approval before it will be visible.