Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by CaptainKeytar · Apr 20, 2010 at 02:49 PM · serverrendertextureprobatchmode

Rendering to file in batchmode?

We're trying to write a server-side app in Unity Pro. Part of its function is to generate images and serve them to a browser. This works fine if the app is started the regular, windowed way. Ideally, we'd like the app to run headless. The problem is, as far as I understand, Unity's "-batchmode" flag disables the rendering pipeline completely.

Is there a way to run Unity in headless mode whilst retaining its rendering capabilities?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Vectrex · Jun 09, 2010 at 01:45 AM

Perhaps this commandline might work? It's the reference DX renderer which MIGHT work without a gpu since it's pure cpu, although I doubt it :)

"-force-d3d9-ref (Windows only) Make the game run using Direct3D's "Reference" software renderer. DirectX SDK has to be installed for this to work. This is mostly useful for building automated test suites, where you want to ensure rendering is exactly the same no matter what's the graphics card."

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by vade · Apr 06, 2012 at 01:54 AM

This totally works, however I found you have to ensure you are using a forward renderer, and force the camera to render prior to running a screen capture.

Something like:

 ....
     camera.Render();
 screenShot.ReadPixels(new Rect(0, 0, resWidth, resHeight), 0, 0);
 ....
Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image niniane · Dec 05, 2013 at 09:50 AM 0
Share

Does this work for rendering in EC2, where there's no GPU?

avatar image bhayward_incrowd · May 19, 2017 at 02:41 PM 0
Share

Hi @vade, did you ever manage to get this working? I saw your other question on this topic. I am trying to do exactly the same thing. Are you able to point me in the direction of a working exampl e solution? Best regards, Ben

avatar image
0

Answer by qJake · Jun 08, 2010 at 11:02 PM

I don't believe it's possible to run a standalone player in batch mode without automatically disabling the rendering. As per the documentation:

-batchmode
Run the game in "headless" mode. The game will not display anything and won't accept user input. This is mostly useful for running servers of networked games.

Looks like you're going to either have to think up another solution, or run the game normally unfortunately.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

A node in a childnode? 1 Answer

running servers for networked games 0 Answers

Run Unity Pro in "Indie Mode"? 1 Answer

Unity online send a message out of unity to server 1 Answer

Remote access of Unity Asset Server? 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges