Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gallery: Post your screenshots / code here (PART 3) #772

Open
ocornut opened this issue Aug 7, 2016 · 78 comments
Open

Gallery: Post your screenshots / code here (PART 3) #772

ocornut opened this issue Aug 7, 2016 · 78 comments
Labels

Comments

@ocornut
Copy link
Owner

ocornut commented Aug 7, 2016

This is Part 3, I am splitting issues to reduce loading times and avoid github collapsing messages.

Browse all threads and find latest one to post to using the gallery label.

Also see: Software using dear imgui (you can help complete the list!)

You can post your screenshots here!

@sylefeb
Copy link

sylefeb commented Aug 7, 2016

Our online slicer for 3D printers (RepRaps, Ultimakers, Prusa, etc.), using the amazing ImGui! Try it here: http://shapeforge.loria.fr/slicecrafter/

slicecrafter-imgui

@eliasdaler
Copy link
Contributor

I'm making a game called Re:creation (more info here).
Here are some in-game dev tools I've made with ImGui!

Level editor:
leveleditor

Animation editor:
animationeditor


I've also made ImGui SFML binding and wrote two articles about ImGui (Part 1, Part 2)

@nem0
Copy link
Contributor

nem0 commented Aug 8, 2016

Timeline Widget
image
timeline
Source code https://github.com/nem0/LumixEngine/blob/timeline_gui/external/imgui/imgui_user.inl#L814

@r-lyeh-archived
Copy link

r-lyeh-archived commented Aug 15, 2016

UI mockup for an asset library/manager I'm working on. Nothing functional as we speak :)
Built mostly by re-using code from omar (obviously), dougbinks, juliettef, itamago, simon geilfus, krys and flix01.

Exciting times indeed!

gif0

Edit: @ratzlaff: used http://blog.bahraniapps.com/gifcam/ to encode the gif :)
Edit: @Flix01: it's Google's MaterialDesignIcons actually! (fixed-size icons are much better to work with!)

@Flix01
Copy link

Flix01 commented Aug 16, 2016

@r-lyeh Awesome main menu! And awesome icon font (or probably awesome usage of "Font Awesome" ?!?)
:)

Edit: @r-lyeh: good to know that Google's MaterialDesignIcons are fixed-size! "Font Awesome" is a bigger set AFAIK, but their size is not always the same, and this can result in visual problems (for example with check boxes where the width of the unchecked and checked icons is not the same).

@bkaradzic
Copy link
Contributor

animtool

@damqui
Copy link

damqui commented Aug 22, 2016

@bkaradzic nice ! is this anim tool somewhere on your github repos ?

@bkaradzic
Copy link
Contributor

@damqui Nope, but all default settings for that UI are in bgfx repo.

@Flix01
Copy link

Flix01 commented Aug 22, 2016

An unfinished (just the GUI ATM), very bad looking, Sudoku game for Dear ImGui:
imguisudokugame

@phoenixcatdog
Copy link

Testing Imgui with native cocoa(no external dependencies) and opengl3(Working on Metal version).

captura de pantalla 2016-08-24 a las 10 13 52

@edin-purkovic
Copy link

edin-purkovic commented Aug 31, 2016

Working on my 3D Model Editor/Game Engine, currently fixing my docking code and some bugs, for the most part it works.. imgui makes it very easy and beautiful looking...
docking

@thedmd
Copy link
Contributor

thedmd commented Sep 2, 2016

This is sneek peak of node editor build on top of ImGui. It handle displaying and user interaction.
node_preview_4

ImGui can be bend to handle zooming while keeping crisp details.
image

@jarikomppa
Copy link

Squee! Please say the sources are/will be available?

On Sat, Sep 3, 2016 at 2:57 AM, Michał Cichoń notifications@github.com
wrote:

This is sneek peak of node editor build on top of ImGui. It handle
displaying and user interaction.
[image: node_preview_4]
https://cloud.githubusercontent.com/assets/1197433/18221085/52f4c0d4-7179-11e6-9853-7f821089d6a5.gif

