• Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Social Media
    •   @Wings3dOfficial
    •   @Wings3dOfficial
    •   Wings3dOfficial
    •   Wings3dOfficial
  • Register
  • Login
  • Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Register
  • Login
Wings 3D Development Forum Wings 3D Programming v
« Previous 1 2 3 4 Next »
Vector Groups

 
  • 0 Vote(s) - 0 Average
Vector Groups

Pages (2): 1 2 Next »
Namrata
Offline

Junior Member

Posts: 8
Threads: 3
Joined: Mar 2015
#1
03-25-2015, 10:42 PM
Hi,

I am new to wings3d development, and I need help getting started with the plug-in I am trying to develop.

I was wondering if there is any way of defining vector groups in wings as we do in blender. If not what is the best way to replicate something similar??
ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#2
03-25-2015, 10:51 PM (This post was last modified: 03-25-2015, 10:54 PM by ggaliens.)
First you should define what you vector group is (for us ... your audience) and tell us how you plan to use them. Then we might be able to better assist with ideas.

There is some prior art in Wings3D world that would call a collection of adjacent faces ... a "region". I wonder if this is close to what you speak of.
Namrata
Offline

Junior Member

Posts: 8
Threads: 3
Joined: Mar 2015
#3
03-25-2015, 11:11 PM
The Vertex Groups could be used to tag vertices as belonging to a certain part of the mesh, think of the legs or seat of a chair, the whole chair, the hinges of a door, etc.
So basically I want to define groups of some vertices that have the same properties.
ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#4
03-26-2015, 05:27 AM
There are many ways to get this done.

You can use wings plugin state. You could use vertex colors if your didn't think those already occupied.

You could use gb_sets if the values are somewhat transient/volatile in memory.

And I think there is an offical way to do it with vertex attribute lookup. I think see how colors and uvs are stored per vertex and do the same for your properties and SAVE/LOAD might be free of charge.
Namrata
Offline

Junior Member

Posts: 8
Threads: 3
Joined: Mar 2015
#5
03-26-2015, 08:36 PM
Thanks, that seems to be something I can use. However when reading the source code i came across the function wings_vertex:fold(...).

Could someone please explain what exactly this function does.
micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,681
Threads: 185
Joined: Jun 2012
#6
03-26-2015, 08:51 PM
(03-26-2015, 08:36 PM)Namrata Wrote: However when reading the source code i came across the function wings_vertex:fold(...).

Could someone please explain what exactly this function does.
In a very short answer: "Fold over all edges/faces surrounding a vertex."

There is some minimal comments in the source code. Just look inside of wings_vertex.erl
[Image: tw.png] @MicheusVieira [Image: yt.png] @MicheusVieira [Image: da.png] Micheuss [Image: ig.png] micheus4wings3d
* Wings3D Team stands for: Björn and Dan
Namrata
Offline

Junior Member

Posts: 8
Threads: 3
Joined: Mar 2015
#7
03-26-2015, 08:56 PM
I looked over the code, but being new to modelling and wings, I am unable to understand what exactly does 'Fold over all edges/faces surrounding a vertex' mean.
micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,681
Threads: 185
Joined: Jun 2012
#8
03-26-2015, 09:04 PM
I'm sure ggaliens will be able to help you more than me. Smile

By now, maybe you would like to know that Wings3D uses the The Winged-Edge Data Structure - the data structure used to store the adjacency relationships between edges, faces, and vertices in a Wings 3D model.
[Image: tw.png] @MicheusVieira [Image: yt.png] @MicheusVieira [Image: da.png] Micheuss [Image: ig.png] micheus4wings3d
* Wings3D Team stands for: Björn and Dan
ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#9
03-27-2015, 01:36 AM (This post was last modified: 03-27-2015, 01:38 AM by ggaliens.)
fold is generally meaning "iterate over". There are no true loops in Erlang. Most all of that is done either via recursion or accessor functions (which probably are implemented recursively).

Look at lists:fold( ) and try that first. wings_vertex:fold will behave like that.

If you are very serious about learning Erlang/Wings3D programming ... I would be willing to do a few Q.A. study up sessions with you to help get you going. But there is no replacement for some talent plus the drive to dive in head first. Good luck.

Another way of putting it ... wings_vertex:fold and some of the other fold function help to keep you at arms length and protect you from the details of W.E.D.S. that Micheus points to ... nevertheless ... that sort of background WEDS information is good for you.
Namrata
Offline

Junior Member

Posts: 8
Threads: 3
Joined: Mar 2015
#10
03-27-2015, 01:48 AM
Ok, I shall look it up.

And if possible I would like to take you up on the offer of the study session. I would really like to get to learn Erlang/Wings3D programming and I seem very lost as of now.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode