所有由Baixuan发布的文章

这周五,也就是四天后,我将迎来一次预答辩。
这一个月以来的写作状态有好有坏,灵感来了的时候4小时1k字毫无压力,心神不宁时三天没有进展的情形也出现过。
不如来总结一下一年来的状态吧。

8月份完成UCC的毕业论文后,9月份回国恢复学籍、重新选课、跟着下一届的专业课程学习,由于课程开设较少,选择面窄,所以也选了很多不同方向的课程以补足学分。
【文化经济方向】神奇地进入了综艺节目拍摄团队中做了一次Follow PD(跟随选手的导演,负责一切与该选手相关的拍摄、记录工作,需要对导演组的大BOSS负责);
【景观方向】从公共艺术的专业视角对家乡的一个市中心绿地广场做了规划设计,课下调研海绵城市的含义与相关案例、具体做法,发现美国、英国、德国、新西兰、澳大利亚、中国各自因为气候和城市现状而采取了不同的执行策略;
【影视】课程本身比较水,大多数时间在帮老师无偿做项目、加特效、画分镜,写了个批判网瘾治疗的剧本,结果引发了老师的一番感慨(然而并不意味着剧本适合拍摄),最终确定用了一个极为狗血的校园爱情剧本,女生人设有点绿茶,男生殷勤追妹子反被耍,表白失败,发现一切不过是一场赌局。拍摄中最有趣的大概就是认真敬业的拍摄态度吧,最终场的阳台泼水戏居然刚刚好遇到了瓢泼大雨,演员也豁出去了,结结实实没打伞地被淋了一波雨和一盆水,当时两台相机和两架灯都是重点保护对象,大家宁愿自己被淋湿,把伞都让给了设备,毕竟是租的,为了节省租金,编剧同学连夜打车去还的设备。
忙中还穿插着投简历、参加宣讲会、笔试、面试,到了国庆,发现自己生病了,感觉变成了一只气球,被戳了一根针的那种。
十、十一月老老实实忙课程作业、期刊论文,转眼到了十二月,学油画、继续看论文,突然又要开始毕业论文的第二波挑战,有时想想,宁愿一直紧张下去,也别闲下来太久啦~

总体来说2017年的各种愿望都实现了呢,UCC的Digital Humanities文学硕士拿到了First Honor Degree,英国玩了最想去的几个城市,在Galway Girl的旋律中和Galway相遇,想要见的朋友小聚过,得到了羊城暑期实习三个月的回忆,离开爱尔兰前入手了Nintendo Switch,跨年前的那一天在高铁上通关了Zelda荒野之息,参加了一次独立游戏开发者的线下活动,一次非常靠谱的游戏展,并在展上被游研社的展台成功安利ARMS……细数起来这一整年超级充实。

加油ヾ(◍°∇°◍)ノ゙
还希望学会更多更多的知识,希望能够学一辈子。

想达成目标,需要有自我驱动力。
学生时代,从最开始义务教育阶段的懵懂,到后面中学,尤其是高中,被成绩单驱动,再到高等教育,逐渐了解成绩代表不了太多,高GPA能带来很多惊喜,但更重要的是你在这段经历中得到了什么,汲取到的知识是否今后能用上,学习和实践中有没有感受到愉悦。
临近毕业,这段时光也让我一边恐慌一遍自我鞭策,没有人再给我提供一个可以一步一步学习的教程了,有些事情想要模仿都要自己一点点猜测和推理。
大胆地去尝试吧!

最近对TA岗位进行思考和自我定位,看了很多招聘要求、TA发的文章,也和游戏公司里的朋友们聊了一些感受。

总体来说,以目前的认知,国内的游戏公司TA岗位需求的是这样的人:
1、根据技术需求和团队构成,灵活发挥自身能力、在高强度状态下把业界前沿技术融会贯通,提取能够协助项目研发的技术,将其融入工作流程,实现此前无法达成或代价过高的渲染效果,该过程包括但不限于对前沿学术成果的重复验证、同类游戏的反编译、推演等;
2、优化美术制作流程,深入了解美术流程中的痛点,将枯燥繁复的操作总结为可程序化处理的解决流程,扩展开发引擎和建模软件,提升美术工作效率;
3、掌握性能检测方法,在保证画质效果不大幅下跌的前提下,多途径优化游戏运行性能;
4、要对于开发流程、美术制作中的各个步骤有宏观的认识,遇到技术难题可以及时定位问题发生的点,保持和美术、程序的顺畅沟通,共同协调解决。

具体到某一个开发组,工作内容可能受到项目人员组成、整体技能树的影响。包括偏美术流程向的,进一步见过一个岗位要求对特效有细致的研究,对ARPG有一定经验,这些都难以作为统一的资质参考,但说明一件事,这是个极为灵活多变的岗位,在职人员也要不断调整自我的定位,做团队里的枢纽。不过说实在的,除了精准细分的一些螺丝钉岗位,大部分工作也都有这种特点。

creativeskillset所列的TA资质要求非常详细,可以作为一个参考,里面到时有不少英国相关业界的资料链接。
http://creativeskillset.org/job_roles/339_technical_artist_games

Daniel Eagle 是一位修读了纯艺术和信息系统学位的TA,他分享了自己的学习历程和职业发展路线,以便帮助感兴趣的新人入行。其中一章名为The Reality of Trying to Do Both (两全其美的真相),翻译如下:

现实是你必须选择两者之中的一个去做到专业水准。据我所知,唯一能够包含两者(技术和艺术)的工作就是技术美术了,这份工作在我看来由三成的软件工程师和七成的三维美术组成,但这一观点欢迎大家探讨。而且,牢记于心一点,一个技术美术并不是要做网络开发或者某一种特定的软件开发工作,而是专注创建程序或代码以满足开发流水线的需求,最终产出电影、商业广告或游戏。
此外,你可以去一个游戏开发工作室当一名软件工程师,或者甚至在游戏行业之外,在谷歌做有趣而酷炫的网络科技开发。但最重要的是大多数公司业务会分离不同的岗位职责,你不会有机会在同一时间做艺术和技术的并行工作。你必须选择一个,除非你能找到一个方法把自己克隆了。在这种前提下你才能同时成为一个软件工程师和一个三维艺术家。
所以如果你想要以软件工程作为主要职业生涯目标,那么你必须重新定位。那些希望自身职业完全是为了乐趣而编程的人,或者是为了为了润色你的技能,那么这个文章可能对于你有意义。然而,记住一点,这个文章说的并不是一个万用的职业发展路线,也不一定匹配你的个人情况。
事实上,你当然可以两个方面一起抓,但其中一个应该成为你职业生涯的依仗,或者满足你个人的需求。这个意识很重要,可以让你继续前行、重新定位调整自我,给感兴趣的领域分配合适的时间。
首先要理解的是,乍一看来三维艺术、软件工程和编码的混合世界似乎很令人畏惧。我的个人意见是,一旦你搞定了,这事儿就不再吓人。
关键取决于一种可以自学任何技能的心态。这段旅途可能漫长无边,但你终将会进入一个满是机遇的职业领域,拥有机会挣得一个美好的生活,带着广阔的工作机会。另外,记住一点,如果你享受三维艺术的话,没必要放弃它,但是考量好你的精力分配。
我总结了成为软件工程师的五个简单步骤,每个都同等地重要,我可以很有信心地说,如果你跟着建议走,不放弃,会成功的。也要记住,计算机专业的科班出身超级吃香,以下步骤更多是为独立自学者量身定做的。

1 建立一个训练计划
一开始总是很难找到从哪开始。你们中的很多人可能会业余做这些,所以课堂学习可能并不可行。我成功的经验是通过视频和阅读书籍学习。创建一个计划表格,按顺序对你的训练计划进行排期,并对未来进行规划。保持记录你在各个学习任务上花费的时间、是否坚持不懈、完成每一项。下面是一个编程训练计划的样本,你可以藉此开始。

2 视频学习训练

3 书籍阅读相关训练

4 超越基础

5 保持记录并对未来打算

6 合理分配精力

7 准备你的作品集,将所学知识进行实践

8 精简你的简历

9 行动,不放弃

10 业余继续做三维艺术

11 有助于工作的工具

————————————以下是还没翻译完毕的分割线————————————
Video Training

Pluralsight has a section titled Beginner Programming which has a ton of courses. I highly recommend Pluralsight and you will find an amazing amount of content there on a wide variety of topics. It’s top-notch video training and the entry price of roughly $30/month to access it is very reasonable for the type of education you’re getting in return. Alternatively, I found Lynda.com training to be helpful as well.

