*New gui initial idea and Mockup*

Discussion related to the development & design of the LuxRender Graphical User Interface
coordinator: none (position is open)

Moderator: coordinators

*New gui initial idea and Mockup*

Postby Radiance » Thu May 22, 2008 6:31 am

LuxRender v1.0 GUI proposal
---------------------------

1. GUI TOOLKIT

We will use wxwidgets.

- FLTK v1.0 is too simple
- FLTK v2.0 is not mature enough
- QT has licensing difficulty on win32
- GTK+ is good, but wxwidgets supports it already on linux/unix and has better native underlying toolkits on other platforms.

Use of wxwidgets will use the native win32 gui toolkit on windows platforms.
The underlying toolking for linux systems should be 'GTK+' which is supported by wxwidgets.
On Mac OS X wxwidgets support seems to be included by default,
and it even supports carbon and non-carbon underlying toolkits.

Care must be taken to make the layout and build as simple as possible,
so people on linux/unix and mac can build easily.

wxwidgets supports OpenGL integration.
We can reuse our existing opengl image viewing/panning port code (by zcott) in the new gui.
there seems to be documentation about migrating opengl apps from FLTK to wxwidgets. (google for it)

IT's IMPORTANT that we have our GUI communicate and control the engine ONLY via the API.
we cannot have any wxwidgets types or includes in the engine outside of renderer/

whenever a new call is necessary and needs to be implemented, and you don't know how, please ask me (or any other engine developer)

2. GENERAL LAYOUT / VIEWPORTS

wxwidgets supports a grouping/tab widget known as 'wxauinotebook'.
This is a very interesting tab/grouping system which allows the user to split and drag/pane different tabs
across the GUI. (a bit like the window panes in Blender)

MAIN RENDER WINDOW IMAGE:
Image

The GUI will have 3 default tabs. (refered to as viewports from now on)

- 'render' : display contents of render buffer and allow to control engine
- 'log' : display all console output in a logwindow of the luxgui/engine
- 'output' : same concept as 'render' but will become an integrated tonemapper like 'violet'.

Phase 1, what we start building now is the main GUI window,
the 'render' and 'log' viewports.

Phase 2, once we're more or less happy with phase 1 will continue on the work and implement an integrated tonemapper/postprocessor.
however some concepts/code from the general viewport concept will be shared between both 'render' and 'output',
so it's important that we think about this stuff now, to write reuseable code.

Each viewport has a bar ontop.
This control-bar as i will call it from now,
controls the viewport in question.

A controlbar has specific buttons/controls on the left, unique to the viewport in question.
It has a common set of viewport manipulation controls on the right, which are visible/useable in all viewports.

Please note that 'log' is not a true viewport so it does'nt need a controlbar.
(currently 'render' and 'output' have one)

Examine this mockup which shows the idea of viewports/controlbars:

Image

I have dragged the output viewport to share the screen horizontally,
to show both 'render' and 'output' aligned.

As you can see the controls on the right of the controlbar are same for both ports.
Both viewport (the render buffer, and the output tonemapping buffer) have our opengl
code in them to allow zooming/panning.
The 2 buttons on the right of the viewport controls are basically the same as the
function of the middle and right mouse buttons. (zoom to actual pixels / fit to screen)

left to them is a button with an eye icon.
this is a simple push button which will update the buffer.
next to it is the button with the clock,
this is a toggle button (on by default) which activates or deactivates automatically
updating the viewport using the time in seconds which can be adjusten with the slider next to it.
(the default value of 12 seconds is the value for ldr_display_freq specified in the scenefile.)

A user can disable updating if he does'nt need it.
The GUI should also do this automatically if the window is minimized to avoid wasting CPU cycles
on tonemapping.

Next to the display update controls is an identical set of 2 buttons with a slider.
This is basically the same as above but to control writing film buffer to file.
(eg imagesaveperiod)
One can disable it at his choice and hit the button with the small image in the bin to save manually,
or enable and select the write frequency)

Both frequencies should have selectable values between min 5 seconds and max 480 seconds.

The only difference in concept between these controls in the render and output viewports is:
- render will save the fleximage contents to our resumable file format.
- output will allow to choose the LDR/EXR file and write to that instead.

