October 21, 2017, 02:05:39 AM

Author Topic: Shadows on Engine Gear3D.  (Read 125 times)

Offline Yue

  • Full Member
  • ***
  • Posts: 146
    • Gear3D Engine Easy Scripting
Shadows on Engine Gear3D.
« on: October 01, 2017, 03:54:37 AM »
  :P
Gear3D Engine Easy Scripting http://www.gear3d.ga

Offline Rooster

  • Sr. Member
  • ****
  • Posts: 256
  • I don't know what this does...
    • http://shadowraptor15.deviantart.com/
Re: Shadows on Engine Gear3D.
« Reply #1 on: October 01, 2017, 04:04:45 AM »
Looks good Yue. ;)

Offline Yue

  • Full Member
  • ***
  • Posts: 146
    • Gear3D Engine Easy Scripting
Re: Shadows on Engine Gear3D.
« Reply #2 on: October 01, 2017, 04:35:17 AM »
Script For Lua Engine Gear3D.
Code: [Select]
--*****************************************
-- Proyecto : Sombras.
-- Scripter : Yue Rexie.
-- Fichero  : Main.lua
-- Notas    : Fichero principal de script.
--*****************************************   

G3D(800,600) -- Comando Obligatorio.
SOMBRAS = Verdadero
function Inicio()
       
camara = CrearCamara()
RotarEntidad ( camara, 30, 0, 0 )
CamaraColor( camara,25, 158, 218)
CamaraSombras( camara )
PosicionEntidad( camara, 0, 0, -10 )
--LuzAmbiente(200, 200, 200 )
sol = CrearSol()
        RotarEntidad ( sol, 45, 45, 0 )
LuzSombra( sol )         

cubo = CrearCubo()
ColorEntidad( cubo,  255, 0, 0 )
PosicionEntidad( cubo, 0, -4, 3.5 )
--AlfaEntidad( cubo, 0.5 )

player = CargarMalla("Modelos/Yue.b3d")
PosicionEntidad( player, 0, -6.5, 0 )
RotarEntidad( player, 0, -180, 0 )

suelo = CrearCubo()
EscalarEntidad( suelo, 5, 0.5, 5 )
PosicionEntidad( suelo, 0, -7, 0 )
       
traSuelo = CargarTextura( "Texturas/Suelo.jpg", BANDERA_MIPMAPA)
EscalarTextura( traSuelo, 0.25, 0.25 )
TexturaEntidad( suelo,traSuelo )
EntidadEmiteSombra( suelo, sol )
SombrasDifusas()  -- Se establecen sombras difumadas.

piramide = CrearCono(4)
PosicionEntidad( piramide, -2, -4, 0 )

ColorEntidad( piramide, 255, 128, 64 )


cilindro = CrearCilindro( 4 )
PosicionEntidad( cilindro, 0, -4, -2 )
EscalarEntidad( cilindro, 0.5, 2, 0.5 )
ColorEntidad( cilindro, 255, 0, 128 )

esfera  = CrearEsfera( 4 )
PosicionEntidad( esfera, 3, -4, 0 )
ColorEntidad( esfera, 255, 255, 0 )


end

-- FunciĆ³n Dibujar.
function Dibujar()

Texto ( EntidadDistancia( camara, player ), 20, 20 )

     
end

-- Se actualiza el juego.
function Actualizar()
   

GirarEntidad(  cubo, 1, -1, 1 )
GirarEntidad(  piramide, -1, 1, 1 )
GirarEntidad(  cilindro, -1, -1, 0 )
GirarEntidad(  esfera, -1, -1, -1 )

if( TeclaPres( TECLA_S)==Verdadero ) then

MoverEntidad( camara, 0, 0, -0.1 )

end

if ( TeclaPres( TECLA_W) == Verdadero ) then


MoverEntidad( camara, 0, 0, 0.1 )
end
   


end


Gear3D Engine Easy Scripting http://www.gear3d.ga

Offline iWasAdam

  • Jr. Member
  • **
  • Posts: 22
Re: Shadows on Engine Gear3D.
« Reply #3 on: October 13, 2017, 07:46:03 AM »
I'm really impressed by this. Estoy muy,muy bien amigo.
The language is clear and simple and the website the same with simple code for EVERY command (Mark would do good to see this).

The final render also look very nice, especially the shadows ;)

Offline MikeHart

  • Sr. Member
  • ****
  • Posts: 340
Re: Shadows on Engine Gear3D.
« Reply #4 on: October 13, 2017, 08:55:17 AM »
Yes, the site is looking good. As I only speak german and english, I can't understand the content of the site.