jPCT-AE - a 3d engine for Android > Support

Fake volumetric lights

<< < (2/4) > >>

EgonOlsen:
Something like a...missing image...?

K24A3:
You could cheat and change the texture of the inside of that pumpkin, make the inside colors pure white so it appears lit up.

Additionally, you could separate the inside and outside of the 3D pumpkin object and setAdditionalLighting(200,200,200) to the inner Object3D. Or perhaps pop a small hardware Light in the center.

robert:

--- Quote from: EgonOlsen on October 11, 2012, 11:16:49 am ---Something like a...missing image...?

--- End quote ---

I don't know what happened, the image was shown the first time I put it. Anyway, what I want to achieve is the lighting of the inside of a halloween pumpkin.

robert:

--- Quote from: K24A3 on October 11, 2012, 11:52:44 am ---You could cheat and change the texture of the inside of that pumpkin, make the inside colors pure white so it appears lit up.

Additionally, you could separate the inside and outside of the 3D pumpkin object and setAdditionalLighting(200,200,200) to the inner Object3D. Or perhaps pop a small hardware Light in the center.

--- End quote ---

I will try your first method, but I'm afraid I'll need two pumpkins because as far as I know, a texture can't be mapped to both sides of a mesh. The downside of this method is that I won't get a "glow" effect.

About the second method... what do you mean a hardware Light ? a light done with fragment shaders ?

K24A3:
You wont need two pumpkins, 3D modelling programs like blender allow you to select all the vertices and extend them inwards, effectively creating a complete 3D object with both inner and outer walls. Once that is done, apply a white part of the texture to the inner faces.

OpenGL hardware typically have 8 hardware lights you can use. Refer to the "Light" class in jPCT, set it's position to the center of the pumpkin to light it up. You could use shaders but it can be a steep learning curve if you are just starting to use OpenGL.

...Edit: Well actually yes you could use two pumpkins and invert the faces of the inner one and apply a bright texture to it, but you may run into visible artifacts or 'jaggies' at the edges of the objects if they are too close in 3D space.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version