[SOLVED] 3D svg lazarus / 39-Graphics ---------------------------------------------------------------------- Pe3s · 2023-11-25 10:21 Hello forum members, is there any component that allows you to turn SVG graphics into 3D and export NMP to PNG? Regards ---------------------------------------------------------------------- MarkMLl · 2023-11-25 15:43 Since nobody else has commented: what is NMP? It certainly doesn't appear in any of the standard lists of graphics formats. Also I was under the impression that an SVG was implicitly 2D: what do you expect a conversion to do? MarkMLl ---------------------------------------------------------------------- dsiders · 2023-11-25 16:34 Quote from: MarkMLl on November 25, 2023, 04:43:34 pmSince nobody else has commented: what is NMP? It certainly doesn't appear in any of the standard lists of graphics formats. Also I was under the impression that an SVG was implicitly 2D: what do you expect a conversion to do? MarkMLl According to Google it's a proprietary NeoPaint file format. Raster. ---------------------------------------------------------------------- Pe3s · 2023-11-25 19:48 NMP? , I was wrong, it was about SVG. I wanted to know if there is any component that imports SVG graphics and turns them into 3D ---------------------------------------------------------------------- MarkMLl · 2023-11-25 20:14 What do you expect the conversion to do? MarkMLl ---------------------------------------------------------------------- Pe3s · 2023-11-25 20:16 after conversion it expects 3D depth ---------------------------------------------------------------------- MarkMLl · 2023-11-25 20:47 I was under the impression that an SVG was a 2-D standard. Are you trying to convert it to some different format, and if so what? Don't get me wrong: I can see it being interesting particularly if you project the SVG onto an arbitrary plane in the 3-D space. MarkMLl ---------------------------------------------------------------------- lainz · 2023-11-25 21:14 Import the SVG into blender 3d, and add depth there, blender 3d supports svg files. You can programm with blender with python scripting, so you can manage the input and output. The functionality you say is very complex, no other than blender can do it for free... ---------------------------------------------------------------------- Pe3s · 2023-11-26 07:40 Thank you for your answers, topic can be closed ---------------------------------------------------------------------- MarkMLl · 2023-11-26 08:36 The crucial thing is that pairing 3-D and SVG together doesn't make sense: the output format has to be something different and- ideally- should be another vector format i.e. something like X3D or its predecessor VRML. https://www.web3d.org/x3d-export-and-import might be useful and I would highlight option C: Castle Game Engine as probably worth researching. MarkMLl ---------------------------------------------------------------------- lainz · 2023-11-26 09:58 Quote from: MarkMLl on November 26, 2023, 09:36:23 amThe crucial thing is that pairing 3-D and SVG together doesn't make sense: the output format has to be something different and- ideally- should be another vector format i.e. something like X3D or its predecessor VRML. https://www.web3d.org/x3d-export-and-import might be useful and I would highlight option C: Castle Game Engine as probably worth researching. MarkMLl Blender 3D supports it, and it has it's own file format... Attached a blender 3D that has incrusted an SVG File and a Solidify modifier, and also attached a render of it. ---------------------------------------------------------------------- Pe3s · 2023-11-26 10:14 @lainz, ---------------------------------------------------------------------- zamtmn · 2023-11-26 10:31 This is a great forum. We ask an incomprehensible question, we get an incomprehensible answer. Everything is solved, we put a smiley face ---------------------------------------------------------------------- lainz · 2023-11-26 10:40 Quote from: zamtmn on November 26, 2023, 11:31:21 amThis is a great forum. We ask an incomprehensible question, we get an incomprehensible answer. Everything is solved, we put a smiley face Quote from: Pe3s on November 26, 2023, 11:14:32 am@lainz,  Notice that you also can render with transparency. Just Google it is like pressing a checkbox and that's all... Just I don't remember. ---------------------------------------------------------------------- MarkMLl · 2023-11-26 11:21 Any number of CAD etc. packages can do that, but it doesn't necessarily make them the best tool for doing the conversion. What matters is what OP is actually trying to do- and as somebody has helpfully remarked, the question is basically so vague as to be incomprehensible- and then selecting a suitable output format. Something like Blender or a CAD package can undoubtedly do the job, but that doesn't necessarily make it the best choice. The problem is that a BLEND or STEP file will have a vast amount of cruft to support things that Blender etc. can also do, and this might actually be a disadvantage in the context of what OP is trying to do- whatever it is :-) For example, if what he wants to do is read an SVG and deform it based on a simple property like face colour, he might actually be best off converting it to an STL which defines meshes based on the deformed vertices and edges. So the crucial thing here is the choice of output format. And depending on what's to be done next, making sure that the output files don't contain a whole lot of unnecessary cruft put there by the generating software "because it might be useful at some point in the future". Considering for example https://stackoverflow.com/questions/20840970/is-there-a-3d-format- which-is-a-3d-extension-to-svg and the more recent https://www.reddit. com/r/Frontend/comments/xbasxh/any_svg_equivalent_for_3d_objects/ I'd suggest that the 3D successor to SVG is X3D or possibly OBJ. But that depends entirely on what OP is trying to do: if he wants to smooth and "skin" the result then Blender is the obvious choice, while if he wants to manipulate in in e.g. an architectural context then he almost certainly needs something more CAD-like. MarkMLl ---------------------------------------------------------------------- lainz · 2023-11-26 11:37 Quote from: MarkMLl on November 26, 2023, 12:21:59 pmAny number of CAD etc. packages can do that, but it doesn't necessarily make them the best tool for doing the conversion. What matters is what OP is actually trying to do- and as somebody has helpfully remarked, the question is basically so vague as to be incomprehensible- and then selecting a suitable output format. Something like Blender or a CAD package can undoubtedly do the job, but that doesn't necessarily make it the best choice. The problem is that a BLEND or STEP file will have a vast amount of cruft to support things that Blender etc. can also do, and this might actually be a disadvantage in the context of what OP is trying to do- whatever it is :-) For example, if what he wants to do is read an SVG and deform it based on a simple property like face colour, he might actually be best off converting it to an STL which defines meshes based on the deformed vertices and edges. So the crucial thing here is the choice of output format. And depending on what's to be done next, making sure that the output files don't contain a whole lot of unnecessary cruft put there by the generating software "because it might be useful at some point in the future". Considering for example https://stackoverflow.com/questions/20840970/is-there-a-3d-format- which-is-a-3d-extension-to-svg and the more recent https://www.reddit. com/r/Frontend/comments/xbasxh/any_svg_equivalent_for_3d_objects/ I'd suggest that the 3D successor to SVG is X3D or possibly OBJ. But that depends entirely on what OP is trying to do: if he wants to smooth and "skin" the result then Blender is the obvious choice, while if he wants to manipulate in in e.g. an architectural context then he almost certainly needs something more CAD-like. MarkMLl Is not that vague in my opinion... Quote from: Pe3s on November 25, 2023, 11:21:32 amHello forum members, is there any component that allows you to turn SVG graphics into 3D and export NMP to PNG? Regards The answer is NO. There is no component in Lazarus that can do that. Except for Castle Game Engine as MarkMLI pointed. A third party plugin... and also I'm not sure if it can, because turning 2D into 3D with Castle Game Engine, well if possible showme the code  Then save as PNG. Easy, no need of overcomplicating things. If the author needs CAD, or 3D printing, better use another tool rather than Blender, there are specific tools. Quote from: Pe3s on November 25, 2023, 09:16:53 pmafter conversion it expects 3D depth But not mentioned, only mentioned converting from 2D SVG adding depth, like I showed.. ---------------------------------------------------------------------- MarkMLl · 2023-11-26 11:59 I'd remind you that OP's been edited at least once. Anyway, I've said my tuppenceworth. MarkMLl ---------------------------------------------------------------------- lainz · 2023-11-26 12:24 Quote from: MarkMLl on November 26, 2023, 12:59:00 pmI'd remind you that OP's been edited at least once. Anyway, I've said my tuppenceworth. MarkMLl Your points are completely valid. Just saying my response is valid too. ---------------------------------------------------------------------- Pe3s · 2023-11-26 18:06 @lainz I will give me a sufficient answer. QuoteThe functionality you say is very complex, no other than blender can do it for free...