r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3 GUI]

Maxim
21-Sep-2010
[3388x2]
is there a way we can get the r3-gui not compressed?  I'm getting 
strange handler errors which cause rebol to halt whever I try to 
open another window not from r3 gui.
I don't care if it 30MB in size.   I could help you with the debugging, 
but right now its very tedious to do.
Henrik
21-Sep-2010
[3390]
I'm preparing a different build script, so it will appear uncompressed. 
Should be up within a day or so.
Maxim
21-Sep-2010
[3391x4]
cool


also, is there a way to link an arbitrary gob within the gui defintion?
I'd like to show an animated 3D teapot within r3gui  :-)
seems using view/as-is when r3-gui is loaded prevents r3-gui from 
doing its stuff... it craps out with a handler-related error...
(this is on a window not using r3-gui, btw)
Henrik
21-Sep-2010
[3395x2]
hmmm... I'm not sure yet. the closest thing is probably IMAGE or 
DRAW faces.
view is probably broken with non-standard windows. I made a few changes 
in it to make it work properly, but it could use a rewrite.
Maxim
21-Sep-2010
[3397]
it could be nice to add a simple style called gob, which just uses 
a gob! as its setup data


basically, it would be a static gob, which only displays itself, 
doesn't resize or just doesn't respond to the resize re/actors.


this would allow integration of different graphics tools which weren't 
setup using r3gui.

just a thought.
Henrik
21-Sep-2010
[3398]
I'll pass this on (if it's not already in there)
Maxim
21-Sep-2010
[3399]
thxs


are the online docs usable for style definition or has it changed 
so much that there's no point in trying to make a custom style right 
now?
Henrik
21-Sep-2010
[3400]
new build is up with uncompressed source:

http://rebol.hmkdesign.dk/files/r3/gui/r3-gui.r3
Maxim
21-Sep-2010
[3401]
oh cool!
Henrik
21-Sep-2010
[3402x3]
please download to local disk
style building has only changed with regards to resizing (which I 
haven't entirely figured out yet), but otherwise remains the same, 
so feel free to build some styles.
later, Cyphre will come up with some modifications to draw blocks 
for styles, so we can use positional keywords that work together 
with the box model, so it becomes easier to create draw blocks.
Maxim
21-Sep-2010
[3405]
ah there is a box style I can easily use.

thanxs for all.
Henrik
21-Sep-2010
[3406]
ok, cool
Maxim
21-Sep-2010
[3407]
hum... using stylize doesn't seem to add to the global style sheet... 
is there a function to call first to setup or assign to a specific 
stylesheet?

such as to replicate stylize/master   in R2..
Henrik
21-Sep-2010
[3408]
it should do that. it's a bug if it doesn't.
Maxim
21-Sep-2010
[3409x2]
DOH!.... it would help if i used stylize  BEFORE  I use view   ;-)
seems to work now.  :-)
Henrik
21-Sep-2010
[3411]
ok :-)
Maxim
21-Sep-2010
[3412x2]
btw, I'm working on fixing the as-is event handler issue I found 
earlier...
is it normal that (out of the box) there is nothing happening to 
controls when I press on the mouse?
Henrik
21-Sep-2010
[3414]
if you don't add any reactors, then I think so, yes.
Maxim
21-Sep-2010
[3415x3]
you mean.. buttons don't click (visually) unless I add an action 
to them?
cause right now, the gui looks totally dead a part for the fact that 
it resizes (though its late by one window resize event.)
ah wait... its my fault.
Henrik
21-Sep-2010
[3418x2]
oh, that's because the materials are not defined for click actions.
since it's a temporary skin to test the materials system
Maxim
21-Sep-2010
[3420x2]
ok, I removed the hack which I had in place.
ah ok
Henrik
21-Sep-2010
[3422]
the materials system specifically maps various surface appearances 
to the face states. perhaps it needs to be refined as I haven't looked 
at it in two years, but the intent is to do this in the material 
specification instead of inside the style. so you say "I want material 
X" and then all variants of it are used in the style.
Maxim
21-Sep-2010
[3423x2]
yeah, sensible.
does the material support some sort of accumulation?

a very loose example

I want gui in style dark
I want aluminium

the issue here being that dark is not a value but a process.

so you get dark aluminium ?
Rebolek
21-Sep-2010
[3425]
you select aluminium as material and some dark color to get dark 
aluminium
Maxim
21-Sep-2010
[3426x2]
ah ok, so it doesn't accumulate the materials.  since color is a 
property, not a process.  here dark is a concept... 

which might ultimately apply to all styles, but which isn't resolved 
by the aluminium, but by dark itself...


it was just a question, I wasn't expecting a yes ... its a very advanced 
shading (are rare, and complex) process.
(its definitely not a limitation on the part of the engine, for those 
who might mis-interpret my question)
Henrik
21-Sep-2010
[3428]
you can have a look at the materials section to see the specs for 
a material
Maxim
21-Sep-2010
[3429]
yeah I did briefly.. but there is a lot of code to sift through... 
it is 216 kb after all  (which is pretty lean for a GUI complete 
engine ;-)
Henrik
21-Sep-2010
[3430]
There are two primitive formulas used to create a simple specular, 
but one is broken. I'm terrible at that kind of math, so maybe they 
should be revised. I could use some help in creating a designer friendly 
few speculars that emulate brushed metal, plastic, glossy, glass, 
etc.
Maxim
21-Sep-2010
[3431x2]
I'm still trying to resolve the as-is handler bug... getting closer.. 
now it doesn't crash, but it doesn't use my handler neither.
yeah, without some support libs, designing shader stuff from scratch 
is hairy at best...


the only help I can give you is to use light energy-based math instead 
of color math.  I've seen some VFX compositing tricks where  you 
can simulate this by scaling colors with a gamma of 2 blending your 
colors and then applying the inverse gamma of 0.5.  the way the colors 
will merge usually provides better results, but still doesn't clip.


the idea here being that the gray areas won't merge the same way 
as low and high-color areas... might be usefull to play around with 
gamma in the draw block too... though I'm not totally sure how it 
all works in agg.
Henrik
21-Sep-2010
[3433]
shaders must be very simple for speed. I'm not so terribly interested 
in actual realism, just a way to map a linear value to a specular 
value, which then gets tinted with a color.
Graham
21-Sep-2010
[3434x2]
Henrik, why not just put the gui on devbase ?
and then you won't have to worry about your bandwidth
Henrik
21-Sep-2010
[3436]
these are my private builds and they will not come in a regular frequency 
yet.
Maxim
21-Sep-2010
[3437]
ah think I found the handler problem.


view's awake function now calls the do-event (it used to be handler).


so its just an adjustment to any code running after it loaded r3-gui.