Author Topic: Generating a Procedural Normal Map  (Read 7168 times)

2016-02-09, 23:10:20

phildavis17

  • Active Users
  • **
  • Posts: 15
    • View Profile
Hello,

When I need to render a material with a subtle sparkle, I do it by using the technique described in the Corona Car Paint tutorial embedded below. I rendered out a normal map using a plane and some rotated scatter objects.

I was wondering, though, if it is possible to generate a procedural version of this kind of normal map. Generating a random RGB value is easy enough, but I'm not sure how to generate an RGB value that is within the specific color domain of a normal map. I have been working on it a little, but I haven't gotten a good result. My vector math is pretty rusty and I have never tried to do anything so precise in the Max Material editor before, so I thought I'd ask for some guidance.

How would you do it?


2016-02-09, 23:46:26
Reply #1

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
if you know math, it is really easy:

1) have a surface. Rotate it so its geometry normal points UP in Z direction (its geometry normal is 0 0 1)
2) take your shading normal on this rotated object (which is 0 0 1 if there is no deviation, or something else if there is some deviation, but it will always have positive Z component)
3) take the 3 numbers of your shading normal, divide divide them by 2, and add 0.5
4) write those 3 numbers as RGB into the normal map
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2016-02-10, 02:53:48
Reply #2

arqrenderz

  • Active Users
  • **
  • Posts: 1076
  • https://www.behance.net/Arqrenderz1
    • View Profile
    • arqrenderz
Lool didnt understand a single thing :P

2016-02-10, 03:05:27
Reply #3

Juraj

  • Active Users
  • **
  • Posts: 4815
    • View Profile
    • studio website
Lool didnt understand a single thing :P

yeah :- D what we need is those pretty stochastic speckles Vray implemented in 3.3.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2016-02-10, 09:42:54
Reply #4

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9276
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I think this topic might be a good place to ask: Ondra, do you have plans to bring OSL support into Corona and if so, do you have a rough estimate when that might happen?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2016-02-10, 14:23:35
Reply #5

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
I think this topic might be a good place to ask: Ondra, do you have plans to bring OSL support into Corona and if so, do you have a rough estimate when that might happen?
this is from the "doable, but not currently scheduled" bucket
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2016-02-10, 14:27:25
Reply #6

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13722
  • Marcin
    • View Profile
My (pretty lame) attempt:
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2016-02-10, 14:36:46
Reply #7

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9276
  • Let's move this topic, shall we?
    • View Profile
    • My Models
this is from the "doable, but not currently scheduled" bucket
At least it's not rulled out completely. Thank you!
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures