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

Fake volumetric lights

<< < (3/4) > >>

robert:

--- Quote from: K24A3 on October 11, 2012, 02:07:25 pm ---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.

--- End quote ---

I have been using Blender for years occassionally, but I'm far from being an expert :) How do you apply a texture to both sides of a mesh using the UV editor ? When you unwrap a mesh it is unwrapped on one side only  ???

K24A3:
I must agree it was a battle learning even the basics of Blender.

jPCT doesn't support dual sided polygon textures (which is good in a way, keeps things simple) so you will need to solidify the object as mentioned. Rather than copy the outer texture co-ordinates to the inner faces, you would want to simply apply white to the inside to mimic the light volume. You do this by selecting all the inner faces and either apply a white material from the materials menu on the right, or hop into texture mode, load up your texture, select a portion of the texture that contains white, then wrap that portion to the polygons you have selected. It's not easy to do so I wont go into it in detail, but there are plenty of video guides on youtube that will get you started.

robert:

--- Quote from: K24A3 on October 11, 2012, 02:24:53 pm ---I must agree it was a battle learning even the basics of Blender.

jPCT doesn't support dual sided polygon textures (which is good in a way, keeps things simple) so you will need to solidify the object as mentioned. Rather than copy the outer texture co-ordinates to the inner faces, you would want to simply apply white to the inside to mimic the light volume. You do this by selecting all the inner faces and either apply a white material from the materials menu on the right, or hop into texture mode, load up your texture, select a portion of the texture that contains white, then wrap that portion to the polygons you have selected. It's not easy to do so I wont go into it in detail, but there are plenty of video guides on youtube that will get you started.

--- End quote ---

Thank you.

K24A3:
No probs. If you want a glow effect as well you could experiment with a simple transparent plane centered near the front-center of the pumpkin with a 32bit (RGBA) texture that fades out from the middle. Beyond that you would need to use shaders, i.e. if you wanted a fancy glow extruding out of the pumpkin.

robert:

--- Quote from: K24A3 on October 11, 2012, 03:20:20 pm ---No probs. If you want a glow effect as well you could experiment with a simple transparent plane centered near the front-center of the pumpkin with a 32bit (RGBA) texture that fades out from the middle. Beyond that you would need to use shaders, i.e. if you wanted a fancy glow extruding out of the pumpkin.

--- End quote ---

Hey K24A3, better than using a plane, I think I'm going to use 2 textures, the base one and one for the glow. Then I'll turn up and down the opacity of the glow texture. I got the idea from here: http://www.purebasic.fr/english/viewtopic.php?f=16&t=46130

What do you think ?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version