KevinBLT Posted June 17, 2016 Share Posted June 17, 2016 Hello everybody, I have two requests for features. I would like to know if these were possible? 1. Hidden lines view Would there be any possibility to create something like this: So like defining a view point and create a flat image with only the edges visible (The faces, not the triangles) ? Best for me would be a list of polygons and their points but a static image would be great either. 2. Create shadow map (and more?) with a raytracer In our application we have a static scene most of the time. It may change every 10 seconds (if the user wants so) and the recalculation time is not a problem (could be 3+ seconds for example). So for this case the best possible quality is more important than the fastest calculation. I don't think I would be the only one who needs some like these features. Thanks and have a great day! Kevin Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 17, 2016 Share Posted June 17, 2016 Hey 1. EdgesRenderer can be used I guess with a top/down camera (or even a non perspective one): http://www.babylonjs-playground.com/#TYAHX#55 2. ShadowMaps can be computed just once and then reused. So you can create a high quality texture. Quote Link to comment Share on other sites More sharing options...
KevinBLT Posted June 23, 2016 Author Share Posted June 23, 2016 1: EdgesRender would work with the ortigraphic camera I think but in my case it shows the triangulation? :-( I think this view would be more a global camera setting than one for each object. Some 3D-Viewers have this for example with an object called: "Hidden lines". And how is it done in blender for example? The have the views from each side just with the lines. I don't know if I describe it well enough. 2: I already use the shadow map with refresh rate 1 but I thought it would be possible to get even better results in terms of lightning (global illumination?) Thank you.and have nice day! Kevin Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted June 23, 2016 Share Posted June 23, 2016 15 minutes ago, KevinBLT said: The have the views from each side just with the lines. I don't know if I describe it well enough Maybe you talk about outline ? (orange line in this example http://i.imgur.com/pUcTGg2.png) As for the hidden edges, you must write your own shader, which will take edges depending of an angle limit. For the point 2, if you want complex lighting, you must use a dedicate render engine (vray, cycles, arnold, renderman, etc etc) and bake it into lightmaps. Quote Link to comment Share on other sites More sharing options...
KevinBLT Posted June 23, 2016 Author Share Posted June 23, 2016 Outline would not be enough. It's like you said I need every edge depending on its angle. I already thought this must be done via shader but I am not able to do so. I mean this: I cannot use a dedicate render endgine because the entire scene is created dynamically from cubes. I think if no 3D professional adds this into Babylon I have no chance :-/ Thanks for you answer Kevin Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 23, 2016 Share Posted June 23, 2016 Hello to solve your issue with edgesRenderer, you have to think about merging your mesh to ensure that faces are well defined Quote Link to comment Share on other sites More sharing options...
KevinBLT Posted June 24, 2016 Author Share Posted June 24, 2016 Normally the meshes wouldn't be white and have different textures. I think I cannot merge them in this case? Also, why is that, even the bars are triangulated? They are simple boxes? Am I doing something wrong? keyDebug.registerKey("T","Test für verdeckte Kanten Ansicht",function() { var m = g3DScene.meshes; for (var i = 0, mat; i < m.length; i++) { if (m[i].material && m[i].material.diffuseColor) { mat = m[i].material; mat.diffuseColor.r = 1; mat.diffuseColor.g = 1; mat.diffuseColor.b = 1; mat.diffuseTexture = null; console.log(mat); } m[i].enableEdgesRendering(); m[i].edgesWidth = 100.0; } //g3DCamera.mode = BABYLON.Camera.ORTHOGRAPHIC_CAMERA; g3DCamera.orthoTop = 50; g3DCamera.orthoBottom = -50; g3DCamera.orthoLeft = -50; g3DCamera.orthoRight = 50; RenderWithShadow(); }); I use a lot of instances if this is important. Also is the "ArcRotateCamera" capable of being BABYLON.Camera.ORTHOGRAPHIC_CAMERA ? I'm not able to create a sideview with it :-/ Thanks for help :-) Kevin Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 24, 2016 Share Posted June 24, 2016 Here is how to define an ortho camera: http://www.babylonjs-playground.com/#Q6COD In your example you need to merge your meshes or else the edges renderer will work on individual meshes But I agree on one point: boxes should look like this:http://www.babylonjs-playground.com/#19O9TU Quote Link to comment Share on other sites More sharing options...
Nabroski Posted June 25, 2016 Share Posted June 25, 2016 Hello Unwarp your model save the Uv (photoshop it, - red lines etc.) and use this Texture as a facked wireframe layout. Or use a wireframe modifier. The Possibilities are endless https://www.google.de/?ion=1&espv=2#q=wireframe%20render Viel Erfolg. Quote Link to comment Share on other sites More sharing options...
KevinBLT Posted June 27, 2016 Author Share Posted June 27, 2016 I think this would be a more difficult solution than my current one I don't know. I just wonder how Blender is doing this? Unfortunately I don't have the skills to write a super fancy shader doing everything awesomely smart. Maybe some 3D god will put in a suitable solution For the Edges Renderer problem I have found the problem. Look at this thread in "Bugs" section Thanks and best regards Kevin Quote Link to comment Share on other sites More sharing options...
Nabroski Posted June 27, 2016 Share Posted June 27, 2016 (edited) I don't know i see benefits in this solution, you can have many materials as you need, just load a texture to your mesh, its still rendered as a triangulate mesh. you can apply a texture to a simpel cube and make its looks like a car(normalmap), or football station. switching textures with mouseclicks (car, football station,car,football station) easy and fast Art is all about dealing with illusions. Go for ithttp://babylonjs-playground.com/#TZS2D#2 Best Alexander Edited June 27, 2016 by Nabroski playground: emmi color change Quote Link to comment Share on other sites More sharing options...
KevinBLT Posted June 28, 2016 Author Share Posted June 28, 2016 Because I would have to create these textures for a lot of objects. Also, many objects are created using CSG. I don't know how I would have to create the appropriate textures before the calculation? This is an example of how it can look in the end:And this is not a static object or something. You can build this 2cm bigger for example. The balcony wood, for example, is made from CSG. But I have found out in another thread that edges renderer works for me with an additional parameter. So I'm getting closer. I may have to union all meshes for this view. But I am not time dependent in this moment I am creating the print view (side and front). Nevertheless, thanks for your advices! Quote 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.