Ultimately you will need to start somewhere and that means choosing a programming language. In truth, knowing a programming language will not make you a good programmer but rather understanding good programming concepts and the basics of Object Oriented Programming will. Pick a good object oriented language such as C++, C#, or Java as your beginning language and you’ll be able to transition to one of the others rather easily. But start with one language and learn it rather well before tackling another or you may end up getting too mixed up in language specific nuances. If you decide upon wanting to learn game programming then I highly recommend C++ be your starting point. It’s a harder language of the three I listed but that didn’t stop me or nor should it stop you.

Book Training

Depending upon what language you chose, some great books exist on the market that can help in your learning journey. If you chose C++ then I recommend Beginning C++ Through Game Programming. This was one of the very first books I picked up for C++ and it helped me learn the basics very fast and through awesome examples pertaining to games. These were console based games and nothing fancy but was still fun nonetheless.

If you chose C# then I recommend Beginning C# Object-Oriented Programming. It goes through the basics of C# and you build an application throughout the book so it allows you to practice and reinforce your learning.

In addition, if you decide to learn Java then I suggest Java: A Beginner’s Guide. Remember, no matter which language you pick it doesn’t hurt to research the different books out there by reading reviews and browsing through the table of contents but the ones I’ve listed here should get you started.

Finally, a book I recommend no matter which language you choose is Code Complete, Second Edition. This book is quite amazing and gives you the type of knowledge you would pick up over time through the work place such as tips from coworkers, trial and error, and industry best-practices. It helps you understand how to write software professionally and efficiently. Trust me when I say you’ll make many mistakes of how you organize your code, write your routines, and create your objects. This book will help you work out the kinks and become exceptional in the field of Software Engineering.

Beyond the Basics

After you get the basics down you may want to focus more on a certain technology or type of application. This could be web applications, games, or desktop applications. There is definitely more beyond that but picking an area of interest will allow you to explore the different technologies applicable to it. For example, I create a lot of web applications using ASP.NET MVC with C# and love working with those technologies. Some folks prefer Ruby on Rails instead but this gives you an idea.

Keep Track and Plan For the Future

Your initial training plan may not have much on it and I would suspect it’s because you have no idea beyond the basics what to add to your list. As you progress you will know what to add. The goal is to always have something to learn and focus on. You need to keep the learning engine running. Often times I find myself learning one subject while practicing another. This industry moves at a rapid pace and you must be willing to keep up. Remember to always keep track of the time spent learning and what items you’ve completed. The sample Programming Training Plan mentioned earlier in this post has a ton of training that may help further guide you as you consider your future learning goals.

Allocate the Right Amount of Time

So now you have a training plan and know where to begin but how much time do you set aside for learning? The answer to that question is going to depend upon you. The demands of life make finding time hard. Working a full-time job, having a wife and kids, etc. are a few examples of things biding for your time. You are going to have to figure out what matters to you the most or make compromises with the people you love. Ultimately, the goal is to find just the right balance and then stick with it.

If you can devote even an hour a day to learning something new for five days a week you will make significant progress. But the more time you commit to learning the more you will gain. Just remember the key is being consistent and sticking to a plan. It’s also important that you don’t devote too much time or you may risk burning yourself out.

Build Your Portfolio (Practice What You Learned)

Many training videos and books have example projects that you can follow along to. I highly recommend doing this. However, I suggest making your project a little bit different or expanding upon it to have some original content. If the Office Ordering application you built from one of your books looks the exact same as the example shown then how can you prove to a potential employer that you didn’t just copy/paste everything? Coming up with original content is extremely important as it shows you can think of an idea from scratch, plan and implement it yourself.

Why not take it a step further and create something that wasn’t based upon an example? Come up with a great idea for something you’d enjoy creating and then plan for and build it. You will learn a great deal and have something tangible to show off later. The key is building your portfolio and giving a potential employer something to play with. I know many hiring managers who’d rather hire someone who can practice what they preach and have something to show for it. Talk is cheap after all.

Nail Down Your Resume

This part probably isn’t on top of everyone’s list of favorite things to do but building a great resume can make a world of a difference. Now keep in mind many employers have resume searching tools which look for keywords, usually based upon the skills they are seeking. When looking for a job I suggest reading the requirements and take note of specific languages or technologies. If you know them and are confident you can deliver using them, ensure your resume has them down.

I suggest keeping your resume short, no more than 2 pages long, and keep everything brief and to the point. When looking for a potential candidate, hiring managers really don’t have time to read your whole resume and usually skim through it. Make everything short but relevant so the good bits pop out quickly. You’d be surprised how many competent people get passed over for jobs based on their resume alone. Remember, this is usually your ticket to an interview (let’s not forget about a good cover letter as well) so make it count.

Since it’s out of the scope of this post, I’m not going to go over each step in creating a great resume and cover letter. I suggest reading some of the links I’ve included at the bottom of this post. There are a ton of great articles out there on this subject.

Apply and Don’t Give Up

It’s showtime. After your resume and cover letter are good to go then it’s time to start firing them off to potential employers. Keep in mind sending a cover letter that isn’t unique and one that could be used as a template is never a good idea. Make your resume and cover letter relevant to the job you are applying for. In other words, personalize it to what your going after.

Also, potential employers are going to ask why you want to work for them so I suggest doing your research. Find out as much as you can about the company you are applying for and their culture. At this point you may not be that picky because you just want to get your foot in the door but I still suggest applying for companies that interest or excite you. It’s really easy to spot a person who isn’t motivated or enthusiastic about where they work or what they’re doing so don’t become one of them. This usually puts you in the fast lane for a workforce reduction or layoff.

Finally, don’t give up! I’m serious about this. It may take time to find a job because of your lack of experience but eventually someone will take notice. Heck, they might even stumble upon your amazing website which was an application you built that figures out how to solve all of your country’s financial problems. You just never know and you should never give up. I recently heard a quote from Jim Carey as he was doing a commencement speech that went like this: “You can fail at what you don’t want, so you might as well do something you love.” You can find the full video of his speech here.

Continuing 3D Art on the Side

So perhaps you finally landed a job in Software Engineering or maybe a job as a Technical Artist doing a little bit of programming. Either way, you may want to continue with 3D art on the side. This is perfectly obtainable but should be considered a hobby. If that isn’t good enough for you I suggest practicing your skills and maybe considering freelance work. You could work on just about anything that utilizes 3D art. But I must say my passion is gaming and that’s where I spend a good chunk of time on the side. From traditional 2D concept art or texturing all the way to 3D modeling and animation. With Epic’s Unreal Engine the sky is the limit so make it count.

I seriously don’t believe that a person who has the brains to code cannot be an artist. It’s a matter of using both sides of the brain. Learning how to draw takes time and practice and you must learn to see things differently. A good book which helped me see in a much different way (helping me avoid symbols from early childhood) is Drawing on the Right Side of the Brain. This is an amazing place to get started but I assume if you are already a 3D artist then this isn’t something that you need to do; but I still see anyone benefiting from the concepts taught in the book.

In order to continue scratching your 3D art/modeling/animation itch, it’s important to setup a schedule just like it was suggested to do for learning to code. This will allow you to remain in control of your life and ensures you are the most successful. It helps to prioritize this way and block out external noise. Having a plan is better than no plan at all.

Helpful Tools For the Job

Visual Studio – This is pretty much the standard IDE for any Windows environment. The professional version can be obtained for free if you are a student via Microsoft’s DreamSpark program. You can also get different Express versions of this IDE from here. They aren’t as feature rich but should be perfect for getting started.
Resharper – This is an amazing Visual Studio plugin which makes everything much easier. You can easily refactor code and even fix coding mistakes. It has a dynamic code analyzer to check for coding mistakes on the fly. You can also navigate your code quickly. At the time of this writing the tool doesn’t support C++ but an early access build does. Expect full C++ support coming in the near future.
Visual Assist X – This is perfect for those using Visual Studio with C++/C# and want a quick way to refactor and work with code. This does most of what Resharper can but without dynamic code analysis.
Code::Blocks – This is an alternate IDE to Visual Studio for C, C++, Fortran and is completely free and open source.
Beyond Compare – If you are working with two text files trying to see where things have changed between them (comparing them) then this is the tool for the job.
Eclipse IDE – Another IDE for Java, C, C++ developers. This is also of great quality and has many plugins. Best of all, it’s totally free.
Notepad++ – This is a simple text editing program but on steroids. You can open multiple files within the same window using its tabbed interface and it also has syntax highlighting.
Microsoft Outlook – I use this program for setting up my training schedule using its awesome calendar and keep track of my tasks using its to-do list.
TortoiseSVN – Having a version/source control system is invaluable in software development. This tool will allow you to create a repository to keep track of all the various changes to your source code.
Update: Most people, including myself, are now using Git over SVN. I suggest moving in that direction for many reasons.

Conclusion

This post covered a lot and certainly isn’t a one-size fits all solution but hopefully the perspectives I’ve given will make your decision easier when it comes to Software Development and 3D Art. You can do both if you choose but being realistic is the key to success. You have to properly zone in on your goals and setup a plan to gain success. You can do it and being positive and optimistic will only support you in your journey.

原文链接:https://danieleagle.com/2014/07/3d-artist-to-software-engineer/

应用jQuery实现点击阅读更多功能

[scfc id=”1″ title=”标题啦啦啦”]内容是这里 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud [/scfc]

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
继续阅读

游戏开发手札1

简单尝试了一下Low Poly风格的建模,搭建基础场景。

3dsmax 2012里建模、调整材质、UVW贴图展开、合并材质球。

Unity里把重复场景素材如树木等制成prefab,添加碰撞体。

待办:

  1. 目前场景里还是有很多多余的面,实际游戏里并不会探索到的区域需要减少面数,降低精度;
  2. 确定场景搭配后,将所有组件的贴图合并成单张UV贴图;
  3. 斟酌配色;
  4. 考虑第一人称VS第三人称的选择;
  5. 尝试使用Unreal、Maya、Blender、C4D等其他工具,进行横向对比

Lost Admin Privileges – Getting WordPress Admin Access Back « Tips and Tricks HQ Forum
http://www.tipsandtricks-hq.com/forum/topic/lost-admin-privileges-getting-wordpress-admin-access-back

Beginner’s Guide to Fixing Your Hacked WordPress Site
http://www.wpbeginner.com/beginners-guide/beginners-step-step-guide-fixing-hacked-wordpress-site/

How I Cleaned Up My WordPress Site After It Was Hacked and Blacklisted – WPMU DEV

How I Cleaned Up My WordPress Site After It Was Hacked and Blacklisted

What To Do When You Are Locked Out of WordPress Admin (wp-admin)
http://www.wpbeginner.com/wp-tutorials/locked-out-of-wordpress-admin/

How to Add an Admin User to the WordPress Database via MySQL
http://www.wpbeginner.com/wp-tutorials/how-to-add-an-admin-user-to-the-wordpress-database-via-mysql/

 

黑客的攻击手段

How to find a backdoor in a hacked WordPress » Otto on WordPress
http://ottopress.com/2009/hacked-wordpress-backdoors/

 

看技术博客发现了一个蛮有趣的js程序,似乎可以加到博客里,方便展示代码。

http://alexgorbatchev.com/SyntaxHighlighter/

挖个坑待续。

 

A GIMP Python plugin that auto-generates a poster with any 5 images

 

#!/usr/bin/env python

# GIMP Python
# This plugin will create a A4 size, 300dpi poster with 5 images and some texts.

import os
from gimpfu import *

def poster(file0, file1, file2, file3, file4, font1, font2, savePath, posterName):

# create an empty image
posterWidth = 2480
posterHeight = 3508
width = 1000
height = 1000
bgHeight = 960
posterImage = gimp.Image(posterWidth, posterHeight, RGB)
gimp.Display(posterImage)

# load background image and the 4 images related with theme
bg1 = pdb.file_jpeg_load(file0, file0)
image0 = pdb.file_jpeg_load(file1, file1)
image1 = pdb.file_jpeg_load(file2, file2)
image2 = pdb.file_jpeg_load(file3, file3)
image3 = pdb.file_jpeg_load(file4, file4)
image4 = image3

# resize the 4 images
pdb.gimp_image_resize(bg1, posterWidth, bgHeight, 0, 0)
pdb.gimp_image_resize(image0, width, height, 0, 0)
pdb.gimp_image_resize(image1, width, height, 0, 0)
pdb.gimp_image_resize(image2, width, height, 0, 0)
pdb.gimp_image_resize(image3, width, height, 0, 0)

# create background layer and fill it with white
layerbg = gimp.Layer(posterImage, “Layer Back”, posterWidth, posterHeight, RGB_IMAGE, 100, NORMAL_MODE)
posterImage.add_layer(layerbg, 0)
gimp.set_background(255, 255, 255)
pdb.gimp_edit_fill(layerbg, BACKGROUND_FILL)
#pdb.gimp_edit_fill(layerbg, WHITE_FILL)

# make background blurred image layer for title
radius = 50.0
layerbg1 = gimp.Layer(posterImage, “Title Background”, posterWidth, posterHeight/3, RGBA_IMAGE, 100, NORMAL_MODE)
posterImage.add_layer(layerbg1, 0)
pdb.gimp_edit_copy(bg1.layers[0])
layerbg1.update(0, 0, posterWidth, bgHeight)
layerbg1.translate(0,-120)
layerbg1 = pdb.gimp_edit_paste(layerbg1, True)
pdb.plug_in_gauss( bg1, layerbg1, radius, radius, 1)

# make background blurred image layer for reasons
layerbg2 = gimp.Layer(posterImage, “Reason Background”, posterWidth, posterHeight/3, RGBA_IMAGE, 100, NORMAL_MODE)
posterImage.add_layer(layerbg2, 0)
pdb.gimp_edit_copy(bg1.layers[0])
layerbg2.update(0, 0, posterWidth, bgHeight)
layerbg2.translate(0,posterHeight-bgHeight)
layerbg2 = pdb.gimp_edit_paste(layerbg2, True)
layerbg2 = pdb.gimp_item_transform_flip_simple (layerbg2, 1, True, 500)
layerbg2.translate(0,490)
pdb.plug_in_gauss( bg1, layerbg2, radius, radius, 1)
#layerbg2 = pdb.gimp_image_flip(layerbg2, 1.0, 500.0, 2000.0, 500.0)
#layerbg2 = pdb.gimp_item_transform_flip(layerbg2, ORIENTATION_HORIZONTAL)

# add title
font = ‘Impact’
size = 206
str1 = “WHY AUTUMN IS THE BEST”
str2 = “SEASON”
str3 = “It’s colorful. It’s a season of joy”
gimp.set_foreground((255, 255, 255)) # set color to white
layertxt1 = pdb.gimp_text_fontname(posterImage, None, 240, 240, str1, 10, True, size, PIXELS, font)
layertxt2 = pdb.gimp_text_fontname(posterImage, None, posterWidth/3+110, 480, str2, 10, True, size, PIXELS, font)
layertxt3 = pdb.gimp_text_fontname(posterImage, None, posterWidth/3-220, posterHeight-240, str3, 10, True, size/2, PIXELS, font)
# add content texts
str4 = “Blooming”
str5 = “Passionate”
str6 = “Harvest”
str7 = “Cosy”
font2 = ‘Agency FB’
gimp.set_foreground((50, 50, 50)) # set color to dark grey
layerstr4 = pdb.gimp_text_fontname(posterImage, None, 320, 2440, str4, 2, True, size/2, PIXELS, font2)
layerstr5 = pdb.gimp_text_fontname(posterImage, None, posterWidth/3-220, posterHeight-670, str5, 2, True, size/2, PIXELS, font2)
layerstr6 = pdb.gimp_text_fontname(posterImage, None, 1600, posterHeight-670, str6, 2, True, size/2, PIXELS, font2)
layerstr7 = pdb.gimp_text_fontname(posterImage, None, posterWidth-505, 2440, str7, 2, True, size/2, PIXELS, font2)

# make layer 0
gimp.set_foreground((255, 255, 255))
angle = -3.14/4
posx0, posy0 = 250, 1562
layer0 = gimp.Layer(posterImage, “Layer 0”, width, height, RGBA_IMAGE, 100, NORMAL_MODE)
posterImage.add_layer(layer0, 0)
pdb.gimp_edit_copy(image0.layers[0])# layers are all layers, but jpg only has one layer 0
layer0.update(0, 0, width, height)
layer0.translate(posx0,posy0)
layer0 = pdb.gimp_edit_paste(layer0, True)
layer0 = pdb.gimp_item_transform_rotate(layer0, angle, True, 0, 0)

# make layer 1
layer1 = gimp.Layer(posterImage, “Layer 1”, width, height, RGBA_IMAGE, 100, NORMAL_MODE)
posterImage.add_layer(layer1, 0)
pdb.gimp_edit_copy(image1.layers[0])
layer1.update(0, 0, width, height)
layer1.translate(posx0+500,posy0-500)
layer1 = pdb.gimp_edit_paste(layer1, True)
layer1 = pdb.gimp_item_transform_rotate(layer1, angle, True, 0, 0)

