English
Forum

OGL shadow

 
- Page 1 -



Frank
Abbing
I knows, that OpenGL none Schattenwurf provides. but Perhaps knows Yes someone a Possibility, shadow possible simply To simulate?
 
08/26/06  
 



 
- Page 1 -


[quote:cbc2bf0039=Frank Abbing][quote:cbc2bf0039]one should around the shadow one Objektes To produce the Objekt from visibility the Lichquelle ablichten and on The Textur the To beschattenden items lay [/quote:cbc2bf0039]
likewise works Yes Stencilschatten. only are The Codes moreover any in C++ and GLSL. Perhaps can Yes someone with C++-Kenntnissen time a code adjust, that it with Profan functions. [...] [/quote:cbc2bf0039]I see, lying I means with my assumption not at all so wrong.

How a OGL-scene however as bitmap abgelichtet becomes around the bitmap on a Textur To lay white I however not.
 
08/30/06  
 




Frank
Abbing
Well, for is even the Stencil virtual. The code lying indeed to, only is C++ not my thing.
here time pieces the Codes in Profan:
CompileMarkSeparation
!ogl("glColorMask",~GL_FALSE, ~GL_FALSE, ~GL_FALSE, ~GL_FALSE)
Schreiben in den Depth-Buffer ausschalten code
ogl("glDepthMask",~GL_FALSE)
Stencil-Test einschalten, code
ogl("glEnable",~GL_STENCIL_TEST)
ogl("glStencilFunc",~GL_ALWAYS, 1, $FFFFFFF)
ogl("glStencilOp",~GL_KEEP, ~GL_KEEP, ~GL_INCR)
Face-Culling richtig einstellen code
ogl("glEnable",~GL_CULL_FACE)
ogl("glFrontFace",~GL_CCW)
Schatten-Volumen zeichnen
Stencil-Operation umstellen code
ogl("glStencilOp",~GL_KEEP, ~GL_KEEP, ~GL_DECR)
Face-Culling "umkehren" code
ogl("glFrontFace",~GL_CW)
Schatten Volumen noch einmal zeichnen
Face-Culling wieder "normal" einstellen code
ogl("glFrontFace",~GL_CCW)
Schreiben in den Color-Buffer wieder einschalten code
ogl("glColorMask",~GL_TRUE, ~GL_TRUE, ~GL_TRUE, ~GL_TRUE)
Nur dort zeichnen, wo der Stencil-Buffer ungleich 0 ist code
ogl("glStencilFunc",~GL_NOTEQUAL, 0, $FFFFFFFF)
Ein bildschirmfüllendes, halbtransparentes Quadrat zeichnen code
ogl("glColor4f",0.0, 0.0, 0.0, 0.3)
ogl("glEnable",~GL_BLEND)
ogl("glBlendFunc",~GL_SRC_ALPHA, ~GL_ONE_MINUS_SRC_ALPHA)
ogl("glPushMatrix")
ogl("glLoadIdentity")
ogl("glBegin",~GL_TRIANGLE_STRIP)
ogl("glVertex3f",-0.1f, 0.1f, -0.1f)
ogl("glVertex3f",-0.1f,-0.1f, -0.1f)
ogl("glVertex3f", 0.1f, 0.1f, -0.1f)
ogl("glVertex3f", 0.1f,-0.1f, -0.1f)
ogl("glEnd")
ogl("glPopMatrix")
"Normale" Einstellungen wiederherstellen code
ogl("glDepthMask",~GL_TRUE)
ogl("glDisable",~GL_ST
TEST)
 
08/30/06  
 




