![]() Registered Member ![]()
|
add 3d mode (stl,obj), option adjust light for 3d mode
|
![]() KDE Developer ![]()
|
|
![]() Registered Member ![]()
|
lol. He/she probably means a docker that displays basic 3d objects that artists can use as reference. I'm guessing like something you would find on sketchfab.com |
![]() Registered Member ![]()
|
|
![]() Registered Member ![]()
|
What I think user is asking for, yes, might be a docker to load basic 3D meshes with possibly textures in a basic 3D viewer widget for reference. Something like this could be written in pyQt/pySide or on the c++ end of things. Look into the pyQt/pySide demo, iirc there is a GLwidget demo code somewhere in there. This is sorta maybe the idea, but just strip out all the extra stuff I add in and have a docker loader that loads a single .obj/.stl/etc... and maybe setup a single light somewhere with panning and rotation camera around the mesh, I would think. This is a pic of wxPython GLCanvas widget/small render engine I wrote. ![]() |
![]() Registered Member ![]()
|
Honestly, I'm not sure that creating a '3d reference' docker would be worth the time investment for a variety of reasons.
The main reason being that it would likely be difficult and very time consuming to do it well. Would you be able to pose the mesh? How would that control? Would you be able to open multiple meshes or an entire scene? Would it be unlit or how flexible would the lighting system be? Would it support basic MatCaps or a full, modern, physically-based rendering engine? Of course, I never expect people to have all the answers from square zero, but I'm just trying to highlight the amount of pretty heavy stuff that might need to be considered to undertake a project like this. In the end, I thnk that winds up creating a choice between making something a bit half-baked and limited, or dedicating a serious amount of time and manpower to what would end up being a massive project, in my opinion. There are many other areas of Krita that are more central to the primary goal of creating a great tool for 2d raster drawing, painting, and animation. Any time that is spent going down the rabbit hole of serious 3d graphics rendering is time that could be better spent elsewhere, and (again, in my personal opinion) is probably very peripheral, if not out-of-scope, for Krita. That's not to mention the fact that making it a docker would pose a lot of UI and layout challenges! There are simply better ways of viewing and referencing 3D models, like Blender, which is stable, mature, beautiful, relatively easy to use, free, and open source. It just doesn't feel like it would be a wise use of energy to go this direction. I don't want to be a discouraging naysayer, but I generally feel that this project should be very wary of any path that involves delving deep into 3D graphics, at least for the foreseeable future. Having said that, Krita is an open source project, so anything is possible if people have enough desire and coding chops to make it happen. Ultimately, it's not up to me! |
![]() Registered Member ![]()
|
Personally if i wanted a reference, I usually have blender and my paint program open 50/50 split on my screen or just alt tab between them. The easiest way is to just take a quick screenshot of the mesh and paste it as a layer, or in say just a png/image reference docker would be simple enough.
For a artist actually doing 3D modeling and texturing at the same time, desires something I have asked for before, cross communication between applications in a plugin. Some guy made a Photoshop/Blender plugin that while you was texturing, it would save temp files and update the UV render in blender thru processes being passed back and forth. This isnt what is being suggested/asked tho. For the amount of time that would be spent writing or porting a simple OpenGL viewer in krita, I'd say it wouldn't be wasted time, but it really depends on how many people would really use it... If you know how to 3D model then you probably already know how to manipulate the mesh in the modeling program and take a quick screenshot. I think what may being asked is for example, is that the user isn't a 3D modeler, but has a mesh file that he would like to reference, and simply needs a way to rotate/zoom/pan the mesh in the view, while drawing. Such a person is probably great with a pen and pencil or a brush but lacks skills in 3D and is only asking for a simple model viewer plugin. If you have to have a whole scene to render or load, I say, Bite the bullet, spend the time, and learn a modeling program. And as far as my simple renderer, it does the same thing that most embedable viewers like sketchfab do..., render and rotate a viewable mesh. I'm also pretty sure you could probably google up some code that you could just plug into krita also, but that would take programming time and testing, which is the other half of what is being asked. Prerequisites would be python/c++ QT and knowledge of GL and lets just say the obj file format with some simple GUI design. Learning all this would take considerably more time than to implement said request. Having said that, I am a wxPython type of guy more than QT, but just to give you an idea... It took me 8 months while Phoenix was being worked on by Robin Dunn to port the whole official demo(In my spare time). Not a high priority item in my opinion, but a student/hobbiest would find it a fun side project to implement probably. |
![]() Registered Member ![]()
|
Does Emmet doubt about using 3d-ref in 2d-paint program? Am I right ?
As someone mentioned above it is in famous Clip Studio Paint for a couple of years already: https://youtu.be/lmIkhPSCbyM?t=175 It doesn't look too fancy or kinda superfluous. It is great extension to reference-style workflow indeed. So, in my humble opinion it is useful. ![]() |
![]() KDE Developer ![]()
|
We actually have had two summer of code projects related to this: one was about showing a 3d model as a reference in the main canvas, the other about showing a model in docker and have it updated in real time when painting a texture in Krita.
Neither student made it, though. The first project stopped when the student disappeared after a week or so, the second student never got further than adding the assimp library to our build system. These days, with Qt3d, it should be much easier, but it will need someone to step up, start working on and then finish the job. Could be lots of fun, but will be lots of work for sure. |
![]() Registered Member ![]()
|
After thinking a bit more about the subject, I recalled some of my past work, how i did it and the tools used, and found a few things that would help such a basic 3D viewer be realized maybe a bit quicker than by doing one from scratch for anyone interested in tinkering with developing one.
This was inspired by a mistake i made when saving a dds on the wrong settings. What actually happened in the engine reminded me of a book jacket I had made in art class years ago when i was still in school. While everyone else made traditional style book jackets, I on the other hand wanted a limited edition foil like embossed comic book cover as these things interested me when roaming around the print shop. My artclass foil cover doesn't exist anymore and the texture seen here is probably lost on a hard drive somewhere since i never actually released this one, but i do still have the brushes to recreate one. ![]() Tools used: Photoshop 7, NifSkope, DDS Converter, TES4CS After a bit more thought after releasing the original pack, I realized that the default book mesh had lots of problems with the UV and was only 1 sided limiting the texture as a whole, so I created my own mesh and texture templates. ![]() Tools used: Blender, Photoshop 7, NifSkope After the meshes was modeled and the uv templates set up into .psd workshop documents, the textures where made, then reapplied to the mesh and rendered in nifskope basic 3D viewer, at which point I rotated the mesh just right, took a screen shot, pasted that back into photoshop, used the contiguous selection tool to remove the white background and scaled the book render down to 64x64 for the icon to be made. https://github.com/niftools/nifskope/releases The points of interest here are that the 3D viewer in nifskope is QT i believe, so this would be a very good start for anyone looking for code to reference making one of these. Another point is that once such a viewer portion is created, then writing the 'update texture in real time' krita functionality would be not hard at all to just slap the document texture on the mesh. Another thing to note is that I managed to get attention of the guy who had some .dds code floating around the web and got him to include some work into Pilow. So at the very least dds dxt1 is available as a import/export iirc. https://github.com/python-pillow/Pillow Of course with a viewer just plain old obj would be fine and supporting other formats is always nice, one of these would eliminate the need for a few other programs in the creation of assets besides hacking on the meshes themselves. By the time Skyrim came out, everyone was excited to port their mods to the new engine... First show stopper for most was that the nif format had updated so the team needed to reverse engineer the new format and figure stuff out. Second show stopper was that Blender went from 2.49b to the new design it has now which meant blender nif scripts and a lot more work needed to be done. I never did ever release anything for Skyrim basically for these reasons i couldn't do the port myself, tho i did do personal texture mods. Other folks hacked around and got a few things of mine ported. Hopefully TES6 wont be as painful when it comes out. Of the 2 above pictures, the 1st is rendered in the TES4 engine, the 2nd is just a display pic I made in Photoshop from nifskope basic renders. The 2nd would look quite a bit more awesome if placed in the new game engine of course, but shows the level of detail that a viewer in krita could have with just a simple book mesh and a texture applied. Hope this helps. ![]() |
![]() Registered Member ![]()
|
While in the topic of 3D models in viewport - how possible would be implementing painting directly on 3D models?
Like in Blender you can paint on models and it directly is applied to texture, without seams. https://youtu.be/jOqdTELcL24?t=76 However painting in Blender is very basic, usually I use it to just mark the points on my model then move to Krita to paint it fully and return to Blender to fix seams. Would be awesome to have all the painting on models in Krita, will the functionality it allows. |
![]() KDE Developer ![]()
|
Painting on 3d models uses projection mainly, that type of stuff is known.
What the biggest issue is however, and that counts for everything 3d related is that we just do not have the time to implement it. The main person who understands openGL is also the person we'd rather have working on performance issues and tricky rendering bugs. The other main person working on Krita is also busy fixing bugs and deals with issues like resource handling and bugtriaging. And the rest of us try to do our small contributions left and right. Either 3d model idea will need a renderer that can do what is necessary, and complete new gui paradigm to deal with 3d objects, on top of being able to import and export files. All of that will take what, a years worth of work? So for us it is waaaaay on the back burner. Krita is however an open source project, so if someone knows opengl and wants to take a stab at this, they're welcome to come to the irc and we'll try to help with figuring out how the architecture should look. |
![]() Registered Member ![]()
|
I have been hearing a few people request 3d stuff inside of Krita. For really simple things it might be ok like importing a model, but I think if we start going down the path of what Blender is doing with 3d painting, it is probably not a good idea to just recreate what they are already doing.
They are an open source project too. What I would like to see when it comes to 3d in Krita...if Blender and Krita could work together. One idea that has been thrown out is to have some type of "socket" between the two programs. Direct painting on a 3d model in blender would update a texture in krita...and painting on a texture in Krita would update Blender's 3D model automatically. 3D is a huge beast, so if we ever do much more than a basic 3d viewer, I would strongly suggest that time being spent integrating seamlessly with blender instead of recreating the wheel. Krita isn't designed around doing 3D, but maybe we could create some neat bridges between the two programs. No one is working on it though, so these are just ideas. |
![]() Registered Member ![]()
|
Didn't anybody do it already? ![]() ![]() Take a look: https://www.blendernation.com/2018/05/3 ... hop-files/ https://blendermarket.com/products/impo ... gbmp?ref=2 ... but for paint programs like KRITA it would be handy just to have a "3D-puppet" that can be resized, moved, bent, etc. It would be sufficient, I guess. ![]() For any "architectural" stuff, Krita's assistant tools with perspective grid should be enough. ![]() P.S. There is one good and free "mannequin" model in the net, and famous Krita artist Deevad use(d) it: https://www.deviantart.com/namito111/ar ... -440732215 ![]() |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]