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"

Accessing Brush Vertices

I'm currently setting up a system where I want to be able to access the vertices on a volume. The problem is that I can't access the "BrushBuilder" variable or its Getter, as they are with editor data only.

Is there any way around this, or another method for accessing the same vector variables?

There is another option, which I would prefer, is having access to every pixel inside the volume. Any ideas?

Thanks!

-Peace

Product Version: Not Selected
Tags:
more ▼

asked Jul 21 '14 at 01:27 PM in C++ Programming

avatar image

Loken01
47 7 7 11

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

1 answer: sort voted first

I have the same usecase, this worked for me:

 TArray<FVector> vertices = TArray<FVector>();
     TResourceArray<FModelVertex, 0U> modelVertices = volumeOrBrushActor->Brush->VertexBuffer.Vertices;
 
     for (FModelVertex vert : modelVertices)
     {
         const FVector WorldSpaceVertexLocation = volumeOrBrushActor->GetActorLocation() + GetTransform().TransformVector(vert.Position);
         vertices.AddUnique(WorldSpaceVertexLocation);
     }
 
     return vertices;

I wasn't able to figure out how to access every pixel inside the volume but the many vert/point variables under volumeOrBrushActor->Brush might hold a clue. Eventually I realized I didn't need to access every pixel for my requirement as I could just use the volume function to check whether a given point encompasses a volume like this:

 volumeActor->EncompassesPoint(point);

See this post for more with Rama's explanation for accessing static mesh vertices as well: https://forums.unrealengine.com/showthread.php?8856-Accessing-Vertex-Positions-of-static-mesh&p=161071&viewfull=1#post161071

Hope this helps.

more ▼

answered Oct 10 '14 at 07:25 AM

avatar image

VSZ
949 24 29 55

(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