x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

try to create sphere at runtime

i found this in the api section math : https://docs.unrealengine.com/latest/INT/API/Runtime/Core/Math/FSphere/index.html how i can use at or get the triangles so i can render at (build a method do that thu https://wiki.unrealengine.com/Procedural_Mesh_Generation)

basically my question how i can make a sphere

Product Version: Not Selected
Tags:
more ▼

asked Apr 06 '14 at 09:18 PM in C++ Programming

avatar image

fastwings
18 4 6 11

avatar image gmpreussner STAFF Apr 07 '14 at 12:25 AM

I can't help you with procedural mesh generation, but I can tell you that the FSphere type is merely the mathematical representation of a sphere, i.e. a center point plus a radius. Beyond that it holds no geometry information, such as a triangulation into polygons.

That being said, you can use an FSphere instance as the basis for creating your own spherical meshes. There are many ways to triangulate a sphere, and I'm pretty sure we already have code for that. Perhaps take a look at the BSP code for sphere brushes until someone else can provide a better answer :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

PrimitiveDrawingUtils.CPP

has the sphere drawing algorithms that you want, literally creating a DynamicMesh

:)

DrawSphere (Mesh, not wireframe, actual triangles)

 void DrawSphere(FPrimitiveDrawInterface* PDI,const FVector& Center,const FVector& Radii,int32 NumSides,int32 NumRings,const FMaterialRenderProxy* MaterialRenderProxy,uint8 DepthPriority,bool bDisableBackfaceCulling)
 {
 //see the .cpp for the rest for legal reasons
more ▼

answered Apr 07 '14 at 02:27 AM

avatar image

Rama
10.6k 446 346 1088

avatar image darkgaze Aug 18 '17 at 07:46 AM

I don't find any of this in the documentation. In fact, FSphere is not a graphical representation. And PrimitiveDrawingUtils is not mentioned in the docs. Not very easy how to do this when you are a beginner, really...

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question