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
0
Question by FlashX · Nov 01, 2015 at 01:57 AM · renderingspline

Render spline?

Hi guys,

is there an easy way to render a spline at runtime? even if its a temporary fix?

ta

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by ttRevan · Nov 01, 2015 at 05:56 AM

There is nothing built-in except for Handles.DrawBezier which only works in scene view.

One way is to compute and sample your spline and draw it as a series of short lines. GL class can be used for simple lines, and LineRenderer if you need something more fancy.

The other is to look up a plugin for your need here

Comment
Add comment · Show 1 · 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 FlashX · Nov 01, 2015 at 09:12 AM 0
Share

Thanks dude for your feedback, ill look into those! I suspected nothing was built in for it :/

take care :)

avatar image
1

Answer by Bunny83 · Nov 01, 2015 at 10:38 AM

I've posted the cubic bezier calculation a couple of times:

  • http://answers.unity3d.com/answers/576687/view.html

  • http://answers.unity3d.com/answers/374368/view.html

  • http://answers.unity3d.com/answers/438613/view.html

In this Utah teapot example(WebGL) i made i've included parts of my "drawing" class. It also has a "cubic bezier" method (BezierLineGL). Keep in mind to setup a proper projection / viewport for the GL class. Also keep in mind that things drawn with the GL class are drawn immediately. So watch out where you draw your lines. Inside Update won't work since Update is called even before the camera clears the screen. Either use OnRenderObject, OnPostRender on a camera, during the repaint event in OnGUI or in a coroutine after WaitForEndOfFrame.

The project is zipped on the github page

Comment
Add comment · Show 3 · 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 ttRevan · Nov 01, 2015 at 11:41 AM 0
Share

Forgot about CurveEditor, it provide sampling out of the box :) +1

avatar image ilusja · Nov 08, 2018 at 02:05 PM 0
Share

Hey Bunny, your link with the example doesn't work. Do you still have it?

avatar image Bunny83 ilusja · Nov 09, 2018 at 03:32 AM 1
Share

Yes. I moved some of my examples to github since dropbox does no longer display html content. I also made a WebGL version some time ago. I'll fix the link in my answer.

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

35 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Curvy package...How can i get all points 2 Answers

Rendering with the CPU in Unity 0 Answers

GrabPass and Transparent geometry 0 Answers

Why am I getting shadow strange artifacts? 1 Answer

Rendering problem? 0 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