ImGui can be bend to handle zooming while keeping crisp details.
[image: image]
https://cloud.githubusercontent.com/assets/1197433/18220992/e2bb2e8a-7177-11e6-918b-f2a08411d24a.png


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#772 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEQ_R11WHpxJhvSFA-r-DAmZDTTyhcv3ks5qmLfzgaJpZM4Jed-X
.

@thedmd
Copy link
Contributor

thedmd commented Sep 3, 2016

@jarikomppa Right now source isn't out there. I will think about making it open source.

@Flix01
Copy link

Flix01 commented Sep 3, 2016

@thedmd I knew you were making awesome stuff! :)

ImGui can be bend to handle zooming while keeping crisp details.

How?

[Edit:] Is this something related to your branch named: 2016-09-fringe-scale, and expecially this commit: thedmd@94dd233 ?
Is it easy to use ?

@DrJedikiah
Copy link

screenshot_2
I've edited ImGUI a lot, and i solve the AA issue thanks by the way it was about renderer. I changed my hook to Present[17] from EndScene. And this is dll file not exe.

I made this tab system with buttons, i swapped the system of active state. If tab is active, button stays active too.

@thedmd
Copy link
Contributor

thedmd commented Sep 3, 2016

@Flix01: You're correct. Branch 2016-09-fringe-scale is related to my solution. I'm scaling content of draw list vertex buffer. When zooming in finge is also magnified. To get rid of that I scale it by inverse of zoom factor. This is basic idea. I will post some code as an example when I get to my PC.

@Flix01
Copy link

Flix01 commented Sep 4, 2016

@thedmd Thanks.

@thedmd
Copy link
Contributor

thedmd commented Sep 4, 2016

@Flix01: In more detail. To achieve scaling choose some scale factor, set fringe to 1 / scale factor and draw as normal. I'm drawing on multiple channels to achieve layering but this isn't necessary. After drawing is done call ImDrawList_TransformChannel_Inner and voilà, you are done. Almost.

This works but some problems arise around it. Working with global coordinate system (GCS) when scaling is involved isn't best experience. Treating your child window as canvas which works in local coordinate system (LCS) is much easier. (0, 0) is in top left corner of child window. I advise to use matrices to represent transformation from one space to another from the start.

First thing is transforming ImGuiIO::MousePos and ImGuiIO::MouseClickPos to LCS. This will allow ImGui to handle input correctly.

Second. Push new clip rectangle which cover visible part of your canvas. When scaling down canvas is larger than actual window, input is clipped to window size in GCS. Pushing larger clip rectangle enable ImGui to handle larger areas. Whole scaeled area isn't visible yet but since MousePos is transfomed ImGui is actually processing input over whole area.

Third. Be ready to restore ImGuiIO::MousePos and ImGuiIO::MouseClickPos to original values and bring them back to LCS. It is necessary if you want show popups correctly.

Last thing to be done is to transform window draw list to make content actually visible. You can use ImDrawList_TransformChannels for that. If you want to write similar function by yourself make sure one vertex is transformed only once. If everything inside window is scalled, good. You can just transform vertices. If only some channels are drawn in LCS things are more tricky. Include code handle former.

If something is unclear or language I use is odd, please point me that out and ask questions.

static void ImDrawList_TransformChannel_Inner(ImVector<ImDrawVert>& vtxBuffer, const ImVector<ImDrawIdx>& idxBuffer, const ImVector<ImDrawCmd>& cmdBuffer, const ImVec2& preOffset, const ImVec2& scale, const ImVec2& postOffset)
{
    auto idxRead = idxBuffer.Data;

    std::bitset<65536> indexMap;

    int minIndex    = 65536;
    int maxIndex    = 0;
    int indexOffset = 0;
    for (auto& cmd : cmdBuffer)
    {
        int idxCount = cmd.ElemCount;

        if (idxCount == 0) continue;

        for (int i = 0; i < idxCount; ++i)
        {
            int idx = idxRead[indexOffset + i];
            indexMap.set(idx);
            if (minIndex > idx) minIndex = idx;
            if (maxIndex < idx) maxIndex = idx;
        }

        indexOffset += idxCount;
    }

    ++maxIndex;
    for (int idx = minIndex; idx < maxIndex; ++idx)
    {
        if (!indexMap.test(idx))
            continue;

        auto& vtx = vtxBuffer.Data[idx];

        vtx.pos.x = (vtx.pos.x + preOffset.x) * scale.x + postOffset.x;
        vtx.pos.y = (vtx.pos.y + preOffset.y) * scale.y + postOffset.y;
    }
}

static void ImDrawList_TransformChannels(ImDrawList* drawList, int begin, int end, const ImVec2& preOffset, const ImVec2& scale, const ImVec2& postOffset)
{
    int lastCurrentChannel = drawList->_ChannelsCurrent;
    if (lastCurrentChannel != 0)
        drawList->ChannelsSetCurrent(0);

    auto& vtxBuffer = drawList->VtxBuffer;

    if (begin == 0 && begin != end)
    {
        ImDrawList_TransformChannel_Inner(vtxBuffer, drawList->IdxBuffer, drawList->CmdBuffer, preOffset, scale, postOffset);
        ++begin;
    }

    for (int channelIndex = begin; channelIndex < end; ++channelIndex)
    {
        auto& channel = drawList->_Channels[channelIndex];
        ImDrawList_TransformChannel_Inner(vtxBuffer, channel.IdxBuffer, channel.CmdBuffer, preOffset, scale, postOffset);
    }

    if (lastCurrentChannel != 0)
        drawList->ChannelsSetCurrent(lastCurrentChannel);
}

@Flix01
Copy link

Flix01 commented Sep 5, 2016

@thedmd thanks again for your detailed explanation.
It's something I'll investigate further in the future... (I still have to find out how antialiasing works...).

P.S. I'd also like to manage the draw lists to see if sorting indices on a texture-id basis is worthy or not.

@ocornut : sorry for having asked questions in the "Screenshot" section.

@thedmd
Copy link
Contributor

thedmd commented Sep 9, 2016

This is from a weekend project ascii-renderer where ImGui is used to control how rendering works. Only grayscale now. Everything is rendered on CPU.

image

And yes, you can render ImGui to ASCII buffer. : )
image

@vassvik
Copy link

vassvik commented Sep 12, 2016

I'm using LumixEngine's docking extensions, as so many others are, to make an editor-ish thing to be mainly used for my simulations. I wanted to create a minimal project with just the essentials to have a decent looking docking example with as few dependencies as possible, so I removed all the things I didn't need from LumixEngine's docking files and replaced it with simpler things.

screenshot_docking

Current work-in-progress code

@darkf
Copy link

darkf commented Sep 14, 2016

@thedmd Please release the source, I'm very interested in node based editors like this!

@lapinozz
Copy link

I made a Pixel Art Upscaler using Dear ImGui

https://github.com/lapinozz/ScalaPixel

demo

@ExtasyHosting
Copy link

Still a work in progress...

@bkaradzic
Copy link
Contributor

@ExtasyHosting Slick! :)

@AndrewBelt
Copy link

AndrewBelt commented Jan 10, 2017

This is kind of a meta suggestion, but you can simply link here on each screenshot thread so you don't have to update the description each time.

@ocornut
Copy link
Owner Author

ocornut commented Jan 10, 2017

This is kind of a meta suggestion, but you can simply link here on each screenshot thread so you don't have to update the description each time.

Correct, but the direct links are 1 click away instead of 2 so it is more convenient for the user :)

@ocornut
Copy link
Owner Author

ocornut commented Jan 10, 2017

This is Part 3. I am splitting issues to reduce loading times and locked the old ones.

Screenshots Part 1 #123
Screenshots Part 2 #539
Screenshots Part 3 #772
Screenshots Part 4 #973
Screenshots Part 5 #1269
Screenshots Part 6 #1607
Screenshots Part 7 #1902
Screenshots Part 8 #2265
Screenshots Part 9 #2529
Also see: Software using dear imgui (you can help complete the list!)

@ocornut ocornut closed this as completed Jan 10, 2017
@ocornut ocornut reopened this Jan 10, 2017
Repository owner locked and limited conversation to collaborators Jan 10, 2017
@ocornut ocornut changed the title Post your screenshots / code here (PART 3) Gallery: Post your screenshots / code here (PART 3) Jun 2, 2017
@ocornut ocornut added the gallery label Aug 6, 2017
Repository owner unlocked this conversation Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests