Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (780)
Games in Android Showcase (233)
games submitted by our members
Games in WIP (857)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  viewing translucent polygons from behind (color is too dark)  (Read 1321 times)
0 Members and 1 Guest are viewing this topic.
Offline keith_myers

Senior Newbie

« Posted 2006-03-07 20:16:14 »

I've been messing around for several hours trying to get a simple translucent polygon to look correct from both sides.  It's fine from the front, and blending works as expected.  In fact if I put several in a row the 'add' correctly.  If I move the camera around to the back and look toward the light source through the polygons they are dark for obvious reasons.

So, how might I convince the polygon to behave as you would expect a pane of glass to behave in a window?  It seems as long as I have lighting enabled when I draw the poly it will never look right, but if lighting is off you cant see it at all...

I can put some code up if needed, and thanks for any input.

Offline GKW

Senior Devvie

Revenge is mine!

« Reply #1 - Posted 2006-03-07 21:22:26 »


I don't know if that will work for you or not.
Offline keith_myers

Senior Newbie

« Reply #2 - Posted 2006-03-08 02:13:19 »

That was one of the things I tried, unfortunately.  It supplied a partial fix by at least allowing you to SEE the poly from the back, but then the lighting was too dark because, of course, the light source was shining on the front face.  I'm imagining a stained glass window with the sun shining on it... it's well lit from the front AND back. 
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline dawidl

Senior Newbie

« Reply #3 - Posted 2006-03-20 10:54:41 »

I think you are trying to accomplish something quite complex, translucency with correct lighting from the back is incredibly computationally expensive, and is only quite recently implemented in the renderers of 3D Modeling apps, such as 3D Studio Max, Blender, Maya, etc. Corrct me somebody if I'm wrong, but I don't think there's any way OpenGL can give you this effect (the physically correct calculation of photons as they pass through a translucent surface) "for free" - I imagine you'd have to simulate it with more lights on the other side of the glass, or by tweaking the material.

Pages: [1]
  ignore  |  Print  

hadezbladez (745 views)
2018-11-16 13:46:03

hadezbladez (386 views)
2018-11-16 13:41:33

hadezbladez (737 views)
2018-11-16 13:35:35

hadezbladez (194 views)
2018-11-16 13:32:03

EgonOlsen (2395 views)
2018-06-10 19:43:48

EgonOlsen (2558 views)
2018-06-10 19:43:44

EgonOlsen (1482 views)
2018-06-10 19:43:20

DesertCoockie (2145 views)
2018-05-13 18:23:11

nelsongames (1949 views)
2018-04-24 18:15:36

nelsongames (2629 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!