3-D effects with Normal Mapping

3-D effects with Normal Mapping

A feature known as normal mapping is a workhorse technique for simulating lighting effects in traditional 3-D graphics. We’re repurposing it so this is trivial to do in Corona.

For example, here’s how how you can achieve a point light effect:

All effects have property knobs that you’ll be able to play with. In the point light, one of those knobs is the position of the point light. In the video below, we’re just moving the position in a circle:

walter
20 Comments
  • Greg
    Posted at 07:23h, 28 August

    That looks incredible!

  • Mario Roberti
    Posted at 07:49h, 28 August

    This is what I’m talking about!,,, will we be able to have multiple point lights!? Just checking in case of multiple magic missiles being fired. I might have to attack the darkness!

    🙂
    -Mario

    • FearTec
      Posted at 10:15h, 29 August

      I doubt it being a bump map

  • Pablo Isidro
    Posted at 09:03h, 28 August

    Awesome!!

  • Fan Studio iPhone Game Development UK
    Posted at 10:43h, 28 August

    This is crazy! Can’t wait to get my hand on it!

  • Devin
    Posted at 11:02h, 28 August

    I don’t want to sound like some sour grape but back in May you said about Graphics 2.0::

    “BTW, if you are hankering to get your hands on the new graphics engine, we will be seeding this out to beta testers very soon — possibly as soon as next month!”

    Where “next month” would have been June and the “new graphics engine” is denoted as Graphics 2.0.

    In this post you say “Just a quick preview of what’s coming in the next update of graphics 2.0 that we’ll be seeding out soon to alpha testers.”

    So where does Graphics 2.0 really stand? Is it already being tested with beta testers or not?

    • Walter
      Posted at 11:19h, 28 August

      We’ve already seeded out to select developers — see my earlier post: https://www.coronalabs.com/blog/2013/08/07/corona-update-graphics-2-0/

      And what I was referring to was that a new update to those developers will be available soon.

      In terms of a more open beta, I alluded to this in my earlier post, but specifically we’ve chosen to delay it so that we are free to change things like API’s.

      • louis roy
        Posted at 15:48h, 29 August

        Dear Walter,

        Do you know when Bluetooth control will be available for the Iphone and Android platform ( for machine control …like Robots..etc… bluetooth enabled )

        Thanks,

  • Chase Morell
    Posted at 11:48h, 28 August

    Will Graphics 2.0 be available for the corona starter edition(aka free version)???

    • David
      Posted at 12:31h, 28 August

      Chase – some of the features will be available to Starters, but many only to Pros. The final list is still being figured out.

  • Devin
    Posted at 13:38h, 28 August

    Thank you Walter for the clarification!

  • Cleverson
    Posted at 13:41h, 28 August
  • Owen Yang
    Posted at 21:59h, 28 August

    increditable!!!

  • Jay Patel
    Posted at 00:21h, 29 August

    Awesome video, 3D graphics is the great technology. It is very useful for web design and game developers.

  • Thomas
    Posted at 06:53h, 29 August

    While I appreciate the effort to keep things simple, at some point I feel like I should just have direct control, a bit like this:

    local lux = display.newPointLight(color, intensity, x-position, y-position, z-position)

    And then have a z-position property for image. I know I’m oversimplifying here, but there comes a point where you start to stifle too much power under the hood for me. Of course I’m the type of guy that uses the openAL hooks instead of the Corona sound engine…

    • Walter
      Posted at 09:22h, 29 August

      Actually, you will get a lot more than I showed, but since you asked.

      The first thing you get is sensible defaults chosen for you.

      On top of that, you’ll be able to control the the effect properties. For the point light, it would look something like:

      local effect = object.fill.effect
      effect.pointLightColor = { r, g, b, a }
      effect.pointLightPos = { x, y, z }
      effect.ambientLightIntensity = 0.3 — value from 0 to 1
      effect.attenuationFactors = { a, b, c }

  • Paolo
    Posted at 10:12h, 29 August

    This will come in handy in my current project… Do you think I will be able to somehow emulate some shadow casting as well?

  • David Wallin
    Posted at 10:20h, 29 August

    Looks awesome! Really looking forward to graphics 2.0

  • Theo Rushin Jr
    Posted at 12:21h, 29 August

    WOW!! Bring it on!

  • Gianmichele
    Posted at 16:28h, 30 August

    Wth Graphic 2.0 are we also going to get export to desktop systems?