HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: 3d object on GUI  (Read 1149 times)

feredfn

  • General Accounts
  • *
  • Posts: 154
    • View Profile
3d object on GUI
« on: Apr 20, 14, 01:44:05 PM »

will it soon possible to able using a 3d model within a gui ? something like rendering the character inside the character sheet UI .. or giving a virtual stage a background image instead of only color ?
Logged

Jrome90

  • General Accounts
  • *
  • Posts: 330
    • View Profile
Re: 3d object on GUI
« Reply #1 on: Apr 20, 14, 09:11:11 PM »

you could put a textured plane in the background of the virtual stage.
« Last Edit: Apr 20, 14, 09:13:13 PM by Jrome90 »
Logged

feredfn

  • General Accounts
  • *
  • Posts: 154
    • View Profile
Re: 3d object on GUI
« Reply #2 on: Apr 21, 14, 12:25:53 AM »

i see , i was thinking about it too, you mean adding a background 3d Object into the stage while the character is front of it will work ?

Thank you
Logged

Jrome90

  • General Accounts
  • *
  • Posts: 330
    • View Profile
Re: 3d object on GUI
« Reply #3 on: Apr 21, 14, 12:43:53 AM »

You are welcome.

I don't see why it wouldn't work. I added trees, and other models to a virtual stage in my Asset Placement tool.
« Last Edit: Apr 21, 14, 12:45:43 AM by Jrome90 »
Logged

feredfn

  • General Accounts
  • *
  • Posts: 154
    • View Profile
Re: 3d object on GUI
« Reply #4 on: Apr 21, 14, 05:05:48 AM »

is there any control about XYZ location of an object in a virtual stage? seems it renders them on its 0,0,0 , and models are top of each others.
Logged

Jrome90

  • General Accounts
  • *
  • Posts: 330
    • View Profile
Re: 3d object on GUI
« Reply #5 on: Apr 21, 14, 05:49:12 PM »

is there any control about XYZ location of an object in a virtual stage? seems it renders them on its 0,0,0 , and models are top of each others.

I use SetNodePosition()

Code: [Select]
method AssetSpecReady(spec as NodeRef of Class HBSpec, loadFailed as Boolean)
  specData as NodeRef of Class APT_AssetPropertiesSpec = me.NPEnode
 
  propBucket as String = me.GetPropBucket()
  instance as NodeRef of Class HBNode = CreateInstanceFromPropBucket(propBucket,spec)
  if instance["spec"] = "\placementtoolgrid\assetplacementtoolgrid.hgm"
    SetNodeScale(instance,(0.5,0,0.5))
    SetNodePosition(instance,(0,-0.5,0))

  else if instance["spec"] = "\placementtoolgrid\physicscylinder.hgm"
    radius as Float = specData.assetCollisionRadius
    SetNodeScale(instance,(radius,2,radius))
    instance["DiffuseColor"] = "#0.0,1.0,0.0,.324"
    instance["AmbientColor"] = "#0.0,1.0,0.0,.324"

    SetNodePosition(instance,(0,-0.5,0))
    me.collisionRepresentation = instance
  else
    SetNodePosition(instance,(0,-0.5,0))

  .
  ActivateInstance(instance,me.GetStageName())
.
Logged

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: 3d object on GUI
« Reply #6 on: Apr 21, 14, 06:48:13 PM »

couple things you need to consider:

1. Are these 3d objects only renendered on one client?

2. When they are placed do they stay there for ever? ( or disappear once the client restarts their client or your remove it manually for that instance)

3. Are these models rendered only when called upon? or will they be accessed frequently and should be pre-loaded.


There is the prop bucket for handling objects that other wise loads rarely and the prop doesn't persist past alerting people in the local area.  http://wiki.heroengine.com/wiki/Prop_Bucket
Quote
This information is maintained only on the client and the server is not directly aware of these instances but you can manipulate them from scripts on the client, and those scripts can be told what to do from the server via remote calls, etc.

I have not actually started to get into this part of the engine so I can't really help you past that.

A quick question I have in regards to Area permanent list:

Say you have some asset that is used EVERYWHERE like a spell, model, etc. Do you load that in the area script? world script? etc?
I remember reading about this some where and I thought it was the Wiki but I can't find anything passed the prop bucket now.

It would definitely be a good idea to add the other asset loading methods at the bottom of the prop bucket wiki page.

Hope this helps some what.
« Last Edit: Apr 21, 14, 07:53:10 PM by nocake »
Logged