V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
Livid
V2EX  ›  Python

一个用 Python 实现的光线追踪渲染

  •  3
     
  •   Livid · 2019-04-03 15:36:42 +08:00 · 7275 次点击
    这是一个创建于 1821 天前的主题,其中的信息可能已经有所发展或是发生改变。
    https://excamera.com/sphinx/article-ray.html

    https://github.com/jamesbowman/raytrace/blob/master/rt3.py

    关于光线追踪渲染的原理,Disney 的这个解说动画讲得很清楚:

    14 条回复    2019-07-12 06:59:07 +08:00
    blacklinux
        1
    blacklinux  
       2019-04-03 15:52:46 +08:00
    wow 这个有点意思啊
    KevinBu
        2
    KevinBu  
       2019-04-03 17:55:14 +08:00
    还需要翻墙🤔
    jmc891205
        3
    jmc891205  
       2019-04-03 18:38:31 +08:00 via iPhone
    python 实现?性能怎么样?
    xiaket
        4
    xiaket  
       2019-04-03 18:49:17 +08:00
    numpy, 还是 C 的
    but0n
        5
    but0n  
       2019-04-03 22:01:54 +08:00
    这里有一个很有趣的教程
    用 RayMarching 实现的 RayMarching tutorial:
    https://www.shadertoy.com/view/4dSfRc
    ptrees
        6
    ptrees  
       2019-04-04 12:34:01 +08:00
    哎感觉研究这些东西才是真的有意思...
    Livid
        7
    Livid  
    MOD
    OP
       2019-04-04 12:59:24 +08:00   ❤️ 1
    @ptrees 是啊。有时候我也觉得自己可能之前把技能树点错了。希望能多有一些时间去研究一些更纯粹的技术问题。
    sosilver
        8
    sosilver  
       2019-04-04 13:21:42 +08:00 via Android
    @ptrees 可以看看 Peter Shirley 的 ray tracing in one weekend
    allen0125
        9
    allen0125  
       2019-04-04 13:27:03 +08:00
    想买显卡,扩充下技能了。
    tony601818
        10
    tony601818  
       2019-04-04 13:27:12 +08:00
    @jmc891205
    原文:But this version is slightly smaller and renders the same image in about 115 milliseconds.

    原文里都在讲优化的方法。
    xXDyO
        11
    xXDyO  
       2019-04-04 13:33:34 +08:00
    妈耶 想学习学习
    iskyzh
        12
    iskyzh  
       2019-04-05 16:20:05 +08:00
    @sosilver 之前照着那本书用 Rust 实现了一个 https://github.com/skyzh/raytracer.rs
    JohnBown
        13
    JohnBown  
       2019-04-21 12:20:57 +08:00
    用 Python 写光线追踪,你是有多么想不开。
    dafengchui
        14
    dafengchui  
       2019-07-12 06:59:07 +08:00
    @Livid 谢谢这个视频,启发很深刻. 因为最近朋友开发的应用,基本失败,正在给他整理思路,用 python,基本框架流程列出来了,某个关键功能需要算法,晚几天会在这里发外包需求,希望可以遇到有算法好的 V 友.

    Github 上最近也看了很多视觉识别的 repo,正在吸纳整理中,都会在需求中体现.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3304 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 11:28 · PVG 19:28 · LAX 04:28 · JFK 07:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.