Frank
Abbing
[quote:6ebf3adeec]How a OGL-scene however as bitmap abgelichtet becomes...[/quote:6ebf3adeec]
isn't necessary. whom code have I but exist:
CompileMarkSeparation
!oGL("glReadPixels",0,0,breite&,hoehe&,~GL_BGR,~GL_UNSIGNED_BYTE,bytearray#)
>
 
08/30/06  
 




Martin
Loga
[quote:345f09acf3]I knows, that OpenGL none Schattenwurf provides.[/quote:345f09acf3]
this is not integrally correctly., there's OGL Extensions The TextureShadowing support.

[quote:345f09acf3]Through Stencil Buffern should itself lovely Echtzeitschatten form let[/quote:345f09acf3]
that's right, but before your into incorrect direction operates, solltet your consider which shadow for you the geeignetere is.

[quote:345f09acf3]In E3 2003 carmack said that hey used monsters and demons in doom3 so that you fight a demon or two in each room for some time instead of intering a room and hunt 10 characters because theres no hardware that can render a big no. of characters with all their shadows and detail.
means carmak uses a model stature MD5 that have a good ploy.it contains 1 million normals and only 5000 vertices .this enables him to use the big no of normals to render the characters with very high detail and use the smaller no of vertices to calculate the shadow volume and collision detection and so on.
this is why theres no screenshots for terrains in doom3.it is impossible to render the shadow of the terrain using the shadow volume with such a big no of vertices used in terrains in modern game engines (unreal 2 for example renders 200000 triangles by frame reduces to 10000 using geomipmapping ).[/quote:345f09acf3]
Quote from:  [...] 

I have self erfahrungen with Stencilschatten made and already ex 5.000 To 10.000 Triangles and one jittering of 6 is the everything by far not any more echtzeitfähig.

If your TextureShadows uses is the Komplexität the Geometrie completely beside the point. Un if the well implementiert becomes, have your too only few hässliche Kanten (cue Multisampling).

it counts means abzuwägen. high performance then TextureShadows or better quality then StencilShadows. this is incidentally too the reason Why any new Games TextureShadows use.
 
08/31/06  
 




Frank
Abbing
[quote:8e89c3951c][quote:8e89c3951c]I knows, that OpenGL none Schattenwurf provides.[/quote:8e89c3951c]
this is not integrally correctly., there's OGL Extensions The TextureShadowing support.[/quote:8e89c3951c]
Yes, ex Version 2.0. then at least not for ältere Graphic-Cards available.

[quote:8e89c3951c]I have self erfahrungen with Stencilschatten made...[/quote:8e89c3951c]
lovely, in which Language? Meinst You, You could one simples example in Profan hinbekommen? Perhaps one Quad, the a shadow on the ground throws?

[quote:8e89c3951c]...and already ex 5.000 To 10.000 Triangles and one jittering of 6 is the everything by far not any more echtzeitfähig.[/quote:8e89c3951c]
well well. Echtzeit needed one Yes only for Games. for grafically Präsentationen with only few Objects ought to the but wealthy.

[quote:8e89c3951c]If your TextureShadows uses is the Komplexität the Geometrie completely beside the point. Un if the well implementiert becomes, have your too only few hässliche Kanten (cue Multisampling).

it counts means abzuwägen. high performance then TextureShadows or better quality then StencilShadows. this is incidentally too the reason Why any new Games TextureShadows use.[/quote:8e89c3951c]
in my case went it me sooner circa quality. would be really lovely, if You time an example bring could.

M.Loga, integrally freshly registered. are you new here or ists one Deckname one known?
 
08/31/06  
 




Martin
Loga
[quote:14d0152280]Meinst You, You could one simples example in Profan hinbekommen?[/quote:14d0152280]
does me sorrow but I have no experience with Profan only about OpenGL on itself can I help.

[quote:14d0152280]in my case went it me sooner circa quality. would be really lovely, if You time an example bring could.[/quote:14d0152280]
see I one, i was first of a game gone out (only play in the head )

[quote:14d0152280]M.Loga, integrally freshly registered. are you new here or ists one Deckname one known?[/quote:14d0152280]
be new here. no Known. I am not to profane but in general on computer graphic interested. be on eure Page punched, because from this Thread one Link on a item of my Website verwiesen has (gamedev.de).
 
08/31/06  
 



 
- Page 2 -



Frank
Abbing
[quote:6695799005]does me sorrow but I have no experience with Profan only about OpenGL on itself can I help.[/quote:6695799005]
Schade... with one Assemblercode would me but too helped! only C++ can I not...

[quote:6695799005]be new here. no Known. I am not to profane but in general on computer graphic interested. be on eure Page punched, because from this Thread one Link on a item of my Website verwiesen has (gamedev.de).[/quote:6695799005]
Ah, my Link...
have really a interesting Page with tollen Info! Gefällt me correctly. well.
The besagte Stencil-course is too lovely made, only The place with the stretch one Schattenvolumen is me To short get. at least, if one whom Source moreover not correctly. understand.
 
08/31/06  
 




Martin
Loga
[quote:52e56be9e8]with one Assemblercode would me but too helped! [/quote:52e56be9e8]
hmm then jag still the example Program by the Deassembler

[quote:52e56be9e8]only The place with the stretch one Schattenvolumen is me To short get.[/quote:52e56be9e8]
now this is fundamentally integrally simply. Zunächstmal must You ensuring, that the shadow werfende Objekt only from Dreiecken exists, there otherwise the Programmieraufwand tidy increasing and the performance schwindet. then building You you a list with neighborhoods. each Dreieckt has up to 3 neighbors. the make You best only once, sofern itself your Geometrie not mochmal changes. now comes the interesting part. You building with Help the neighborhoods a list of Umrisskanten. the are all those Kanten on The a triangle angrenzt the to Kamera schaut and one the from the Camera wegschaut (or simply keins angrenzt). the make You over the Skalarprodukt the Flächennormalen the individual Dreieckt with the Lichtvektor (one vector of Dreieck to Lichtquelle). is it larger 0 schaut the Dreieck lane, is it small 0 schaut it to Lichtquelle. have you got all these Kanten extrapolierst You The dazugehörenden Vertices on the ?Fluchtlinien? lane from the Lichtquelle.
 
09/01/06  
 




Frank
Abbing
thanks! the help me sure already moreover. there werd I another little with herumbasteln. time see, whether I it hinbekomme. if so, mail I you whom code to that Insert into Kursus.
 
09/01/06  
 




Jac
de
Lad
I can Yes time Dany ask, the rule C++, C#, Delphi, Assembler...and OpenGL+DirectX. The can you certainly help (either it bastelt ne DLL or created Source in Profane or what in the manner, presupposed it kanns!)

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
09/01/06  
 




Frank
Abbing
Dany, häh? well, then but Please as Assemblercode. with C++/# is me not helped.
 
09/01/06  
 




Jac
de
Lad
daniel Hoffmann. having itself to a couple weeks here announced and its Kompressions-DLL Arithmetic Encoding angekündigt. unfortunately is it not yet really weitergekommen, because it for Uni learn must and now one Praktikum power. has itself on my inquire there too not yet gemeldet, but I stops you on the ongoing!

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
09/01/06  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.937 Views

Untitledvor 0 min.
Sven Bader08/05/21
RICOSCH11/19/14
Thomas Zielinski04/20/14
Donnie03/20/13
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie