Coder Social home page Coder Social logo

Request: Parallax Mapping about upbge HOT 18 CLOSED

upbge avatar upbge commented on June 5, 2024
Request: Parallax Mapping

from upbge.

Comments (18)

DCubix avatar DCubix commented on June 5, 2024

Also here and here

I think I can try to implement this. It's not that difficult 👍

from upbge.

carlo697 avatar carlo697 commented on June 5, 2024

1+ For this to be added, mainly the firsts techniques added can be: parallax mapping and steep parallax mapping, and maybe later can be added: parallax occlusion mapping and/or relief rarallax mapping.

It would be good that KX_BlenderMaterial have an attribute to enable/disable the parallax (material.parallaxMapping=bool) and other one for the number of steps (material.parallaxSteps=int), but this can be added later.

from upbge.

lordloki avatar lordloki commented on June 5, 2024

There was a patch by angelo miner:
http://www.mediafire.com/download/ppdb4xu29439fnp/parallaxpatchweblfile.zip
https://www.youtube.com/watch?v=ecrbXbzF45w

from upbge.

Akira1San avatar Akira1San commented on June 5, 2024

Thats awesome.

from upbge.

youle31 avatar youle31 commented on June 5, 2024

Thanks Lordloki for the link :)

from upbge.

Akira1San avatar Akira1San commented on June 5, 2024

Parallax Mapping with Offset Limiting: A Per-Pixel Approximation of Uneven Surfaces -> https://github.com/marcusstenbeck/tncg14-parallax-mapping
Looks useful with example files and a pdf doc.

from upbge.

youle31 avatar youle31 commented on June 5, 2024

I updated the patch from angelo. Thanks very much Lordloki. http://www.pasteall.org/pic/97582
I'll try to contact him to ask his permission to commit that in upbge.

from upbge.

lordloki avatar lordloki commented on June 5, 2024

Hi youle,

I think it is not necessary to ask for his permission. It was a public patch over a GPL code -> automatically the patch is GPL. I think it would be enough giving him credit in the commit and/or the code.

from upbge.

Akira1San avatar Akira1San commented on June 5, 2024

Cool image. I have a question. Does the Parallax have any kind of lod?

from upbge.

youle31 avatar youle31 commented on June 5, 2024

@lordloki: Hi, actually, I think we'll try to contact angelo, because his patch works great with his example file, but I don't know how to reproduce nice normal maps with alpha (in his patch, height for parallax is stored in normal texture alpha channel). TwisterGE is working on this :)

@Akira1San: No for the moment, there is no such feature... I don't know if we can do this (decrease parallax steps according to distance camera>object? I don't know if the render would be nice...)

from upbge.

Akira1San avatar Akira1San commented on June 5, 2024

In this pdf -> http://developer.amd.com/wordpress/media/2012/10/Tatarchuk-ParallaxOcclusionMapping-Sketch-print.pdf
"We determine the current mip map level directly in the pixel shader and use this information to transition between different levels of detail from the full effect to simple normal mapping. We render the lowest level of details using regular normal mapping shading. As the surface approaches the viewer, we increase the sampling rate for the full parallax occlusion mapping computation as a function of the current mip level. We specify an artist-directable threshold level where the transition between the parallax occlusion mapping and the normal mapping computations will occur."
I guess this lod system is for fps/tps games.

from upbge.

youle31 avatar youle31 commented on June 5, 2024

@Akira1San: Sounds complex :)

http://www.pasteall.org/pic/97711 (once we get the technique to create appropriate normal maps with gimp, we can get some good results. Not perfect for the moment hehe)

from upbge.

panzergame avatar panzergame commented on June 5, 2024

If you want to test the parallax feature, compile UPBGE on ge_parallax branch.

from upbge.

Akira1San avatar Akira1San commented on June 5, 2024

Why does the texture have to be with alpha channel?

from upbge.

youle31 avatar youle31 commented on June 5, 2024

The height/depth is encoded in normal map alpha channel. The shader reads alpha value to set texture height.

from upbge.

panzergame avatar panzergame commented on June 5, 2024

Done : 3c673aa and 248743c. Some tutorials are coming soon.

from upbge.

angjminer avatar angjminer commented on June 5, 2024

sorry for being a year late, but nice. glad to see someone getting use/inspiration out of something i did...

from upbge.

youle31 avatar youle31 commented on June 5, 2024

@angjminer : Thanks very much for your work! It's @lordloki who showed to us your work. I remember the first time we had it working (it was in our 2.76 branch), that was great :)

from upbge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.