# make layer 2
layer2 = gimp.Layer(posterImage, “Layer 2”, width, height, RGBA_IMAGE, 100, NORMAL_MODE)
posterImage.add_layer(layer2, 0)
pdb.gimp_edit_copy(image2.layers[0])
layer2.update(0, 0, width, height)
layer2.translate(posx0+1000,posy0)
layer2 = pdb.gimp_edit_paste(layer2, True)
layer2 = pdb.gimp_item_transform_rotate(layer2, angle, True, 0, 0)

# make layer 3
layer3 = gimp.Layer(posterImage, “Layer 3”, width, height, RGBA_IMAGE, 100, NORMAL_MODE)
posterImage.add_layer(layer3, 0)
pdb.gimp_edit_copy(image3.layers[0])
layer3.update(0, 0, width, height)
layer3.translate(posx0+500,posy0+500)
layer3 = pdb.gimp_edit_paste(layer3, True)
layer3 = pdb.gimp_item_transform_rotate(layer3, angle, True, 0, 0)

# make layer 3 clone
layer4 = gimp.Layer(posterImage, “Layer 4”, posterWidth, posterHeight, RGBA_IMAGE, 100, NORMAL_MODE)
posterImage.add_layer(layer4, 0)
pdb.gimp_edit_copy(image4.layers[0])
layer4.update(0, 0, width, height)
layer4.translate(posx0,posy0)
pdb.gimp_edit_paste(layer4, True)
#layer4 = pdb.gimp_item_transform_rotate(layer3, angle, True, 0, 0)

# draw two crossing lines
length = 2545
pdb.gimp_selection_none(posterImage) # de-select all
gimp.set_foreground((90, 90, 90))# set foreground color dark grey
layerline1 = gimp.Layer(posterImage, “Layer Cross Line 1”, posterWidth+1000, posterHeight, RGBA_IMAGE, 100, NORMAL_MODE)
posterImage.add_layer(layerline1, 0)
layerline1.update(0, 0, 2*posterWidth, 2*posterHeight)
pdb.gimp_image_select_rectangle(posterImage, 2, posx0, posy0, length, 9)# OPERATION=2 means CHANNEL-OP-REPLACE
pdb.gimp_edit_fill(layerline1, 0) # Fill selected area of drawable with foreground

# adjust crossing lines to center
layerline1 = pdb.gimp_item_transform_rotate(layerline1, 3.14/4, False, posterWidth/2, posy0)
layerline1.translate(62,550)

layerline2 = pdb.gimp_layer_copy(layerline1, True)
posterImage.add_layer(layerline2, 0)
layerline2.translate(-280,-280)

layerline3 = pdb.gimp_layer_copy(layerline1, True)
posterImage.add_layer(layerline3, 0)
layerline3 = pdb.gimp_item_transform_flip_simple (layerline3, 1, False, 2062)

layerline4 = pdb.gimp_layer_copy(layerline2, True)
posterImage.add_layer(layerline4, 0)
layerline4 = pdb.gimp_item_transform_flip_simple (layerline4, 1, False, 2062)

# create thin lines for title
titlew, titleh = 640, 20
gimp.set_foreground((255, 255, 255))
layerline3 = gimp.Layer(posterImage, “Layer Title Line 1”, posterWidth, titleh, RGBA_IMAGE, 100, NORMAL_MODE)
posterImage.add_layer(layerline3, 0)
layerline3.update(0, 0, posterWidth, 10)
#pdb.gimp_image_select_rectangle(posterImage, 0, 240, 500, titlew, titleh)# OPERATION=0 means CHANNEL-OP-ADD
#pdb.gimp_image_select_rectangle(posterImage, 0, 240+posterWidth/2, 500, titlew, titleh)
pdb.gimp_image_select_rectangle(posterImage, 0, 0, 0, titlew, titleh)# OPERATION=0 means CHANNEL-OP-ADD
pdb.gimp_image_select_rectangle(posterImage, 0, 110+posterWidth/2, 0, titlew, titleh)
pdb.gimp_edit_fill(layerline3, 0) # Fill selected area of drawable with foreground
layerline3.translate(270,600)
pdb.gimp_selection_none(posterImage) # de-select all

# clear layer4
pdb.gimp_edit_clear(layer4)
theDrawable = posterImage.active_drawable
posterXcfName = posterName + ‘.xcf’
filename = os.path.join(savePath, posterXcfName)
pdb.gimp_xcf_save(1, posterImage, theDrawable, filename, filename)

posterJpgName = posterName + ‘.jpeg’
jpgName= os.path.join(savePath, posterJpgName)
#pdb.file_jpeg_save(1, posterImage, theDrawable, jpgposterName, jpgposterName, 0.8, 0.5, 1, 0, ‘Poster designed by BAIXUAN WANG’, 3, 1, 0, 0)

# save as jpeg file
pdb.gimp_edit_copy_visible(posterImage)
new_img = pdb.gimp_edit_paste_as_new()
pdb.file_jpeg_save(new_img, new_img.layers[0], jpgName, jpgName, 0.8, 0.5, 1, 0, “Poster designed by BAIXUAN WANG with gimp python”, 3, 1, 0, 0)
pdb.gimp_image_delete(new_img)

register(
“python_fu_poster_bw”,
“BW Poster Maker”,
“This plugin createds a poster with 5 images and texts”,
“Baixuan Wang”,
“Copyright@BaixuanWang”,
“2016”,
“BW Poster Maker”,
“”,
[
# add imput parameter for the function arguments
(PF_FILE, “file0”, “Choose Background”, “”),
(PF_FILE, “file1”, “Choose Image 1”, “”),
(PF_FILE, “file2”, “Choose Image 2”, “”),
(PF_FILE, “file3”, “Choose Image 3”, “”),
(PF_FILE, “file4”, “Choose Image 4”, “”),
(PF_FONT, “font”, “Title Font”, “Impact”),
(PF_FONT, “font”, “Content Font”, “Agency FB”),
(PF_DIRNAME, “savePath”, “Directory to save image”, “C:/”),
(PF_STRING, “posterName”, “Poster Base Name”, ‘poster’),
],
[],
poster, menu=”<Image>/Filters”
)

main()

GDC2017相关资讯

AR

Designing for AR: A Postmortem on the Development of ‘Woorld’ – YouTube
这款游戏借助了Google Tango的室内空间扫描+虚拟重建模型技术,探戈的名字取得蛮有趣的。开发者有Unity API/JAVA/C三个选项可以入手,不过相应的,支持这一技术的安卓手机有限,官网推荐了联想的Phab 2 Pro作为第一款率先支持Tango的手机作为开发机。

Funomena是旧金山的一个游戏工作室,这次演讲的嘉宾Vu Ha分享了蛮多AR设计、游戏内互动、引导玩家在开放的AR世界里找到游戏设计好的内容相关经验。

 

 

unity的character controller方法修改

[搬运2014年旧笔记]

物体方向控制方法

  1. function Update(){
  2.       if(Input.GetKey(KeyCode.W){
  3.            transform.Translate(Vector3.forward*Time.deltaTime*2);
  4.       }else if(Input.GetKey(KeyCode.S){
  5.            transform.Translate(Vector3.forward*Time.deltaTime*-2);
  6.       }else if(Input.GetKey(KeyCode.A){
  7.            transform.Translate(Vector3.up*Time.deltaTime*-20);
  8.       }else if(Input.GetKey(KeyCode.A){
  9.            transform.Translate(Vector3.up*Time.deltaTime*20);
  10.       }
  11.  }
修改unity自带character controller代码,实现鼠标右键按下后再旋转视角的功能。(可查阅MouseLook.cs)
  1. if (Input.GetMouseButton (1)) {
  2.     if (axes == RotationAxes.MouseXAndY) {//鼠标右键按下后再旋转视角
  3.         float rotationX = transform.localEulerAngles.y + Input.GetAxis (“Mouse X”) * sensitivityX;
  4.         rotationY += Input.GetAxis (“Mouse Y”) * sensitivityY;
  5.         rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);
  6.         transform.localEulerAngles = new Vector3 (-rotationY, rotationX, 0);
  7.         } else if (axes == RotationAxes.MouseX) {
  8.             transform.Rotate (0, Input.GetAxis (“Mouse X”) * sensitivityX, 0);
  9.         } else {
  10.             rotationY += Input.GetAxis (“Mouse Y”) * sensitivityY;
  11.             rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);
  12.             transform.localEulerAngles = new Vector3 (-rotationY, transform.localEulerAngles.y, 0);
  13.             }