3D Schatten

Previous topic - Next topic

WPShadow

Hi!

Ich komme irgendwie mit dem 3D - Schattenwurf nicht klar!

Grundlegend gehe ich genau nach Gernots Eintrag im HELP vor, nur sehe ich keinen Schattenwurf...

Seltsamerweise funzt das nicht so richtig!

Code (glbasic) Select

WHILE TRUE


MOUSESTATE mx, my, b1, b2

X_MAKE2D

PRINT mx + " " + my, 0, 0



X_MAKE3D 1, 1000, 45

X_CAMERAUP 0, 1, 0
X_CAMERA 50, 50, 50, 0, 0, 0

X_MIPMAPPING TRUE

X_SPOT_LT 1, RGB(255, 255, 255), 0 + mx, 10, 0 + my, 0, 0, 0, 360

draw_brett()

X_MOVEMENT 24, 0, 0
X_SETTEXTURE 2, -1
X_DRAWOBJ 2, 0


X_SPOT_LT -3, 0, 0, 10, 0, 0, 0, 0, 360

X_MOVEMENT 24, 0, 0
X_SETTEXTURE 2, -1
X_DRAWOBJ 2, 0

X_MAKE2D



SHOWSCREEN
WEND


Mache ich da irgendwas falsch?

Gruß

W.
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est

Hemlos

Shadows are tricky.

1. objects cant be touching.
2. Objects faces must be a few position coordinates from each other. Small gaps create issues.
3. holes in an object might create problem too.
4. objects must be at least 1 or 2 coordinate wide, too small and issue arise.

I got them to work before, but it took alot of trial and error.
Bing ChatGpt is pretty smart :O

WPShadow

There are only small cubes and small objects on it, but no shadow, whatever I do...
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est

Kitty Hello

After X_SPOLT_LT -3 you must draw all objects that cast a shadow.
Before that you must draw all objects that are in the scene to display the shadows.

WPShadow

That's exactly what I've done, but no shadow!

If you want, I can send you the file as example!

Don't want to show it, it's for the new Contest...  :nana:
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est

Schranz0r

Schicks mir mal, dann schau ich es mir an.
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

WPShadow

kk, schon auf dem Weg!!!
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est

Kitty Hello

PAck mal das projekt oder mach Objekte mit X_OBJ..., damit ich's schneller testen kann.

Schranz0r

#8
Hast X_CULLMODE vergessen Willi!


machst du so :
Code (glbasic) Select

...
  X_MAKE3D 1, 1000, 45
   draw_camera(br)
    X_MIPMAPPING TRUE
    X_CULLMODE 1
...



ZITAT HILFE GLB (F1):
QuoteSpezialitäten Mit X_SPOT_LT erzeugt man Lichtquellen für Spezialeffekte. Dabei ist num# entscheidend für den Effekt.
Achtung
Dabei muss der CULLMODE auf -1 oder 1 stehen!

so, das wär mal wieder ein Bier :D
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

Kitty Hello

Krass. Das siehst Du einfach so!?

Schranz0r

#10
Warum net?
Bin spezial GLB-User ;) , kein problem für mich  :whistle: ...

Ne hab einfach mal beim Spotlight auf F1 gehauen und schnell bei SPEZIALITÄTEN gelesen :D
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

WPShadow

Gut zu wissen, habe schon alles eingebaut! Sieht super aus!

Danke für die schnelle Hilfe!!!
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est