For now, we don't need to worry about actually making the 'output' port work,
just keep all this in mind so we write reuseable controlbar code.


It's important to consider what both windows show.
The 'render' window is only meant to show you what the engine is doing.
It does not need any tonemapping parameters,
it just fetches a tonemapped image from the engine with default reinhard 1/1 parameters.
It's contents are not meant to be saved to a TGA file and used as artwork.
It does not need any controls to save to image formats neither,
it just allows control to save to our resumable fleximage fileformat.

During phase 2, the implementation of 'output' we will have functionality for a user
to either choose to tonemap/save to LDR from the render buffer, or work off of one of these fleximage files,
from a previous 'render' session.

Now on to the left of the controlbars.
These have unique functionality for the viewport in question.

I have included some ideas for the 'render' port.
It's what we currently have, our play/pause/restart buttons and thread control. (add thread etc...)

I've added a second one called 'network slave control' which works the same but for network slaves.
The idea is that a subwindow will pop up and present the user with options to enter/select network slaves.
(this stuff does'nt need to be thought out/implemented just yet, it will depend on dade's work)

As you can see i have not provided any details yet regarding controls for 'output'
as i suggest we do the phase 1 first, to keep things simple.

The 'output' port will have different tabs and UI controls for tonemapping, filtering, light mixing etc...
The reason why we leave this for now is that we still need to implement these options completeley in the fleximage code.


REGARDING DESIGN AND ICONS ETC

don't worry too much about that now.
we need to make sure the basic concepts are implemented correctly, and well organized visually.
we can use mock icons for now, and spend some additional effort to make nice ones once we have an initial playversion.
(i can get some help for this)

the mockups above are also very coarse, there can be a lot of work done to make things fit and scale better.
don't treat them as a final visual arrangement



That's it.
I think it's a good start.

I have attached a copy of my wxformbuilder v3.0.56 RC8 project which you can open if you download/install it.
This is a simple/quick mockup in the wxformbuilder designer.
It's not meant to be used.
It's not well categorized and named from a code point of view.
It's just meant to serve as an example to build a correctly organized replica instead.

Once we've reached phase 2 i will have more detailed mockups/projects for the 'output' UI.

It's important that we write the code in a reuseable way.
we might want to have other types of viewports with opengl navigation and controls for other concepts in the future.

I suggest Ratow analyzes this document and tries to replicate this or a similar concept.
We can 'tune' the idea on the way.
However it's important that we start work on this asap,
and don't turn this topic into a neverending spaghetti of ideas and discussion to complicate development even more,
or we will not have a useable new GUI anytime soon and lots of features which can't be used properly.

Comments and critique can be given when a first version is realised.

greetz,
radiance
Attachments
v1_wxformbuilder.zip
the wxformbuilder mockup project
(5.27 KiB) Downloaded 60 times
User avatar
Radiance
 
Posts: 3968
Joined: Wed Sep 19, 2007 2:13 am

Re: *New gui initial idea and Mockup*

Postby Dade » Thu May 22, 2008 9:11 am

Radiance wrote:LuxRender v1.0 GUI proposal
---------------------------

1. GUI TOOLKIT

We will use wxwidgets.

- FLTK v1.0 is too simple
- FLTK v2.0 is not mature enough
- QT has licensing difficulty on win32
- GTK+ is good, but wxwidgets supports it already on linux/unix and has better native underlying toolkits on other platforms.

Use of wxwidgets will use the native win32 gui toolkit on windows platforms.
The underlying toolking for linux systems should be 'GTK+' which is supported by wxwidgets.
On Mac OS X wxwidgets support seems to be included by default,
and it even supports carbon and non-carbon underlying toolkits.


I know it is not very nice to jump in the middle of a discussion when a "battle plan" is already ready on the table but did you evaluated the idea of using Java ?

We are outlining a solution (in the thread about network rendering too) where we have 1 or more rendering server engines (something like a database server) and a separated front end. Indeed the rendering engine is written in C++ for performance but there is no need to write the front end in the same language.

In my opinion, for the front end, it is far more important to have a language that help fast multi platform development than performance (no one will notice the difference between a gui written in java and one written in C++).

Python could be another nice candidate because there are already a lot of people here using this language but does it have a support for GUI ?
User avatar
Dade
Developer
 
Posts: 4795
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: *New gui initial idea and Mockup*

Postby Radiance » Thu May 22, 2008 9:19 am

I'm willing to go with whatever is the easiest.

One issue is that most UI toolkits who have support for languages like python usually have inferior implementations / less flexible one those...

JAVA could be good, but I'm not sure we've anyone around here with experience in it.

I think C/C++ is a good choice because we can do whatever we want in the future.
if the gui develops into a 3D viewer/editor in the future, i can see performance becoming an issue.

we can also use a lot of ready made lux-centric bits of code in those situations. (materials in material editors, vectors/matrixes/meshes etc...)
we're already C/C++ centric and our current environment/people/build process is already oriented towards it...

Unfortunateley i've not much experience with JAVA so i'm not sure what complications would arise.

greetz,
radiance
User avatar
Radiance
 
Posts: 3968
Joined: Wed Sep 19, 2007 2:13 am

Re: *New gui initial idea and Mockup*

Postby Ratow » Thu May 22, 2008 2:01 pm

Hey, I really like these mockups. Pretty consistent and generic enough for future features.
(hmm i'm thinking of a material editor tab :D)

I'll digest all this info a bit and start asap.

Regarding the language to use, my experience is that using something like python can indeed speed up development (a bit) , but then there would be more dependencies and, in my opinion, it wouldn't be as well integrated with the core.

-Ratow
User avatar
Ratow
Developer
 
Posts: 308
Joined: Sun Oct 28, 2007 8:19 am
Location: São Paulo, SP, Brazil

Re: *New gui initial idea and Mockup*

Postby GustavTheMushroom » Thu May 22, 2008 3:17 pm

Wow! I love the UI! Looks awesome! Good work radiance!
--
Be grateful we are not eternal. For were we eternal, not a single precious second would mean anything to us.
User avatar
GustavTheMushroom
 
Posts: 117
Joined: Wed Nov 21, 2007 5:50 pm
Location: Sydney

Re: *New gui initial idea and Mockup*

Postby droid » Fri May 23, 2008 12:47 pm

Unfortunateley i've not much experience with JAVA so i'm not sure what complications would arise.

Java Swing development is a big part of my day-job so there would definitely be pros and cons:

Pros...

- cross-platform support is exceptional. In particular, it's relatively easy to code a UI in Java that looks identical
on all platforms
- look&feel can be changed at any time and doesn't affect core UI code (Swing completely separates the behaviour and API of
core components from the way they are drawn)
- once the basic UI architecture is designed and coded, adding new things is very easy and very fast
- less cross-platform testing (see first point)

Cons..

- (and this one's a biggie)... the JVM required to run the UI is biiiig (we're talking 80Mb on disk for the 32 bit JRE)
- Lux would need to be true client/server, otherwise it would be necessary to make some Java native bindings, which
isn't a task for the faint-hearted ;) I personally think making everything client/server based can only be a good thing,
but it might not be the right decision to accelerate that work unnecessarily.
- Swing can be quite a learning curve. It's easy to get started but it has many subtleties, gotchas and different ways of
achieving the same thing. An expert would hit the ground running no problems... someone new to it (even someone
with experience of another UI architecture) might find it slow going at first.

Notice I didn't put performance anywhere as a pro or con. In terms of drawing stuff to the screen, Java 6 is already very
good at automatically feeding images/graphics ops to OpenGL/Direct3D as required (Java 7 will be even better at this)
so the main performance hog of rendering a large image to screen isn't a problem. Custom rendering of UI components
is snappy as f*** so no issues there in my experience ;)

In terms of number-crunching/3D graphics performance, I'll just refer everyone to Jake2 (a Java port of the original
Quake 2 'C' code) which achieves close to (sometimes more than) the same framerates as the original game.

There are now good routes into 3D visualisation through the JOGL bindings (Java-Open-GL) and also through
Java3D (whose cross-platform support is much better now than it was 3 years ago and I can testify to its performance,
having once produced a scene previewer for Radium using it, something I unfortunately had to abandon at the time
because of a lack of 64-bit support at the time).

If I were being totally unbiased, I'd lean towards not using Java for the UI, mostly because of the huge extra footprint
required for the JVM and the fact that it would introduce a totally new development architecture into the project. I'm also not
sure how easy JOGL development is for when the time comes to preview a scene in 3D. It's a close call though.

Just my tuppence-worth...

Ian.
droid
 
Posts: 23
Joined: Mon Oct 15, 2007 5:48 am

Re: *New gui initial idea and Mockup*

Postby Dade » Fri May 23, 2008 1:04 pm

droid wrote:In terms of number-crunching/3D graphics performance, I'll just refer everyone to Jake2 (a Java port of the original
Quake 2 'C' code) which achieves close to (sometimes more than) the same framerates as the original game.


On the performance side I can add I have written in the past a little java ray tracer with irradiance cache for GI. It had a parser add-on compatible with Ward's Radiance file format (http://radsite.lbl.gov/radiance/framew.html). So I was able to render the same scene both with my Java ray tracer and Radiance (written in C). In most cases the performances of the java ray tracer where about the same of Radiance.

The amount of computation done for the rendering were about the same because both uses an irradiance cache scheme. Today Just-In-Time-Compilers do an awesome work.
User avatar
Dade
Developer
 
Posts: 4795
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: *New gui initial idea and Mockup*

Postby Radiance » Fri May 23, 2008 1:16 pm

well,

all good, but nevertheless, we don't have any java devs. (that i'm aware of)
(except for Dade if he wants to do this, but i think he's much better to code on core engine currently)

regarding portability, true, but again we need to compile the engine part of lux on the platform in question anyway.

Lux would need to be true client/server


it is.

the API is already served over TCP/IP with out network code, so a 'client' as in one of those little tools like you get to administer oracle databases (java gui <> C/binary oracle server) could be possible.

the issue again is that for simple artistic use the user will need a platform specific build of the engine...

tough call eh :)

i'm not sure. i think JAVA could be possible but not without some major new contributors with experience in it.
i think we're already far too busy on other things to research/implement this... (with our current project devs)

Ratow, what are your thoughts ?

Radiance
User avatar
Radiance
 
Posts: 3968
Joined: Wed Sep 19, 2007 2:13 am

Re: *New gui initial idea and Mockup*

Postby Ratow » Fri May 23, 2008 3:09 pm

Well, I do have experience with java and swing. As a matter of fact, my first real job was to create a fairly customized GUI with custom controls and table cell viewers. But this was a long time ago, and then I saw the light! :mrgreen: I avoid it like the plaque now, unless the project is more "enterprisey" and requires web services and things like that, but I digress.
As for portability, wxwidgets takes care of this, the only problem being the need to compile the GUI in each supported platform. So I don't think this is a real problem right now.
And, I'll probably get flamed for this but, I think there are fewer good java coders in the OS world than C/C++ coders. There, I said it! *runs and hides* ;)

To sum it up, I guess we should continue with wxwidgets and C++ and maybe leave Java for a web client later?

-Ratow
User avatar
Ratow
Developer
 
Posts: 308
Joined: Sun Oct 28, 2007 8:19 am
Location: São Paulo, SP, Brazil

Re: *New gui initial idea and Mockup*

Postby droid » Fri May 23, 2008 6:56 pm

But this was a long time ago, and then I saw the light!

Things have changed a lot ;)

To sum it up, I guess we should continue with wxwidgets and C++ and maybe leave Java for a web client later?

It makes a lot of sense, especially from code control and build point of view.

I think there are fewer good java coders in the OS world than C/C++ coders. There, I said it! *runs and hides*

...loads gun, cocks the trigger... oh, actually, you're probably right. There are some fairly terrible coders out
there in general, regardless of language, but I agree... there are too many Java-kiddies out there who only learnt
how to make a few simple classes at school and then called themselves "programmers". I think it's a general problem
though... no-one teaches about real, hardcore systems programming these days :roll:

Ian.
droid
 
Posts: 23
Joined: Mon Oct 15, 2007 5:48 am

Next

Return to LuxGUI

Who is online

Users browsing this forum: No registered users and 0 guests