Wow!! Impressive Ronie! 
Works pretty well!

I�ve played a bit:

Transparency + lighting model


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| view el1 el2 |
view := R3View new.
view lightingModel: R3MultipassPerPixelLighting new.
el1 := (R3CubeShape new color: (Color purple alpha: 0.2)) element.
el2 := (R3CubeShape new color: (Color purple alpha: 0.2)) element.
el1 makeTranslucent.
el2 makeTranslucent.
view add: el1; add: el2.

el2 translateByZ: -2.
view add: (R3SpotLight position: (R3Vector3 newX: 0 y: 2 z: 0)
direction: (R3Vector3 newX: 0 y: -1 z: 0)
cutoff: 45 exponent: 10
color: Color cyan).

view addInteraction: R3MouseControl new; addInteraction: R3KeyControlForMac new.
view open
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Just posted on 
https://www.facebook.com/photo.php?fbid=562076237212311&set=a.552518388168096.1073741834.340543479365589&type=3&theater

Cheers,
Alexandre


On Dec 24, 2013, at 3:23 AM, Ronie Salgado <roniesalg@gmail.com> wrote:

Hi Alex,

Translucent objects requires a singlepass lighting model, which I took the opportunity to complete and make it the default one.
I put your example with a slight modification under R3Example>>translucentCubes
Translucent elements require a reception of the message makeTranslucent since their rendering must be handled in a special way. They must rendered after all the opaque objects, in a back to front order without depth writing. Currently only depth writing disabling per element is supported, so their rendering is not going to be perfect, but at least some transparency can be seen.

Greetings,
Ronie Salgado


2013/12/23 Igor Stasenko <siguctua@gmail.com>



On 23 December 2013 22:04, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!

Is there a way to have transparent colors with NBOpenGL?
I�ve tried the following (using Roassal 3d):

-=-=-=-=-=-=-=-=-=-=
| view el1 el2 |
view := R3View new.
el1 := (R3CubeShape new color: (Color purple alpha: 0.2)) element.
el2 := (R3CubeShape new color: (Color purple alpha: 0.2)) element.
view add: el1; add: el2.

el2 translateByZ: -2.

view addInteraction: R3MouseControl new; addInteraction: R3KeyControlForMac new.
view open
-=-=-=-=-=-=-=-=-=-=

But I get something like:
<Screen Shot 2013-12-23 at 10.03.37 PM.png>
Would it be possible to have translucent cubes? Any OpenGL expert around?


Come on, Alex, sometimes you make me think you just came from the Moon.

http://www.opengl.org/archives/resources/faq/technical/transparency.htm
http://www.openglsuperbible.com/
google: opengl transparency
 
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






-- 
Best regards,
Igor Stasenko.

<translucent.png>

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.